Back to directory

Developer Tools · Code Analysis & Transformation

Opengrep

Open source SAST using Semgrep-compatible rules and native binaries

Opengrep is an LGPL-2.1 static application security testing engine for developers and teams that want Semgrep-compatible scanning without a proprietary control plane. It is free to run locally or in CI, and the project does not publish an Opengrep hosted service or paid SaaS plan.

Key facts

License
LGPL-2.1
Main language
OCaml
Maintainer
Opengrep community, backed by Aikido, Amplify, Endor Labs, Kodem, and Orca Security
First released
2025
Latest release
v1.31.0, October 15, 2026
GitHub stars
3.2k, October 2026
Hosted option
None published

What Opengrep is

Opengrep is a command-line static application security testing engine forked from Semgrep 1.100.0. It launched publicly on January 23, 2025, with backing from a consortium that includes Aikido, Amplify, Endor Labs, Kodem, and Orca Security. The GitHub repository lists 3,214 stars and ten leading contributors, while the repository language listing identifies OCaml as the main implementation language. The maintainers present Opengrep as an open source continuation after Semgrep moved important security features behind commercial licensing. Its LGPL-2.1 license and Semgrep-compatible rules make it useful for teams that want local scanning and control over their rule files. It remains an engine for developer and CI workflows, rather than a complete security platform with hosted storage, dashboards, or managed triage.

How it works

Opengrep scans source trees with semantic patterns and taint rules, then writes findings to terminal, JSON, or SARIF output. A normal workflow starts with a YAML rule file, a repository target, and the opengrep scan command. Teams can reuse compatible Semgrep rules or write rules for local coding standards and security checks. Intrafile taint analysis follows data flows between functions within one file when the taint-intrafile option is enabled. The test command helps rule authors check expected matches, while exclusions, custom ignore annotations, text report skins, and timeout controls adjust scans for different repositories. CI systems can consume SARIF or JSON, and command-line output includes locations, rule identifiers, messages, and scan summaries.

Architecture and recent releases

Opengrep is primarily implemented in OCaml and uses OCaml 5 for multicore execution. Supporting repository code includes C, C++, Go, JavaScript, Python, Shell, and other languages, but OCaml is the core implementation language. The project supports more than 30 source and configuration languages, including C, C++, C#, Crystal, Elixir, Go, Java, JavaScript, PHP, Python, Ruby, Rust, Terraform, TypeScript, Visual Basic, and YAML. It distributes self-contained binaries for Linux, macOS, and Windows. The v1.31.0 release was published on October 15, 2026, with OCaml 5.5.1 builds and performance changes. The separate 2.0.0 nopython and interfile alpha releases are marked for testing only, so they do not define the stable feature set.

License and pricing

LGPL-2.1 permits commercial use, modification, redistribution, and linking subject to the license obligations, including requirements that apply to covered library modifications and distribution. Opengrep documents describe the engine as free and publish no hosted pricing, enterprise tiers, support contracts, or managed service. Teams therefore provide their own CI runners, rule maintenance, result storage, integrations, and triage process. The consortium supplies project backing and development resources, while the project does not state a subscription price. Organizations that redistribute Opengrep should review LGPL requirements and the separate license for every rule set they include. This distinction matters because the engine license does not automatically determine the license of external rules.

Limitations and how it compares

The stable engine is single-file, command-line focused, and dependent on user-maintained rules. It does not include built-in dependency scanning, secrets scanning, hosted dashboards, team triage, or cross-file analysis. Semgrep CE is the closest open source alternative when community rules, IDE extensions, and pre-commit support matter more than self-contained packaging. Semgrep AppSec Platform is proprietary and adds cross-file analysis, maintained Pro rules, dependency and secrets scanning, reporting, and managed workflows, with a free tier for up to ten contributors and ten private repositories, then pricing from $30 per contributor monthly. CodeQL is another open source option for query-based analysis and GitHub integration. Pick Opengrep for local control, open licensing, and teams willing to own their rules and CI workflow.

