internal/

directory
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: Apache-2.0

Directories

Path Synopsis
analyzers
auth
Package auth analyzes authentication, token, and session security for a live MCP target.
Package auth analyzes authentication, token, and session security for a live MCP target.
behavioral
Package behavioral compares what an MCP capability says it does against what its handler actually reaches, using only the graph the source pass already built: no LLM, just a fixed vocabulary matched against the description and a fixed catalogue of filesystem/network/process/credential calls matched against everything the handler statically reaches.
Package behavioral compares what an MCP capability says it does against what its handler actually reaches, using only the graph the source pass already built: no LLM, just a fixed vocabulary matched against the description and a fixed catalogue of filesystem/network/process/credential calls matched against everything the handler statically reaches.
cisco
Package cisco sends a target's declared MCP surface to Cisco AI Defense for inspection (prompt injection, data exfiltration setups, unsafe content).
Package cisco sends a target's declared MCP surface to Cisco AI Defense for inspection (prompt injection, data exfiltration setups, unsafe content).
llm
Package llm sends a target's declared MCP surface (tool descriptions, prompt text, server instructions) to a configured model for semantic judgement.
Package llm sends a target's declared MCP surface (tool descriptions, prompt text, server instructions) to a configured model for semantic judgement.
promptdefense
Package promptdefense detects prompt injection, hidden content and tool poisoning in the text an MCP server hands to an LLM: tool and prompt descriptions, resource content and server instructions.
Package promptdefense detects prompt injection, hidden content and tool poisoning in the text an MCP server hands to an LLM: tool and prompt descriptions, resource content and server instructions.
protocol
Package protocol checks MCP conformance from a snapshot.
Package protocol checks MCP conformance from a snapshot.
readiness
Package readiness checks the declared security posture of an MCP server: whether it says anything about authentication, whether tools document themselves and mark destructive operations as such, and whether resource URIs constrain what they can reach.
Package readiness checks the declared security posture of an MCP server: whether it says anything about authentication, whether tools document themselves and mark destructive operations as such, and whether resource URIs constrain what they can reach.
runtime
Package runtime is the analyzer that actually calls ac.Runtime: it turns a tool's declared input schema into fuzz payloads, runs them inside the sandbox with canaries planted, and reports only what an observation actually demonstrated
Package runtime is the analyzer that actually calls ac.Runtime: it turns a tool's declared input schema into fuzz payloads, runs them inside the sandbox with canaries planted, and reports only what an observation actually demonstrated
supplychain
Package supplychain finds pinned dependencies and reports matching OSV vulnerabilities.
Package supplychain finds pinned dependencies and reports matching OSV vulnerabilities.
taint
Package taint traces MCP-reachable values to dangerous sinks across files.
Package taint traces MCP-reachable values to dangerous sinks across files.
virustotal
Package virustotal looks up hashes for a bounded set of files under the scan root.
Package virustotal looks up hashes for a bounded set of files under the scan root.
yara
Package yara scans text an MCP server declares - tool and prompt descriptions, prompt text, resource contents, and server instructions - against YARA signatures.
Package yara scans text an MCP server declares - tool and prompt descriptions, prompt text, resource contents, and server instructions - against YARA signatures.
Package api implements the scanner's HTTP API: POST /v1/scans submits a target, GET /v1/scans/{id} polls its result, and /healthz, /readyz serve standard liveness/readiness checks.
Package api implements the scanner's HTTP API: POST /v1/scans submits a target, GET /v1/scans/{id} polls its result, and /healthz, /readyz serve standard liveness/readiness checks.
Package app assembles the scanner for the CLI and HTTP API
Package app assembles the scanner for the CLI and HTTP API
Package config loads and validates scanner configuration.
Package config loads and validates scanner configuration.
Package dossier collects everything the static pipeline knows about an MCP server's source tree into one document, for a later reviewer - a person or a model - to read without the tree at hand: languages and manifests, the MCP SDK and its version, declared server identity, and for each tool, prompt and resource its declaration, handler code and reachable behavior.
Package dossier collects everything the static pipeline knows about an MCP server's source tree into one document, for a later reviewer - a person or a model - to read without the tree at hand: languages and manifests, the MCP SDK and its version, declared server identity, and for each tool, prompt and resource its declaration, handler code and reachable behavior.
Package evals runs the security benchmark corpus and scores the scanner against it.
Package evals runs the security benchmark corpus and scores the scanner against it.
Package httpx is the outbound HTTP layer for everything the scanner fetches: MCP endpoints, package registries, vulnerability data and model providers
Package httpx is the outbound HTTP layer for everything the scanner fetches: MCP endpoints, package registries, vulnerability data and model providers
llm
Package llm holds what the provider adapters (openai, anthropic, bedrock) share: request configuration, a classified error type, and the HTTP call that turns a raw response into one of them.
Package llm holds what the provider adapters (openai, anthropic, bedrock) share: request configuration, a classified error type, and the HTTP call that turns a raw response into one of them.
anthropic
Package anthropic implements analyzer.LLMClient with the Anthropic Messages API
Package anthropic implements analyzer.LLMClient with the Anthropic Messages API
bedrock
Package bedrock implements analyzer.LLMClient against Anthropic Claude models hosted on AWS Bedrock, calling bedrock-runtime InvokeModel directly over net/http with a hand-rolled SigV4 signature
Package bedrock implements analyzer.LLMClient against Anthropic Claude models hosted on AWS Bedrock, calling bedrock-runtime InvokeModel directly over net/http with a hand-rolled SigV4 signature
openai
Package openai implements analyzer.LLMClient against the OpenAI chat completions API
Package openai implements analyzer.LLMClient against the OpenAI chat completions API
mcp
client
Package client is the wiring seam other packages depend on: it turns a model.Target into a live MCP connection (scanner.Preparer, analyzer.Dialer) or a replayed one (LoadSnapshotBytes), and implements analyzer.Session on top of the go-sdk client plus a minimal raw JSON-RPC channel for probes the typed SDK client will not build
Package client is the wiring seam other packages depend on: it turns a model.Target into a live MCP connection (scanner.Preparer, analyzer.Dialer) or a replayed one (LoadSnapshotBytes), and implements analyzer.Session on top of the go-sdk client plus a minimal raw JSON-RPC channel for probes the typed SDK client will not build
discovery
Package discovery drives the standard MCP discovery methods against an initialized session and converts the result into a model.Snapshot
Package discovery drives the standard MCP discovery methods against an initialized session and converts the result into a model.Snapshot
snapshot
Package snapshot canonicalizes, hashes, compares, saves, and loads snapshots
Package snapshot canonicalizes, hashes, compares, saves, and loads snapshots
surface
Package surface renders a snapshot's declared MCP capability surface - instructions, tools, prompts, resources, resource templates - as text for something that judges it (a model, a third-party classifier), stopping once a caller-supplied character budget is used.
Package surface renders a snapshot's declared MCP capability surface - instructions, tools, prompts, resources, resource templates - as text for something that judges it (a model, a third-party classifier), stopping once a caller-supplied character budget is used.
transport
Package transport builds SDK transports for an MCP target and enforces the scanner's own SSRF guard before any of them connect
Package transport builds SDK transports for an MCP target and enforces the scanner's own SSRF guard before any of them connect
Package policy turns a scan result into a pass/fail decision and a process exit code.
Package policy turns a scan result into a pass/fail decision and a process exit code.
Package report holds what every output writer (json, sarif, table, summary) shares
Package report holds what every output writer (json, sarif, table, summary) shares
json
Package json writes sanitized ScanResult values using the versioned schema.
Package json writes sanitized ScanResult values using the versioned schema.
sarif
Package sarif writes a model.ScanResult as SARIF 2.1.0 (https://docs.oasis-open.org/sarif/sarif/v2.1.0/), the format GitHub code scanning and most CI security dashboards consume
Package sarif writes a model.ScanResult as SARIF 2.1.0 (https://docs.oasis-open.org/sarif/sarif/v2.1.0/), the format GitHub code scanning and most CI security dashboards consume
summary
Package summary writes a condensed, human-readable overview of a model.ScanResult: verdict, finding counts, coverage gaps and the most severe findings - not the full table internal/report/table produces
Package summary writes a condensed, human-readable overview of a model.ScanResult: verdict, finding counts, coverage gaps and the most severe findings - not the full table internal/report/table produces
table
Package table writes a model.ScanResult as a plain-text table for a terminal
Package table writes a model.ScanResult as a plain-text table for a terminal
runtime
canary
Package canary generates the fake secrets planted inside a sandbox run.
Package canary generates the fake secrets planted inside a sandbox run.
fuzz
Package fuzz generates schema-driven payloads for a tool's declared JSON Schema input.
Package fuzz generates schema-driven payloads for a tool's declared JSON Schema input.
observer
Package observer turns a raw sandbox run into []analyzer.Observation.
Package observer turns a raw sandbox run into []analyzer.Observation.
sandbox
Package sandbox implements analyzer.RuntimeExecutor on top of the Docker CLI.
Package sandbox implements analyzer.RuntimeExecutor on top of the Docker CLI.
Package source builds a repository graph and discovers MCP registrations.
Package source builds a repository graph and discovers MCP registrations.
graph
Package graph is the exported source-code model shared between the discovery pass and every analyzer that reasons about dataflow: symbols, imports, the call graph and the MCP capabilities found in it
Package graph is the exported source-code model shared between the discovery pass and every analyzer that reasons about dataflow: symbols, imports, the call graph and the MCP capabilities found in it
inventory
Package inventory walks regular source files within a hard root boundary and records reported skips.
Package inventory walks regular source files within a hard root boundary and records reported skips.
language
Package language adapts each supported source language to a common shape: its file extensions, its tree-sitter grammar, and the small set of node kinds the parser and taint walker need to recognize (a function, a call, an assignment, a string literal)
Package language adapts each supported source language to a common shape: its file extensions, its tree-sitter grammar, and the small set of node kinds the parser and taint walker need to recognize (a function, a call, an assignment, a string literal)
parser
Package parser turns one source file into symbols, imports and calls using the language's tree-sitter grammar and queries.
Package parser turns one source file into symbols, imports and calls using the language's tree-sitter grammar and queries.
queries
Package queries embeds the tree-sitter query files for every supported language, so parsing never depends on a query file being present on disk at runtime
Package queries embeds the tree-sitter query files for every supported language, so parsing never depends on a query file being present on disk at runtime
registration
Package registration finds where MCP tools, prompts and resources are registered, across direct SDK calls, decorators/annotations/attributes, a wrapper function that forwards into the SDK, and registration inside a loop - working entirely off the graph the parser already built, so it never re-reads source.
Package registration finds where MCP tools, prompts and resources are registered, across direct SDK calls, decorators/annotations/attributes, a wrapper function that forwards into the SDK, and registration inside a loop - working entirely off the graph the parser already built, so it never re-reads source.
Package supplychain holds the seam between the code that downloads a package target and the analyzer that has to say something about it
Package supplychain holds the seam between the code that downloads a package target and the analyzer that has to say something about it
archive
Package archive extracts hostile input under size and count limits.
Package archive extracts hostile input under size and count limits.
npm
Package npm downloads a published npm package's tarball and unpacks it with internal/supplychain/archive.
Package npm downloads a published npm package's tarball and unpacks it with internal/supplychain/archive.
osv
Package osv queries the OSV (Open Source Vulnerabilities) database for a set of ecosystem/name/version coordinates, and parses the lockfile formats that produce those coordinates in the first place
Package osv queries the OSV (Open Source Vulnerabilities) database for a set of ecosystem/name/version coordinates, and parses the lockfile formats that produce those coordinates in the first place
pypi
Package pypi downloads and extracts PyPI sdists and wheels.
Package pypi downloads and extracts PyPI sdists and wheels.
Package testutil holds helpers shared by tests in several packages
Package testutil holds helpers shared by tests in several packages

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL