Threat model

What ShorSighted touches, who could attack it, and what stops them. Reviewed for each minor release and for any change to a collector, the MCP server or a workflow.

Actors and assets

ActorTrustCan influence
User running the CLITrustedTargets, flags, shorsighted.yaml, which credentials are in scope
Scanned endpoint (TLS/SSH server, DNS)UntrustedEvery byte of ServerHello, certificates, SSH KEXINIT, STARTTLS banners, DNS answers
Cloud provider APIs (AWS, Azure, GCP)Trusted transport, untrusted contentResource names, hostnames and settings returned by Describe/List/Get
MCP client configs on diskUntrusted contentServer URLs, headers, env values (may hold secrets)
AI agent calling serve-mcpUntrustedTarget lists and options passed to the scan tool
ContributorUntrusted until reviewedPull requests
GitHub Actions, PyPITrusted infrastructureBuilds and distributes releases

Assets: the user’s cloud credentials and MCP secrets, the user’s network position (ShorSighted can open connections from it), the correctness of the report, and the integrity of published releases.

Attack surface and mitigations

ThreatEntry pointMitigation
Malformed or hostile handshake crashes or hangs the scanprobe/parser.py, probe/ssh.py, probe/chain.pyBounded reads (MAX_READ), per-step deadlines, parsers fuzzed with Hypothesis; a bad target becomes an error result, never an exception that stops the batch
Server lies to get a false “post-quantum” passKEX probeVerdicts need a well-formed TLS 1.3 ServerHello naming the group; ambiguous answers are inconclusive, never pass; the daily differential run compares every verdict with OpenSSL and OpenSSH
TLS-inspecting proxy reports its own crypto as the server’sChain fetchprobe/interception.py recognizes known interceptors and reports the target as not measured
Scan modifies cloud resourcessources/aws/, sources/cloud/AWS client guard allows only Describe/List/Get at runtime; Azure and GCP go through a GET-only client; tests check every call against docs/iam-policy.json
Cloud bearer token sent to another hostsources/cloud/http.pyRedirects are never followed, so a token only goes to the URL the collector built
Secrets from MCP configs leak into reports or logssources/mcp.pyValues are reduced to scheme, host and port before storage; the only request is one GET of the OAuth metadata URL per origin
Agent uses serve-mcp to scan internal networks (SSRF)mcp_server.pyScanPolicy resolves names the way the probe does and refuses private, loopback, link-local and metadata addresses unless allowed; per-call target limits
Untrusted text injected into HTML/Markdown/SARIF reportsreport/All server-supplied strings are escaped by the reporter for its format; snapshot tests cover each format
Malicious pull request steals CI secrets.github/workflows/pull_request trigger only, read-only default token, no secrets on PR jobs, pinned action SHAs, CodeQL for Actions
Compromised dependencypyproject.tomlFew runtime dependencies, dependency review on every PR, Dependabot, pip-audit before release
Tampered releasePyPI, GitHub ReleasesTrusted Publishing (no stored token), maintainer approval on the pypi environment, Sigstore signatures, SLSA Build L3 provenance, PEP 740 attestations

Out of scope

Vulnerabilities in the endpoints being scanned are ShorSighted’s output, not threats to it. A user who runs it with over-privileged cloud credentials still gets read-only calls, but should use the policy in docs/iam-policy.json.