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

Opengrep

$ opengrep Community Low Risk
Opengrep · Security & Secrets · LGPL-2.1 · macos / linux

Opengrep is the LGPL-2.1 open-source fork of Semgrep CE preserving interfile taint analysis and multi-language pattern rules without commercial feature gates. opengrep scan supports --config, --json, --sarif, --exclude, and --dataflow-traces in clean headless execution.

FCRS-1.0 Score
88 /100
Good
Medium Confidence
Zero-Friction Install
https://github.com/opengrep/opengrep/releases
CLI vs MCP Decision CLI Only

opengrep scan --json runs full AST and taint analysis locally on disk without uploading source files to an external MCP service.

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 23 / 25

Full non-interactive SAST runner with --json, --sarif, --config, -e inline patterns, and --dataflow-traces.

  • Supports --json, --sarif, -o, and --config
Trust & Safety 23 / 25

Read-only static analysis by default; only writes to disk if --autofix or -o output path is explicitly passed.

  • Read-only by default unless --autofix is requested
Setup & Portability 12 / 15

Prebuilt standalone binaries for macOS and Linux via GitHub Releases and install script; native Windows requires WSL.

  • Official macOS/Linux binaries; no native Windows binary
Utility & Efficiency 14 / 15

Retains cross-function/interfile taint analysis (--interfile-depth) and Semgrep rule compatibility fully open-source.

  • Multi-language AST + interfile taint engine
Maintenance & Lineage 8 / 10

Community-backed open-source fork supported by multiple AppSec vendors and contributors.

  • Active repository at github.com/opengrep/opengrep
Docs & Verifiability 8 / 10

Clear CLI reference and rule-syntax documentation at opengrep.dev.

  • Official docs at opengrep.dev/docs/

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

None required for local rule scans; custom YAML rulesets live locally or at specified --config URLs.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free and open-source (LGPL-2.1).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Opengrep Agent Rules
- Keep scans read-only by omitting `--autofix` unless automated code rewrites are explicitly approved.
- Pass explicit `--config <path>` and `--json` or `--sarif` for deterministic offline parsing.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run local SAST scan with JSON output
opengrep scan --config ./rules/ --json .

Evaluates local YAML rules in ./rules/ against the workspace and prints structured JSON findings to stdout.

Search code with an inline pattern and SARIF output
opengrep scan -e 'eval($X)' --sarif -o opengrep.sarif .

Runs an ad-hoc pattern query (-e) across files and writes SARIF results to opengrep.sarif.

Strengths for Agents

  • + Fully open-source LGPL-2.1 engine with interfile taint analysis and Semgrep YAML compatibility.
  • + Clean --json and --sarif outputs plus ad-hoc -e pattern matching.

Caveats & Pitfalls

  • ! No native Windows binary outside WSL; Homebrew core packaging varies.
  • ! Using --config auto fetches rules over the network unless local --config rules are supplied.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI