Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Bearer CLI

$ bearer Official Low Risk
Bearer · Security & Secrets · ELv2-2.0 · macos / linux / windows

Bearer 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.

FCRS-1.0 Score
87 /100
Good
Medium Confidence
Zero-Friction Install
brew install bearer/tap/bearer
CLI vs MCP Decision CLI Only

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

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Clean headless CLI with --format json|sarif|yaml, --severity, --scanner, --diff, and --exit-code override.

  • Supports --format json, --format sarif, --severity, and --exit-code
Trust & Safety 23 / 25

Strictly local read-only AST/data-flow scan that never mutates source files or executes target code.

  • Read-only static analysis; writes only when --output path is given
Setup & Portability 13 / 15

Single Go/CGo binary installed via brew install bearer/tap/bearer, Docker, or GitHub Releases.

  • Cross-platform binary and Homebrew tap
Utility & Efficiency 13 / 15

Combines SAST, secrets, and PII/sensitive data-flow mapping in one fast pass.

  • Multi-scanner --scanner sast,secrets and --report dataflow
Maintenance & Lineage 8 / 10

Official project by Bearer (acquired by Cycode); widely adopted static scanner.

  • Official Bearer/bearer GitHub repository
Docs & Verifiability 8 / 10

Well-organized docs covering CLI flags, env vars (BEARER_FORMAT), and rule catalogs.

  • Official docs at docs.bearer.com

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

None required for local scans; optional bearer.yml stores rule and severity settings.

Side Effects
Read-Only Local Write
Cost & Quotas

Free for internal/self-hosted use under Elastic License 2.0 (ELv2); managed SaaS hosting is restricted by ELv2.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Run SAST and secrets scan with JSON output
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.

Filter high/critical findings as SARIF
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-code flags 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/bearer tap on Homebrew rather than Homebrew core.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI