Mythos Agent

io.github.mythos-agentPublished by GitHub account mythos-agentv4.0.1Updated Oct 27, 2026

Open-source AI security agent: SAST, DAST, and policy-as-code over MCP.

Overview

AI-generated overview

Open-source AI security code-review agent that scans a local codebase for vulnerabilities, secrets, dependency and IaC issues, and suggests fixes.

What you can do
  • Scan code for vulnerability patterns, secrets, dependency CVEs, IaC misconfigurations, API, JWT, crypto and privacy issues
  • Run a multi-stage autonomous hunt that forms hypotheses, verifies findings and generates proof-of-concept exploits
  • Find variants of known CVEs by root-cause pattern, and trace data flow with taint analysis
  • Generate AI patches, answer natural-language security questions, and map findings to SOC2/HIPAA/PCI/OWASP policies
  • Export reports as terminal, JSON, HTML or SARIF, and serve a local dashboard
  • Watch files for changes and check which external security tools are installed
When to use it
Useful when you want an assistant to review a local repository for security problems, triage findings by confidence, or check whether a known CVE pattern appears elsewhere in the code. Suited to security-focused code review before release or during pull-request work.
Requirements
Runs as a local npm package (npx mythos-agent) on a desktop machine. Pattern, secrets, dependency and IaC scanning work without an API key; the full autonomous hunt and AI features need a configured model provider (Anthropic, or an OpenAI-compatible or local endpoint via configuration or the ANTHROPIC_BASE_URL environment variable). Optional external tools such as Semgrep, Gitleaks, Trivy, Checkov and Nuclei add coverage.
Before you install
AI-driven commands send code and findings to the configured model provider, which may be a third party; local models keep data on the machine. The fix command can apply patches to your files, and watch mode rescans on save. Dependency checks query the OSV API over the network. Review generated patches and proof-of-concept exploits before use.

Installation

In SourceWeft

  1. Open Mythos Agent in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

English · 简体中文

[mythos-agent — Cerby the guard puppy]

[mythos-agent — 10-second security check demo]

mythos-agent

AI code-review assistant for application security.

Open-source. Reads your code, flags likely security issues, explains its reasoning, suggests fixes.

[CI] [npm] [License] [Discord] [Node] [Wired scanners] [Experimental scanners] [Rules]

mythos-agent.com

Quick Start • How It Works • Commands • Hunt Mode • Variant Analysis • Integrations • Contributing • Vision • Roadmap


mythos-agent reviews your code the way a reviewer on a security-focused team would. It walks through likely issue patterns, checks for variants of known CVEs, ranks findings by confidence, and suggests fixes you can accept or reject. See VISION.md for the full framing.

For new contributors: the active 6-month working plan is in the pinned issue [Roadmap] mythos-agent H1 2026 Goals. Look for 🙋 markers to spot items where help is wanted. New here? See CONTRIBUTING.md for good-first-issue guidance.

For security teams and EU CRA-compliant downstream manufacturers: see SECURITY.md for our vulnerability disclosure SLAs, docs/security/cra-stance.md for our EU CRA role declaration, docs/security/threat-model.md for our public threat model, and RELEASES.md for our versioning, LTS, and EOL policy. OpenSSF Best Practices Badge (Passing) submission targeted June 2026; releases are signed via Sigstore and ship with CycloneDX SBOMs for downstream Manufacturer compliance.

bash
npx mythos-agent hunt
🔐 mythos-agent hunt — AI Code-Review Assistant
✔ Phase 1: Reconnaissance — 12 entry points, express, typescript, postgresql✔ Phase 2: Hypothesis — 8 security hypotheses generated✔ Phase 3: Analysis — 15 findings (semgrep, gitleaks, trivy, built-in), 22 false positives dismissed✔ Phase 4: Reproduction — 2 finding chains, 3 reproductions
🧪 Security Hypotheses
  [HIGH] HYPO-001 — Race condition: concurrent payment requests could double-charge    src/payments.ts:45 (race-condition)  [HIGH] HYPO-002 — Auth bypass: JWT token not validated after password change    src/auth.ts:78 (auth-bypass)
📊 Confidence Summary
  3 confirmed | 8 likely | 4 possible | 22 dismissed
⛓️ FINDING CHAINS
 CRITICAL  SQL Injection → Auth Bypass → Data Exfiltration  ├── src/api/search.ts:45      — unsanitized input in SQL query  ├── src/middleware/auth.ts:88  — JWT verification skippable  └── src/api/export.ts:23      — bulk export has no ACL
🧪 Reproductions
  SPX-0001 — SQL injection in search endpoint    See repro steps in docs/reproductions/SPX-0001.md
  Trust Score: 2.3/10 — critical issues found

Quick Start

bash
# Installnpm install -g mythos-agent
# Quick scan (no API key needed)mythos-agent scan
# Full autonomous hunt (needs API key)mythos-agent initmythos-agent hunt
# Find variants of known CVEsmythos-agent variants CVE-2021-44228
# Ask security questionsmythos-agent ask "are there any auth bypasses?"
# Check available toolsmythos-agent tools

