Bearer CLI
$ bearer Official Low RiskBearer CLI scans source code for SAST vulnerabilities, hardcoded secrets, and sensitive data-flow privacy risks across JS/TS, Python, Ruby, Go, Java, and PHP. It runs headlessly offline with --format json or sarif, --severity filtering, and --diff branch scanning.
brew install bearer/tap/bearer bearer scan performs local Tree-sitter AST and data-flow analysis in one binary with --format json, avoiding remote code upload via MCP.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Clean headless CLI with --format json|sarif|yaml, --severity, --scanner, --diff, and --exit-code override.
- Supports
--format json,--format sarif,--severity, and--exit-code
Strictly local read-only AST/data-flow scan that never mutates source files or executes target code.
- Read-only static analysis; writes only when
--outputpath is given
Single Go/CGo binary installed via brew install bearer/tap/bearer, Docker, or GitHub Releases.
- Cross-platform binary and Homebrew tap
Combines SAST, secrets, and PII/sensitive data-flow mapping in one fast pass.
- Multi-scanner
--scanner sast,secretsand--report dataflow
Official project by Bearer (acquired by Cycode); widely adopted static scanner.
- Official Bearer/bearer GitHub repository
Well-organized docs covering CLI flags, env vars (BEARER_FORMAT), and rule catalogs.
- Official docs at docs.bearer.com
Security, Auth & Guardrails
None required for local scans; optional bearer.yml stores rule and severity settings.
Free for internal/self-hosted use under Elastic License 2.0 (ELv2); managed SaaS hosting is restricted by ELv2.
# Bearer CLI Agent Rules - Always specify `--format json` or `--format sarif` and filter noisy findings with `--severity critical,high`. - Use `--exit-code 0` only when downstream steps parse the JSON report directly rather than relying on CI failure exit codes.
Agent-Ready Command Recipes
Safe Read-Only Queries
bearer scan . --scanner sast,secrets --format json --exit-code 0
Scans . for code vulnerabilities and secrets, printing JSON to stdout while normalizing exit code (--exit-code 0) for report ingestion.
bearer scan . --severity critical,high --format sarif --output bearer.sarif
Limits output to critical and high severity issues and saves a SARIF report to bearer.sarif.
Strengths for Agents
- + Sensitive data-flow classification plus SAST and secrets scanning in a single local pass.
- + Flexible
--format json|sarif,--severity, and--exit-codeflags for agent automation.
Caveats & Pitfalls
- ! Licensed under ELv2-2.0 (not OSI-approved open source; prohibits offering as a managed SaaS).
- ! Requires the
bearer/tap/bearertap on Homebrew rather than Homebrew core.