Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Archethect/sc-auditor
/ functions
Functions
162 in github.com/Archethect/sc-auditor
⨍
Functions
162
◇
Types & classes
47
↓ 152 callers
Function
readSkill
Read the SKILL.md file content.
skills/security-auditor/__tests__/skill.test.ts:13
↓ 128 callers
Function
extractBody
Extract the markdown body (everything after the closing --- of frontmatter).
skills/security-auditor/__tests__/skill.test.ts:30
↓ 95 callers
Function
loadConfig
(configDir: string = process.cwd())
src/config/loader.ts:505
↓ 81 callers
Function
writeConfig
(dir: string, content: unknown)
src/config/__tests__/loader.test.ts:11
↓ 69 callers
Function
writeFile
(dir: string, relPath: string, content: string)
src/core/__tests__/discovery.test.ts:21
↓ 53 callers
Function
setupMcpTest
* Creates and connects an MCP client/server pair for testing. * Returns tools list, callTool function, and cleanup function.
src/mcp/tools/__tests__/search-findings.test.ts:19
↓ 52 callers
Function
discoverSolidityFiles
(repoRoot: string)
src/core/discovery.ts:104
↓ 50 callers
Function
mockExecFile
( handler: (args: string[], cb: ExecFileCallback) => void, )
src/mcp/tools/__tests__/exec-test-utils.ts:51
↓ 33 callers
Function
mockSuccessResponse
* Creates a mock successful API response with optional findings data.
src/mcp/tools/__tests__/search-findings.test.ts:60
↓ 32 callers
Function
parseAderynOutput
(output: AderynOutput)
src/mcp/tools/aderyn-parser.ts:120
↓ 26 callers
Function
executeSlither
(rootDir: string)
src/mcp/tools/slither-executor.ts:120
↓ 26 callers
Function
flattenChecklist
(raw: unknown)
src/mcp/services/checklist.ts:121
↓ 26 callers
Function
loadFixture
Load test fixture.
src/mcp/services/__tests__/checklist.test.ts:20
↓ 23 callers
Function
executeAderyn
(rootDir: string)
src/mcp/tools/aderyn-executor.ts:120
↓ 21 callers
Function
createMcpServer
()
src/mcp/server.ts:22
↓ 21 callers
Function
parseFrontmatter
Parse YAML frontmatter into an object.
skills/security-auditor/__tests__/skill.test.ts:25
↓ 21 callers
Function
parseSlitherOutput
(output: SlitherOutput)
src/mcp/tools/slither-parser.ts:145
↓ 19 callers
Function
jsonResult
(data: unknown)
src/mcp/server.ts:69
↓ 19 callers
Function
parseResultContent
* Parses the JSON text content from an MCP tool result.
src/mcp/tools/__tests__/search-findings.test.ts:112
↓ 18 callers
Function
createIssue
* Creates a test issue with default values.
src/mcp/tools/__tests__/aderyn-parser.test.ts:48
↓ 18 callers
Function
getJsonOutputPath
(args: string[])
src/mcp/tools/__tests__/exec-test-utils.ts:19
↓ 17 callers
Function
createAderynOutput
* Creates a test Aderyn output structure.
src/mcp/tools/__tests__/aderyn-parser.test.ts:31
↓ 16 callers
Function
createTestFinding
* Creates a standard test finding object for API responses.
src/mcp/tools/__tests__/search-findings.test.ts:90
↓ 16 callers
Function
validationError
(message: string)
src/config/loader.ts:63
↓ 15 callers
Function
createEnoentError
(message = "spawn tool ENOENT")
src/mcp/tools/__tests__/exec-test-utils.ts:60
↓ 15 callers
Function
getResultText
* Gets the text content from an MCP tool result.
src/mcp/tools/__tests__/search-findings.test.ts:120
↓ 14 callers
Function
fetchChecklist
()
src/mcp/services/checklist.ts:261
↓ 13 callers
Function
createElement
* Creates a test element with the given properties.
src/mcp/tools/__tests__/slither-parser.test.ts:30
↓ 12 callers
Function
createDetector
* Creates a test detector with optional overrides.
src/mcp/tools/__tests__/slither-parser.test.ts:41
↓ 12 callers
Function
createSlitherOutput
* Creates a successful Slither output with the given detectors.
src/mcp/tools/__tests__/slither-parser.test.ts:66
↓ 11 callers
Function
getDiscoveryWarnings
()
src/core/discovery.ts:16
↓ 11 callers
Function
minimalFinding
Construct a minimal valid Finding with only required fields.
src/types/__tests__/finding-types.test.ts:14
↓ 11 callers
Function
mockErrorResponse
* Creates a mock error API response.
src/mcp/tools/__tests__/search-findings.test.ts:75
↓ 11 callers
Function
setupConfigDir
* Sets up a temp directory with config.json for testing.
src/mcp/tools/__tests__/search-findings.test.ts:51
↓ 11 callers
Function
validateBoolean
* Validates that an optional field, if present, is a boolean.
src/config/loader.ts:127
↓ 10 callers
Function
mapSlitherSeverity
(impact: string)
src/mcp/tools/slither-parser.ts:42
↓ 9 callers
Function
extractText
Extract the text string from a CallToolResult's first content block.
src/mcp/__tests__/server.test.ts:17
↓ 9 callers
Function
filterByCategory
(items: ChecklistItem[], category: string | undefined)
src/mcp/services/checklist.ts:145
↓ 9 callers
Function
generateFoundryPoc
( rootDir: string, hotspot: z.infer<typeof GenerateFoundryPocSchema>["hotspot"], )
src/mcp/tools/generate-foundry-poc.ts:230
↓ 7 callers
Function
mapSlitherConfidence
(confidence: string)
src/mcp/tools/slither-parser.ts:54
↓ 6 callers
Function
errorResult
* Creates a failed execution result with the given error message.
src/mcp/tools/slither-executor.ts:31
↓ 6 callers
Function
setupMcpTest
* Creates and connects an MCP client/server pair for testing. * Returns tools list, callTool function, and cleanup function.
src/mcp/tools/__tests__/get-checklist.test.ts:19
↓ 5 callers
Function
executeEchidna
( input: z.infer<typeof RunEchidnaSchema>, )
src/mcp/tools/run-echidna.ts:160
↓ 5 callers
Function
executeHalmos
( input: z.infer<typeof RunHalmosSchema>, )
src/mcp/tools/run-halmos.ts:162
↓ 5 callers
Function
executeMedusa
( input: z.infer<typeof RunMedusaSchema>, )
src/mcp/tools/run-medusa.ts:161
↓ 5 callers
Function
getSchemaProps
* Returns the properties object from a tool's inputSchema.
src/mcp/tools/__tests__/tool-schemas.test.ts:51
↓ 5 callers
Function
getTool
* Returns a tool by name, throwing if not found (ensures type safety without non-null assertion).
src/mcp/tools/__tests__/tool-schemas.test.ts:40
↓ 5 callers
Function
read
Read a file as UTF-8.
scripts/build-agents.mjs:33
↓ 5 callers
Function
setupMcpTest
* Creates and connects an MCP client/server pair for testing. * Returns tools list, callTool function, and cleanup function.
src/mcp/tools/__tests__/run-slither.test.ts:25
↓ 5 callers
Function
setupMcpTest
* Creates and connects an MCP client/server pair for testing. * Returns tools list, callTool function, and cleanup function.
src/mcp/tools/__tests__/run-aderyn.test.ts:25
↓ 5 callers
Function
startStdio
(server?: McpServer, transport?: Transport)
src/mcp/server.ts:36
↓ 5 callers
Function
validatePath
(rootDir: string)
src/mcp/tools/executor-utils.ts:21
↓ 5 callers
Function
writeDotEnv
(dir: string, content: string)
src/config/__tests__/loader.test.ts:15
↓ 4 callers
Function
bootServer
()
src/mcp/main.ts:26
↓ 4 callers
Function
errorResult
* Creates a failed execution result with the given error message.
src/mcp/tools/aderyn-executor.ts:31
↓ 4 callers
Function
mockExit
Mock process.exit so the test runner does not terminate.
src/mcp/__tests__/server.test.ts:12
↓ 4 callers
Function
readJson
Read and parse a JSON file relative to project root.
src/mcp/__tests__/manifests.test.ts:9
↓ 4 callers
Function
registerGenerateFoundryPocTool
(server: McpServer)
src/mcp/tools/generate-foundry-poc.ts:265
↓ 4 callers
Function
registerGetChecklistTool
(server: McpServer)
src/mcp/tools/get-checklist.ts:25
↓ 4 callers
Function
registerRunAderynTool
(server: McpServer)
src/mcp/tools/run-aderyn.ts:24
↓ 4 callers
Function
registerRunEchidnaTool
(server: McpServer)
src/mcp/tools/run-echidna.ts:192
↓ 4 callers
Function
registerRunHalmosTool
(server: McpServer)
src/mcp/tools/run-halmos.ts:200
↓ 4 callers
Function
registerRunMedusaTool
(server: McpServer)
src/mcp/tools/run-medusa.ts:193
↓ 4 callers
Function
registerRunSlitherTool
(server: McpServer)
src/mcp/tools/run-slither.ts:24
↓ 4 callers
Function
registerSearchFindingsTool
(server: McpServer)
src/mcp/tools/search-findings.ts:227
↓ 4 callers
Function
setupMcpTest
* Creates and connects an MCP client/server pair for testing.
src/mcp/tools/__tests__/generate-foundry-poc.test.ts:32
↓ 4 callers
Function
setupMcpTest
()
tests/integration/smoke.test.ts:52
↓ 4 callers
Function
validateIntegerRange
* Validates that an optional field, if present, is an integer within [min, max]. * Throws with a message containing the field name on any failure.
src/config/loader.ts:71
↓ 3 callers
Function
errorResult
* Creates an error result for MCP responses.
src/mcp/tools/search-findings.ts:130
↓ 3 callers
Function
extractContractNames
* Extracts contract names from affected file paths. * * Strips directory and `.sol` extension to derive contract names.
src/mcp/tools/generate-foundry-poc.ts:76
↓ 3 callers
Function
flushAsync
Allow async shutdown handlers to flush.
src/mcp/__tests__/server.test.ts:7
↓ 3 callers
Function
getCacheDir
* Gets the cache directory path. * * Uses os.homedir() which is cross-platform: * - Unix: reads $HOME * - Windows: reads USERPROFILE (or HOMEDRIVE
src/mcp/services/checklist.ts:173
↓ 3 callers
Function
getCacheFilePath
* Gets the cache file path.
src/mcp/services/checklist.ts:181
↓ 3 callers
Function
getCacheTimestampPath
* Gets the cache timestamp file path.
src/mcp/services/checklist.ts:188
↓ 3 callers
Function
getCategories
(items: ChecklistItem[])
src/mcp/services/checklist.ts:160
↓ 3 callers
Function
listMdFiles
List .md files in a directory (non-recursive).
scripts/build-agents.mjs:78
↓ 3 callers
Function
mockExecFileWithOptions
( handler: (args: string[], cb: ExecFileCallback) => void, )
src/mcp/tools/__tests__/exec-test-utils.ts:34
↓ 3 callers
Function
setupMcpTest
* Creates and connects an MCP client/server pair for testing.
src/mcp/tools/__tests__/run-echidna.test.ts:24
↓ 3 callers
Function
setupMcpTest
* Creates and connects an MCP client/server pair for testing.
src/mcp/tools/__tests__/run-medusa.test.ts:24
↓ 3 callers
Function
setupMcpTest
* Creates and connects an MCP client/server pair for testing.
src/mcp/tools/__tests__/run-halmos.test.ts:24
↓ 3 callers
Function
validationError
* Creates a validation error with the standard error format.
src/mcp/services/checklist.ts:54
↓ 2 callers
Function
cleanupTempDir
(tempDir: string)
src/mcp/tools/executor-utils.ts:59
↓ 2 callers
Function
collectFiles
Recursively collect all files under a directory.
scripts/__tests__/build-agents.test.ts:16
↓ 2 callers
Function
copyVerbatim
Copy all .md files from src to dest verbatim.
scripts/build-agents.mjs:84
↓ 2 callers
Function
createSecureTempFile
(prefix: string)
src/mcp/tools/executor-utils.ts:50
↓ 2 callers
Function
errorMessage
(err: unknown)
src/core/discovery.ts:31
↓ 2 callers
Function
generateImports
* Generates import statements for affected contracts.
src/mcp/tools/generate-foundry-poc.ts:86
↓ 2 callers
Function
isStringArray
* Type guard to check if a value is an array of strings.
src/mcp/services/checklist.ts:47
↓ 2 callers
Function
isToolAvailable
(tool: string)
tests/integration/smoke.test.ts:43
↓ 2 callers
Function
issueToFinding
* Converts an Aderyn issue to a Finding.
src/mcp/tools/aderyn-parser.ts:58
↓ 2 callers
Function
lineCount
Count lines in a string.
skills/security-auditor/__tests__/skill.test.ts:37
↓ 2 callers
Function
makeTempDir
()
src/config/__tests__/loader.test.ts:7
↓ 2 callers
Function
normalizeConfidence
( tool: "slither" | "aderyn", rawConfidence: string, )
src/mcp/tools/parser-utils.ts:67
↓ 2 callers
Function
normalizeDetectorCategory
( detectorName: string, _tool: "slither" | "aderyn", )
src/mcp/tools/parser-utils.ts:60
↓ 2 callers
Function
readCache
* Reads cached checklist data if available.
src/mcp/services/checklist.ts:212
↓ 2 callers
Function
readText
Read a text file relative to project root.
src/mcp/__tests__/manifests.test.ts:15
↓ 2 callers
Function
toRelativePosix
(repoRoot: string, absPath: string)
src/core/discovery.ts:46
↓ 2 callers
Function
transformMd
Apply all text transformations to a markdown file.
scripts/build-agents.mjs:38
↓ 2 callers
Function
validateNonEmptyString
* Validates that an optional field, if present, is a non-empty string.
src/config/loader.ts:143
↓ 1 callers
Function
addCodexPreamble
Add Codex orchestrator enforcement preamble to SKILL.md output (after frontmatter).
scripts/build-agents.mjs:60
next →
1–100 of 162, ranked by callers