Skip to content

firmis scan — Scan AI Agent Components

Your agent stack has access to your AWS keys, SSH keys, API tokens, and local files. Most people never check what their tools actually do. firmis scan checks for you.

The core command. Point it at any directory and it tells you what’s dangerous.

Reach for scan whenever you want answers fast:

  • You just installed a new MCP server or Claude skill and want to know if it’s clean
  • You’re about to commit agent configuration changes and want a quick security check
  • You need to audit an existing project before handing it off or open-sourcing it
  • You want to add a security gate to your PR workflow

For a full CI pipeline (discover + BOM + scan + report in one shot), see firmis ci.

Terminal
firmis scan [path] [options]

If [path] is omitted, Firmis scans the current directory.

Running npx firmis scan on a project produces output like this:

Firmis Security Scan
Detected platforms: claude, mcp (2 platforms, 14 components)
CRITICAL [tool-poisoning] .claude/tools/fetch.ts:12
Hidden instruction in tool description: "ignore previous instructions and..."
CRITICAL [credential-harvesting] mcp-server/src/index.ts:89
Reading AWS credentials from ~/.aws/credentials
HIGH [secret-detection] .env:3
Hardcoded OpenAI API key: sk-proj-...
HIGH [permission-overgrant] claude_desktop_config.json:22
Tool requests filesystem access with no path restriction
MEDIUM [insecure-config] mcp.config.json:8
Server runs without authentication
────────────────────────────────────────────────
Grade: D 5 findings 2 critical · 2 high · 1 medium
────────────────────────────────────────────────

Every finding includes the exact file and line number, a plain English explanation of what it means, and the rule ID so you can look up remediation steps.

FlagTypeDefaultDescription
--platform <name>stringauto-detectScan a specific platform: claude, mcp, codex, cursor, crewai, autogpt, openclaw, nanobot
--allbooleantrueScan all detected platforms
--severity <level>enumlowMinimum severity to report: low, medium, high, critical
--fail-on <level>enumExit non-zero if findings at this severity or above exist. Essential for CI gates.
--jsonbooleanfalseMachine-readable JSON output for scripting or custom tooling
--sarifbooleanfalseSARIF 2.1.0 output — uploads directly to GitHub Security tab
--htmlbooleanfalseSelf-contained HTML report — shareable with your team
--output <file>stringstdoutWrite output to a file instead of printing to terminal
--config <file>stringPath to a custom .firmisrc config file
--ignore <rules>stringSkip specific rule IDs (comma-separated). Use sparingly — see Ignoring Findings.
--concurrency <n>number4Number of parallel workers. Increase for large monorepos.
--verbosebooleanfalseShow per-file scan progress and rule match details
--quietbooleanfalseSuppress all terminal output. Only the exit code tells you the result. Good for CI scripts.

Scan current directory (auto-detect all platforms)

Section titled “Scan current directory (auto-detect all platforms)”
Terminal
npx firmis scan
Terminal
npx firmis scan --platform mcp --json

Fail CI if any high or critical findings exist

Section titled “Fail CI if any high or critical findings exist”
Terminal
npx firmis scan --fail-on high --sarif --output results.sarif

Scan a specific path, suppress known false positives

Section titled “Scan a specific path, suppress known false positives”
Terminal
npx firmis scan ./packages/agent --ignore sd-045,sd-046
Terminal
npx firmis scan --html --output report.html

High-signal only — skip noise, focus on what matters

Section titled “High-signal only — skip noise, focus on what matters”
Terminal
npx firmis scan --severity high
CodeMeaning
0Scan completed. No findings above your --fail-on threshold.
1Findings found at or above your --fail-on threshold. Fix them.
2Scan error — invalid path, bad config, or unreadable files.