semgrep_findings tool: added a refs parameter to filter findings by branch (defaults to the primary branch when not specified), and made autotriage_verdict optional so that findings without an AI verdict can also be returned. (engine-2723)import and importstr now reject paths that resolve outside the
rule file's parent directory. (ENGINE-2727)Authorization header
values from git error messages and from the captured tracebacks sent to
the fail-open telemetry endpoint, preventing leaks of secrets like
CI_JOB_TOKEN from a failed git fetch in GitLab CI. Also closes
ENGINE-2731 (raw, unsanitized tracebacks in fail-open telemetry). (ENGINE-2728)semgrep ci no longer transmits SCM tokens to the Semgrep Platform. (ENGINE-2729)~/.semgrep/semgrep.log or $SEMGREP_LOG_FILE) now respects the requested log level instead of always being written at DEBUG. This narrows the surface for credentials to land on disk via CI runner filesystems or job artifacts; pass --debug to restore the previous behavior. (ENGINE-2730)imports
or runtime function calls that recurse forever. (ENGINE-2727-dos)Release notes include the changes, fixes, and additions in specific versions of Semgrep.
--no-x-run-taint-once as a flag. (engine-2468)SEMGREP_DISABLE_CONFIG_DOWNLOAD_V2=1 to fall back to the legacy endpoint. (SMS-2284)codeFlows. (engine-2570)$C.getInstance(...), and then
use metavariable-type on $C to check its type. (LANG-271)metavariable-type. (LANG-271)semgrep ci when run in a git repo with no remote origin set (gh-11342)Removed the experimental and undocumented command semgrep install-ci. (osemgrep-install-ci)
Migrate from publishing a single Linux wheel with the platform tag musllinux_1_0_<arch>.manylinux2014_<arch> to publishing two separate wheels:
(pypi-linux-tag)
--secrets-timeout flag. (engine-2593)Release notes include the changes, fixes, and additions in specific versions of Semgrep.
semgrep ci with --debug and no blocking findings. The Windows subprocess path incorrectly raised an exception for all pysemgrep exit codes (including 0), which was silently swallowed in normal mode but propagated as a fatal error when --debug was active. (ENGINE-2491)-j) (engine-2512)semgrep scan $(git ls-files '*.py')) caused one semgrep-core
subprocess to be spawned per file. Roots that are not directories are now
handled directly in Python without any subprocess overhead. (gh-11404)for-yield (LANG-193)def f (a: t) =
foo()
bar()
``` (lang-194)
Hooks (for both Claude Code and Cursor) now pull custom rules from the registry (custom-rules-hooks)
Turned on DNS rebinding protection for the MCP server (dns-check)
Environment variables can now be passed to third-party package managers invoked as part of --allow-local-builds dependency resolution via the environment variable SEMGREP_LOCAL_BUILD_ENV, which accepts a JSON object with string keys and string values. (SC-3163)
Memory management policies
A memory policy defines how OCaml's garbage collector should be configured for
a scan. There are two initial policies: "aggressive", the current behaviour,
which trades longer scan times for lower memory use, and "balanced", which
finds a middle ground between reclaiming heap memory in short order while
limiting how often the garbage collector runs. The policy can be configured
via the --x-mem-policy CLI flag for the pro engine; this flag is unused in
the OSS engine. (engine-2055)
Added experimental support for the OpenFGA authorization language. Thanks to Alex Useche (@hex0punk) for the contribution! (gh-11347)
Allows case insensitive string comparisons using lower() and upper() like this:
- metavariable-comparison:
metavariable: $VALUE
comparison: upper(str($VALUE)) == "SEMGREP"
(gh-11502)
Blocking findings that are outputted in the CI output are now labelled as such. (#4394)
glom to at least version 23.3, which includes a fix to a SyntaxWarning
warning log. (gh-11460)Release notes include changes, fixes, and additions for specific Semgrep versions.
pipenv to uv for ./cli package management (uv)-alpha in 1.2.3-alpha. (sc-3001)Target objects. Performance should improve on
large repo scans proportionally to the number of files in the repo. (gh-5407)semgrep ci no longer applies autofixes to disk, even when the "Suggest autofixes" toggle in the app is enabled. (saf-2446)Release notes include the changes, fixes, and additions in specific versions of Semgrep.
gradle*.lockfile are now supported. Previously, only lockfiles named exactly gradle.lockfile were supported. (SC-2999)semgrep login now supports a --force flag, which ignores existing tokens and starts a new login session. The MCP setup workflow has been updated to use --force too. (saf-2392)