How It Works

mythos-agent combines three things no other open-source tool does together:

1. Hypothesis-Driven Scanning

Instead of matching known patterns, the AI reasons about what COULD go wrong, generating hypotheses like "this transaction doesn't lock the row, potential race condition" or "this auth check uses string comparison, potential timing attack."

2. Variant Analysis (Big Sleep technique)

Given a known CVE, mythos-agent finds structurally similar but syntactically different code in your codebase. Same root cause, different location. This is how Google's Big Sleep found 20 real zero-days.

3. Multi-Stage Verification

Every finding goes through a confidence pipeline:

  • Pattern scan → candidate
  • AI hypothesis → theoretical risk confirmed
  • Smart fuzzer → dynamically tested
  • PoC generator → concrete exploit proves it's real

Only findings that survive multiple stages are reported as "confirmed."

Commands

CommandDescription
hunt [path]Full autonomous multi-agent scan (Recon → Hypothesize → Analyze → Exploit)
scan [path]Standard scan (patterns + secrets + deps + IaC + AI)
variants [cve-id]Find variants of known CVEs in your codebase
fix [path]AI-generated patches with --apply
ask [question]Natural language security queries
taint [path]AI data flow / taint analysis
watchContinuous monitoring that scans on file save
dashboardLocal web UI with charts and findings table
report [path]Export as terminal / JSON / HTML / SARIF
policyPolicy-as-code with SOC2/HIPAA/PCI/OWASP compliance
rulesCommunity rule pack registry (search/install/publish)
toolsCheck which external security tools are installed
initSetup wizard (Anthropic, OpenAI, Ollama, LM Studio)

Hunt Mode

mythos-agent hunt runs the full multi-agent pipeline:

┌──────────────┐     ┌──────────────┐     ┌──────────────┐     ┌──────────────┐│    Recon     │ →   │  Hypothesis  │ →   │   Analyze    │ →   │   Exploit    ││    Agent     │     │    Agent     │     │    Agent     │     │    Agent     │├──────────────┤     ├──────────────┤     ├──────────────┤     ├──────────────┤│ Map entry    │     │ Reason about │     │ All scanners │     │ Chain vulns  ││ points, auth │     │ what could   │     │ + external   │     │ + generate   ││ boundaries,  │     │ go wrong per │     │ tools + AI   │     │ PoC exploits ││ data stores  │     │ function     │     │ verification │     │              │└──────────────┘     └──────────────┘     └──────────────┘     └──────────────┘

Variant Analysis

Find code in your project that has the same root cause as known CVEs:

bash
# Search for Log4Shell-like patternsmythos-agent variants CVE-2021-44228
# Auto-detect and scan for variantsmythos-agent variants --auto

The variant analyzer extracts the root cause pattern from the CVE (not the surface syntax) and searches your codebase for structurally similar code.

Scanners (15 wired + 28 experimental, 329+ rules)

The Default scanners run on every mythos-agent scan. Experimental scanners are implemented + unit-tested classes that ship in the tarball but are not yet reachable from any CLI, HTTP, MCP, or agent entry point. They are tracked by KNOWN_EXPERIMENTAL in the wiring-invariant test.

CategoryWhat it findsRulesStatus
Code patternsSQLi, XSS, command injection, eval, SSRF, etc.25+Default
Framework rulesReact, Next.js, Express, Django, Flask, Spring, Go27Default
SecretsAWS, GitHub, Stripe, API keys, DB URLs, private keys + entropy22Default
Dependencies (SCA)Known CVEs via OSV API (10 lockfile formats)OSVDefault
IaCDocker, Terraform, Kubernetes misconfigurations13Default
AI/LLM SecurityPrompt injection, unsafe eval of AI output, cost attacks13Default
API SecurityOWASP API Top 10: BOLA, mass assignment, broken auth12Default
Cloud MisconfigAWS/Azure/GCP: public storage, wildcard IAM, open firewalls14Default
Security HeadersCSP, HSTS, X-Frame-Options, Referrer-Policy8Default
JWTAlgorithm, expiry, storage, revocation, audience9Default
SessionFixation, expiry, cookie flags, localStorage tokens7Default
Business LogicNegative amounts, coupon reuse, inventory races, role escalation6Default
Crypto AuditWeak hashes, ECB mode, hardcoded keys, deprecated TLS11Default
Privacy/GDPRPII handling, consent, data retention (GDPR article mapping)9Default
Race ConditionsTOCTOU, non-atomic ops, double-spend, missing transactions7Default
ReDoSCatastrophic backtracking in regex (nested quantifiers, overlapping alternatives)—Default
Supply ChainTyposquatting, dependency confusion, dangerous install scripts12Experimental
Zero TrustService trust, mTLS, network segmentation, IP-based auth8Experimental
GraphQLIntrospection, depth limit, field auth, batching8Experimental
WebSocketAuth, origin check, message validation, broadcast XSS7Experimental
CORSOrigin reflection, credentials handling, substring bypass7Experimental
OAuth/OIDCMissing state, no PKCE, implicit flow, client secret exposure7Experimental
SSTIJinja2, EJS, Handlebars, Pug, Nunjucks, Twig, Go templates7Experimental
Additional experimental scanners (21 more, not yet wired into default scan)

