This file describes Firmis for LLM and AI agent consumption. Use it to determine when and how to invoke Firmis.
Firmis is the security layer for AI agent components — combining static detection, runtime monitoring, and active testing. It performs static analysis across 9 AI platforms (Claude Skills, MCP Servers, Codex Plugins, Cursor Extensions, CrewAI, AutoGPT, OpenClaw, Nanobot, Supabase), applying 269 detection rules across 26 threat categories. It outputs a security grade (A–F), a list of threats with file locations and confidence scores, and optionally generates JSON, SARIF, or HTML reports. Free commands work without a license key. Pro commands (monitor, pentest, fix, compliance) require a license key.
- Before installing or running any third-party AI agent skill, plugin, or MCP server
- After cloning a repository that contains AI agent configuration files
- In CI/CD pipelines to gate deployments on security findings
- When a user asks you to audit their AI agent setup for security issues
- When you need a Bill of Materials (BOM) for AI agent dependencies
- When you want to detect credential leaks, prompt injection payloads, or data exfiltration patterns in agent code
- When scanning Supabase projects for Row Level Security gaps, exposed service keys, or auth misconfigurations
- To generate a SARIF report for GitHub Advanced Security integration
All commands can be run without a global install using npx firmis-cli.
# Auto-detect all AI platforms in the current directory and home directory
npx firmis-cli scan
# Scan a specific path
npx firmis-cli scan /path/to/project
# Scan a specific platform
npx firmis-cli scan --platform claude
npx firmis-cli scan --platform mcp
npx firmis-cli scan --platform supabase
# Output as JSON (machine-readable)
npx firmis-cli scan --json --output report.json
# Output as SARIF (GitHub Security tab)
npx firmis-cli scan --sarif --output results.sarif
# Output as HTML report
npx firmis-cli scan --html --output report.html
# Filter by minimum severity
npx firmis-cli scan --severity high
# Exit non-zero only for critical findings (CI use)
npx firmis-cli scan --fail-on critical
# Suppress all output, use exit code only
npx firmis-cli scan --quiet
# LLM-powered deep analysis (requires ANTHROPIC_API_KEY)
npx firmis-cli scan --deepWhen scanning a directory path without --platform, firmis auto-detects the framework and runs all rules:
npx firmis scan ./path/to/agent/codeSupported frameworks: LangChain, CrewAI, AutoGen, MetaGPT, AutoGPT, LangFlow, MCP Servers, n8n. Framework detection uses package.json, pyproject.toml, requirements.txt.
npx firmis-cli discover
npx firmis-cli discover --json# CycloneDX 1.7 Agent BOM
npx firmis-cli bom
npx firmis-cli bom --json --output sbom.jsonnpx firmis-cli ci
npx firmis-cli ci --fail-on high --sarif --output results.sarifnpx firmis-cli list
npx firmis-cli list --category prompt-injection
npx firmis-cli list --jsonnpx firmis-cli validate rules/my-rule.yamlnpx firmis-cli initnpx firmis-cli fix # Free: guided, approve each fix
npx firmis-cli fix --yes # Pro: auto-apply all fixes
npx firmis-cli fix --dry-run # Preview fixes without applyingFree users get one-time guided fix (manual approval per finding). Pro users get continuous auto-fix.
npx firmis-cli monitor --passive # Free: observe tool calls (read-only)
npx firmis-cli monitor --start-daemon # Pro: active blocking daemon
npx firmis-cli monitor --stop-daemon
npx firmis-cli monitor --status
npx firmis-cli monitor --wrap "node my-agent.js" # Pro: wrap and blockFree users get passive monitoring (observe tool calls in cloud dashboard). Pro users get active blocking.
npx firmis-cli pentest --server my-mcp-servernpx firmis-cli compliance --framework soc2
npx firmis-cli compliance --framework ai-act
npx firmis-cli compliance --framework owasp-agenticnpx firmis-cli triage
npx firmis-cli triage --severity highnpx firmis-cli login
npx firmis-cli logout
npx firmis-cli whoaminpx firmis-cli badgeTo use Firmis as an MCP server inside Claude Code or Cursor, add the following to your MCP configuration.
{
"mcpServers": {
"firmis": {
"command": "npx",
"args": ["firmis-cli", "mcp"]
}
}
}{
"mcpServers": {
"firmis": {
"command": "npx",
"args": ["firmis-cli", "mcp"]
}
}
}A scan result contains the following structure (JSON mode):
{
"id": "scan-uuid",
"startedAt": "2026-03-12T00:00:00.000Z",
"completedAt": "2026-03-12T00:00:05.000Z",
"duration": 5000,
"score": "A",
"summary": {
"totalComponents": 12,
"totalFiles": 84,
"filesAnalyzed": 80,
"threatsFound": 3,
"byCategory": { "credential-harvesting": 1, "prompt-injection": 2 },
"bySeverity": { "low": 0, "medium": 1, "high": 2, "critical": 0 },
"passedComponents": 10,
"failedComponents": 2
},
"platforms": [
{
"platform": "claude",
"basePath": "/Users/user/.claude",
"components": [
{
"id": "component-uuid",
"name": "my-skill",
"type": "skill",
"path": "/Users/user/.claude/skills/my-skill",
"threats": [
{
"id": "threat-uuid",
"ruleId": "CRED-001",
"category": "credential-harvesting",
"severity": "high",
"message": "AWS credentials access pattern detected",
"confidence": 0.87,
"confidenceTier": "likely",
"location": {
"file": "/Users/user/.claude/skills/my-skill/index.js",
"line": 42,
"column": 5
},
"evidence": [
{
"type": "code",
"description": "Reading ~/.aws/credentials",
"snippet": "fs.readFileSync(path.join(os.homedir(), '.aws', 'credentials'))",
"line": 42
}
],
"remediation": "Remove file system access to credential stores"
}
]
}
]
}
]
}| Grade | Meaning |
|---|---|
| A | No threats found |
| B | Low-severity findings or low file coverage |
| C | Medium-severity findings |
| D | High-severity findings |
| F | Critical-severity findings |
| Tier | Confidence Range | Meaning |
|---|---|---|
| suspicious | 0.0 – 0.49 | Pattern match, low certainty |
| likely | 0.50 – 0.79 | Multiple indicators align |
| confirmed | 0.80 – 1.0 | High-confidence detection |
All 26 threat categories detected across 269 rules:
access-control- Bypassing authentication, permission checks, ACL manipulationadversarial-evasion- Techniques to evade detection or bypass security controlsagent-autonomy-abuse- Agents acting beyond intended scope or authorizationagent-config-integrity- Tampering with agent configuration filesagent-memory-poisoning- Injecting false context into agent memory or conversation historycredential-extraction- Extracting credentials from storage, memory, or transitcredential-harvesting- Reading credential files, env vars containing secrets, AWS/SSH/API key accessdata-exfiltration- Sending data to external servers, clipboard theft, covert channelsfile-system-abuse- Unauthorized file reads/writes, traversal attacks, temp file abuseinsecure-config- Hardcoded secrets, debug modes in production, weak TLS, open CORSkill-chain-detection- Multi-step attack patterns combining multiple threat categoriesknown-malicious- Matched against known malware signatures and IOCsmalware-distribution- Dropper behavior, self-replication, payload deliverymalware-signatures- Matched against known malware binary and code signaturesmulti-agent-threats- Threats that spread across agent boundaries via shared context or toolsnetwork-abuse- Unexpected outbound connections, DNS tunneling, C2 beaconingpermission-bypass- Circumventing permission checks or access controlspermission-overgrant- Requesting excessive permissions beyond declared scopeprivilege-escalation- sudo, setuid, process injection, capability grantsprompt-injection- Instructions embedded in content to manipulate AI behaviorsecret-detection- API keys, tokens, passwords, private keys in source codesupply-chain- Dependency confusion, typosquatting, malicious transitive depssuspicious-behavior- Obfuscated code, anti-analysis techniques, anomalous patternsthird-party-content- Untrusted external content loaded without sanitizationtool-poisoning- MCP tool descriptions or metadata crafted to manipulate agent behaviorunsupervised-execution- Code execution without human oversight or approval gates
| Platform | Identifier | Config Locations |
|---|---|---|
| Claude Code Skills | claude |
~/.claude/skills/ |
| MCP Servers | mcp |
~/.config/mcp/, claude_desktop_config.json |
| OpenAI Codex Plugins | codex |
~/.codex/plugins/ |
| Cursor Extensions | cursor |
~/.cursor/extensions/ |
| CrewAI Agents | crewai |
crew.yaml, agents.yaml |
| AutoGPT Plugins | autogpt |
~/.autogpt/plugins/ |
| OpenClaw Skills | openclaw |
~/.openclaw/skills/, skills/ |
| Nanobot Agents | nanobot |
nanobot.yaml, agents/*.md |
| Supabase | supabase |
supabase/migrations/, supabase/config.toml |
| Code | Meaning |
|---|---|
| 0 | Scan passed (no threats, or all below --fail-on threshold) |
| 1 | Threats found above the severity threshold |
| 1 | No AI platforms detected |
| 1 | Scan engine error |
| Variable | Purpose |
|---|---|
FIRMIS_LICENSE_KEY |
Pro license key for monitor, pentest, fix, compliance |
FIRMIS_SYNC=1 |
Enable cloud sync without --sync flag |
ANTHROPIC_API_KEY |
Required for --deep LLM analysis |
CI=true |
Auto-detected; suppresses interactive prompts |
- Total rules: 269
- Rule files: 26 YAML files
- Threat categories: 26
- Secret detection patterns: 60 (within secret-detection category)
- npm package:
firmis-cli - Install:
npm install - g firmis-cli - Zero-install:
npx firmis-cli <command> - License: Apache-2.0
- Website: https://firmislabs.com