Main features

  • Semantic Pattern Rules. YAML rules match structural code patterns across more than 30 languages instead of relying only on textual search.
  • Intrafile Taint Analysis. The taint-intrafile option tracks flows across functions within one file and supports higher-order function cases.
  • Semgrep Compatibility. Existing Semgrep-compatible rules can be reused, reducing migration work for teams with established rule files.
  • SARIF And JSON. JSON and SARIF outputs expose findings, fingerprints, metavariables, and locations for CI processing and external reporting.
  • Native Binary Packages. Self-contained OCaml binaries run on Linux, macOS, and Windows without requiring Python on the target environment.
  • Rule Execution Controls. Per-rule timeouts, dynamic timeouts, match limits, exclusions, ignore annotations, and output controls tune large scans.
  • Signed Releases. Release documentation describes Cosign-signed binaries, allowing teams to verify downloaded artifacts before installation.

Self-hosting Opengrep

Opengrep is a local executable rather than a server requiring PostgreSQL, Redis, object storage, Helm, or a control-plane cluster. Linux and macOS users can use the project installation script, Windows users can use the PowerShell script, and all platforms can use release binaries. The packages include self-contained builds for supported Linux, macOS, and Windows architectures, with Python not required for those binaries. A typical deployment is one CI job per repository that reads source and rules, then writes terminal, JSON, or SARIF output to the runner workspace. Pin versions, verify release signatures, keep rules with code, and test upgrades against representative repositories. The project publishes no minimum hardware or backup requirement.

Strengths

  • LGPL-2.1 licensing permits commercial internal use of the scanning engine.
  • Self-contained binaries avoid installing Python on developer machines and CI runners.
  • Semgrep-compatible rules reduce migration work for existing rule authors.
  • Intrafile taint analysis is available without a paid engine tier.

Drawbacks

  • Stable analysis remains single-file, so cross-file data flows are outside its scope.
  • Teams must source, review, update, and operate their own rules and reporting workflow.
  • The command-line engine lacks hosted dashboards, IDE integrations, dependency scanning, and secrets scanning.

What teams replace with it

Teams usually evaluate Opengrep when they want to move off Semgrep AppSec Platform, Snyk Code, Checkmarx.

For side-by-side commercial comparisons, browse our alternatives hub.

Open-source alternatives to Opengrep

  • Semgrep CE
  • CodeQL
  • Joern
  • Bearer

Frequently asked questions

Is Opengrep free to use?

Yes. The engine is published under LGPL-2.1, and the project publishes no subscription, hosted service, or paid enterprise tier. Operating costs still include CI runners, result storage, rule development, and triage. Opengrep is a command-line engine, so teams assemble those surrounding services themselves instead of receiving a managed application security platform.

Can companies use Opengrep commercially?

LGPL-2.1 permits commercial use, modification, and redistribution subject to its conditions. Companies can run Opengrep internally, include it in CI, and build workflows around it. Redistribution and modifications require license compliance, particularly for covered library changes. Rules may have separate licenses, so teams should review each rule repository before bundling rules into products or services.

How do you self-host Opengrep?

Install the Linux or macOS script, run the Windows PowerShell installer, or download a release binary. Opengrep does not require a database, Redis, object storage, or server control plane. A CI runner executes scans against source and rule files, then stores JSON or SARIF results wherever the team chooses. Pin versions and verify signed artifacts during upgrades.

How does Opengrep compare with Semgrep CE?

Both are free single-file engines using compatible rule syntax. Opengrep adds intrafile cross-function taint analysis, self-contained binaries, signed releases, and additional parsers such as Visual Basic and Crystal. Semgrep CE provides community rules, IDE extensions, and pre-commit support, and connects to Semgrep’s broader platform. Choose Opengrep for open distribution control, or Semgrep CE for packaged integrations.

Does Opengrep keep source code private?

The command-line engine scans locally or on a team-controlled CI runner, and its documented workflow does not require sending source to an Opengrep hosted service. Privacy therefore depends on the runner, CI logs, artifact storage, and integrations the team adds. Review rule files and SARIF retention settings, restrict CI permissions, and avoid publishing reports that contain sensitive source context.

Sources

Last updated 2026-10-22.