SQL injection deep, XSS deep, NoSQL, command injection, deserialization, path traversal, open redirect, XXE, input validation, clickjacking, DNS rebinding, subdomain enumeration, dep confusion, environment variables, logging, error handling, cache, email, upload, memory safety, permissions.

Each exists as a class under src/scanner/ and has unit tests in src/scanner/__tests__/coverage-scanners.test.ts / new-scanners.test.ts, but is not invoked by any CLI command, HTTP API route, MCP handler, or agent pipeline. See KNOWN_EXPERIMENTAL in the wiring-invariant test for each scanner's deferral reason. Wiring one up follows the pattern of the HeadersScanner / JwtScanner / SessionScanner / BusinessLogicScanner commits on main.

Beyond the scanners above, mythos-agent ships complementary analyses (not counted in the scanner totals): call-graph + taint engine, DAST smart fuzzer, AI hypothesis agent, variant analysis, and git-history mining.

External tool integrations: Semgrep (30+ languages), Gitleaks (100+ patterns), Trivy (SCA + containers), Checkov (1000+ IaC policies), Nuclei (9000+ DAST templates)

Integrations

PlatformWhat
VS CodeExtension with inline diagnostics + one-click AI fix
GitHub ActionScan on push/PR + SARIF upload to Code Scanning
PR Review BotInline comments on vulnerable lines in pull requests
DashboardLocal web UI at mythos-agent dashboard
SARIFGitHub Code Scanning, VS Code, any SARIF tool
Policy EngineSOC2, HIPAA, PCI-DSS, OWASP compliance mapping

AI Providers

TierProvidersStatus
1 — PrimaryAnthropic (Claude Sonnet / Opus / Haiku)Fully tested. Published catch-rate numbers in docs/benchmarks/external-scores.md are produced with this tier.
2 — Compatible (proxy today, native in stage 2)Anything OpenAI-compatible — OpenAI, Qwen via DashScope/OpenRouter, Gemini, Mistral, vLLM, Ollama, LM Studio, Bedrock, etc.Today: route through any Anthropic-compatible proxy (LiteLLM, OpenRouter, Vercel AI Gateway, Bedrock) by setting baseURL in .mythos.yml or ANTHROPIC_BASE_URL env. Native OpenAI SDK support lands in stage 2.
3 — Local / communityLocal Ollama / LM Studio / vLLMSame code path as Tier 2; called out separately because privacy and cost-of-zero are the use case. Best-effort; agentic tool-use quality depends on local model size.

Pattern scanning, secrets, deps, and IaC work without any API key.

See docs/multi-model.md for the full tier-system policy + the staged rollout (this README is the summary; that doc is the canonical reference).

Comparison

Featuremythos-agentSemgrepSnykCodeQLNuclei
Pattern scanningYesBestYesYesTemplates
Hypothesis scanningYesNoNoNoNo
Variant analysisYesNoNoPartialNo
AI-guided fuzzingYesNoNoNoTemplates
PoC generationYesNoNoNoNo
AI deep analysisYesNoLimitedNoNo
Vuln chainingYesNoNoNoNo
AI auto-fixYesNoFix PRsNoNo
NL queriesYesNoNoNoNo
SecretsYesYesYesNoNo
SCAYesNoBestNoNo
IaCYesNoYesNoTemplates
DASTYesNoNoNoBest
Open sourceYesPartialNoYesYes

This feature table is a capability comparison, not an accuracy claim. For reproducible, third-party-runnable accuracy numbers vs Semgrep CE / Snyk Code / CodeQL on OWASP Benchmark, CyberSecEval 3, Vul4J, and our CVE replay harness, see docs/benchmarks/external-scores.md.

Contributing

See CONTRIBUTING.md for details.

bash
git clone https://github.com/mythos-agent/mythos-agent.gitcd mythos-agent && npm install && npm run build && npm test

Architecture

src/  agents/         Multi-agent orchestrator + Recon/Hypothesis/Analyzer/Exploit agents  analysis/       Code parser, call graph, taint engine, variant analyzer, service mapper  agent/          AI integration, prompts, tools, fix validator  cli/            44 CLI commands  dast/           Smart fuzzer, PoC generator, payload library  policy/         Policy engine + compliance mapping  report/         Terminal, JSON, HTML, SARIF, dashboard  rules/          Built-in + custom YAML + community registry  scanner/        Pattern, secrets, deps, IaC, diff scanners  store/          Results persistence + incremental cache  tools/          External tool wrappers (Semgrep, Trivy, etc.)vscode-extension/ VS Code extensionaction/           GitHub Actionsbot/              PR Review Bot

License

MIT

Source: README.md at commit a14abd1

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v4.0.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts