Skip to content

Configuration Reference

You don’t need a config file. Most projects need exactly:

Terminal
npx firmis scan .

When you need to tune behavior — filter severity, target a specific platform, exclude test fixtures, or add custom rules — this page documents every available option.

Firmis reads configuration from three sources, in order of precedence (highest to lowest):

  1. CLI flags — highest precedence, override everything
  2. Config file (firmis.config.ts or firmis.config.json) — project-level defaults
  3. Built-in defaults — lowest precedence, applied when nothing is specified

The most common way to configure Firmis. Passed directly to any command.

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
--jsonbooleanfalseOutput findings as JSON
--sarifbooleanfalseOutput findings as SARIF 2.1.0
--htmlbooleanfalseOutput findings as HTML report
--output <file>stringstdoutWrite output to file instead of stdout
--config <file>stringPath to a custom config file
--ignore <rules>stringSkip specific rule IDs, comma-separated (e.g., sd-045,sd-046)
--concurrency <n>number4Number of parallel file workers
--verbosebooleanfalseShow detailed scan progress per file
--quietbooleanfalseSuppress terminal output; only emit exit code
--fail-fastbooleanfalseStop scanning on first critical finding
FlagTypeDefaultDescription
--platform <name>stringauto-detectInclude only this platform in the BOM
--output <file>stringstdoutSave BOM JSON to file
--verbosebooleanfalseEnable verbose logging
FlagTypeDefaultDescription
--fail-on <level>enumhighExit non-zero if findings at this severity or above
--format <fmt>enumsarifOutput format: sarif, json, html
--output <file>stringresults.sarifOutput file path
--platform <name>stringauto-detectLimit to specific platform
--verbosebooleanfalseEnable verbose logging
FlagTypeDefaultDescription
--jsonbooleanfalseOutput component list as JSON
--platform <name>stringauto-detectDiscover a specific platform only
--verbosebooleanfalseShow discovery details

For project-level defaults, create firmis.config.ts or firmis.config.json in your project root.

firmis.config.ts
import type { FirmisConfig } from 'firmis-scanner'
const config: Partial<FirmisConfig> = {
// Minimum severity to report (low | medium | high | critical)
severity: 'medium',
// Output format (terminal | json | sarif | html)
output: 'terminal',
// Platforms to scan — omit to auto-detect all
platforms: ['claude', 'mcp'],
// Custom rule directories to load in addition to built-in rules
customRules: ['./rules/custom'],
// Paths to exclude from scanning
exclude: ['test/fixtures/', 'node_modules/', 'dist/'],
// Rule IDs to skip globally
ignoreRules: ['sd-045', 'sd-046'],
// Exit non-zero if findings at this severity or above
failOnSeverity: 'high',
// Parallel file workers
concurrency: 4,
// Stop on first critical finding
failFast: false,
// Suppress terminal output
quiet: false,
// Verbose scan progress
verbose: false,
}
export default config
firmis.config.json
{
"severity": "medium",
"output": "terminal",
"platforms": ["claude", "mcp"],
"customRules": ["./rules/custom"],
"exclude": ["test/fixtures/", "node_modules/", "dist/"],
"ignoreRules": ["sd-045", "sd-046"],
"failOnSeverity": "high",
"concurrency": 4,
"failFast": false,
"quiet": false,
"verbose": false
}

All fields in the FirmisConfig interface. All fields are optional — omit any field to use the built-in default.

FieldTypeDefaultDescription
severitylow | medium | high | criticallowMinimum severity level to report
outputterminal | json | sarif | htmlterminalOutput format for findings
outputFilestringstdoutFile path for JSON, SARIF, or HTML output
platformsPlatformType[]auto-detectPlatforms to scan; omit to auto-detect all 8
targetPathstringcwdTarget directory to scan; overrides platform default paths
customRulesstring[][]Additional rule directories to load alongside built-in rules
excludestring[][]Glob patterns or paths to exclude from scanning
ignoreRulesstring[][]Rule IDs to skip (same as --ignore flag)
failOnSeveritySeverityLevelExit with code 1 if findings at this severity or above
failFastbooleanfalseStop on first critical finding
concurrencynumber4Number of parallel file analysis workers
verbosebooleanfalseEnable detailed per-file scan progress output
quietbooleanfalseSuppress all terminal output; only emit exit code
onProgressfunctionCallback fired at scan milestones (TypeScript API only)
Valid platform names
type PlatformType =
| 'claude' // Claude Skills (CLAUDE.md, .claude/)
| 'mcp' // MCP Servers (mcp.json, .vscode/mcp.json)
| 'codex' // Codex Plugins (codex.json, .codex/)
| 'cursor' // Cursor Rules (.cursorrules, .cursor/)
| 'crewai' // CrewAI Agents (crew.yaml, agents/)
| 'autogpt' // AutoGPT Plugins (auto_gpt_plugin_template)
| 'openclaw' // OpenClaw Skills (openclaw.yaml)
| 'nanobot' // Nanobot Plugins (nanobot.json)
Valid severity levels
type SeverityLevel = 'low' | 'medium' | 'high' | 'critical'

Built-in defaults (FirmisConfig)
const DEFAULT_CONFIG = {
severity: 'low', // Report all findings including low severity
output: 'terminal', // Color-coded terminal output
verbose: false, // No per-file progress
concurrency: 4, // 4 parallel workers
failFast: false, // Scan all files before stopping
}

Firmis does not currently read configuration from environment variables. Use CLI flags or a config file for CI/CD environments.

.github/workflows/firmis.yml
- name: Scan with custom severity
run: npx firmis scan --severity high --fail-on high --sarif --output results.sarif

If firmis.config.ts sets severity: 'medium' and you run:

Terminal
npx firmis scan --severity low

The CLI flag --severity low wins. You see all findings including low severity.