Tamp wrapper for the
opengrepSAST CLI. Pattern-matching analyzer forked from Semgrep with multi-vendor governance (no Pro paywall). Emits SARIF by default so downstream sinks likeTamp.DefectDojo.V2consume it directly.
| Package | Status |
|---|---|
Tamp.OpenGrep |
Wave 1 |
opengrep is not in any of the usual package-manager registries — no winget manifest, no scoop bucket, no Homebrew formula, no PyPI package, no NuGet tool. The only supported install path is downloading the high-level CLI from the project's GitHub Releases.
The release artifacts split into two binary families. You want the opengrep_* family (the high-level CLI), not opengrep-core_* (the low-level OCaml engine). Tamp.OpenGrep wraps the high-level CLI.
| Platform | Asset |
|---|---|
| Linux x86_64 (glibc) | opengrep_manylinux_x86 |
| Linux aarch64 (glibc) | opengrep_manylinux_aarch64 |
| Linux x86_64 (musl) | opengrep_musllinux_x86 |
| Linux aarch64 (musl) | opengrep_musllinux_aarch64 |
| macOS x86_64 | opengrep_osx_x86 |
| macOS arm64 (Apple Silicon) | opengrep_osx_arm64 |
| Windows x64 | opengrep_windows_x86.exe |
Each artifact ships with a matching .sig (Sigstore signature) and .cert (signing certificate) for verification — see Verifying signatures below.
# Adjust ASSET for your platform from the table above.
ASSET=opengrep_osx_arm64
curl -L -o /usr/local/bin/opengrep \
"https://github.com/opengrep/opengrep/releases/latest/download/${ASSET}"
chmod +x /usr/local/bin/opengrep
opengrep --version$dest = "$env:LOCALAPPDATA\opengrep\opengrep.exe"
New-Item -ItemType Directory -Force (Split-Path $dest) | Out-Null
Invoke-WebRequest `
-Uri "https://github.com/opengrep/opengrep/releases/latest/download/opengrep_windows_x86.exe" `
-OutFile $dest
# Add the install dir to PATH for the current user (one-time).
[Environment]::SetEnvironmentVariable(
"PATH",
[Environment]::GetEnvironmentVariable("PATH","User") + ";$(Split-Path $dest)",
"User")
# Open a new shell, then:
opengrep --versionTamp.OpenGrep emits CommandPlan { Executable = "opengrep", ... } — the binary must be on PATH or invoked via a wrapping Tool injected by the adopter.
Releases are signed with Sigstore. To verify the binary you downloaded:
# Install cosign (https://docs.sigstore.dev/system_config/installation/).
ASSET=opengrep_osx_arm64
curl -L -o "${ASSET}" "https://github.com/opengrep/opengrep/releases/latest/download/${ASSET}"
curl -L -o "${ASSET}.sig" "https://github.com/opengrep/opengrep/releases/latest/download/${ASSET}.sig"
curl -L -o "${ASSET}.cert" "https://github.com/opengrep/opengrep/releases/latest/download/${ASSET}.cert"
cosign verify-blob \
--certificate "${ASSET}.cert" \
--signature "${ASSET}.sig" \
--certificate-identity-regexp 'https://github.com/opengrep/opengrep/.*' \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
"${ASSET}"using Tamp;
using Tamp.OpenGrep;
class Build : TampBuild
{
public static int Main(string[] args) => Execute<Build>(args);
[FromPath("opengrep")] readonly Tool OpenGrep = null!;
Target Sast => _ => _.Executes(() => OpenGrep.Scan(s => s
.AddRulePack("auto")
.AddTarget("src")
.EmitSarif("artifacts/opengrep.sarif")
.DisableVersionCheck()
.Quiet()));
}Tamp's install-source attributes ([FromPath], [FromNodeModules], [NuGetPackage]) cover the registries adopters typically reach for. opengrep doesn't currently distribute through any of them — it ships exclusively as signed binaries on GitHub Releases. If opengrep later publishes to winget / scoop / Homebrew / PyPI / NuGet, this README will be updated and (optionally) the wrapper can grow a matching install attribute.
MIT — see the LICENSE at the repo root.