# Semgrep v1.165.0 — Release v1.165.0 - Product: Semgrep (https://whatsnew.fyi/product/semgrep) - Vendor: Semgrep, Inc. - Date: 2026-06-03 - Version: v1.165.0 - Original notes: https://github.com/semgrep/semgrep/releases/tag/v1.165.0 - Permalink: https://whatsnew.fyi/product/semgrep/releases/v1.165.0 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **added** — Added `--max-match-context-size` option to limit the number of characters of source code included as context for each match in the output, with a default value of 0 for unlimited - **changed** — Replaced `--x-no-python-schema-validation` with a value-taking `--x-rule-validation=full|core-only|none` flag, where `full` is the default and preserves existing Python rule validation behavior - **changed** — Updated Python grammar - **fixed** — Added bit shift operations to metavar comparison in addition to standard arithmetic operators and logical bit ops - **fixed** — Reduce intermittent `validation_error` results on HTTP secret validators by retrying transient network failures ##### [1.165.0](https://github.com/semgrep/semgrep/releases/tag/v1.165.0) - 2026-06-03 ###### ### Added - Added `--max-match-context-size` option to limit the number of characters of source code included as context for each match in the output. This prevents matches in minified files (e.g., minified JavaScript where the entire file is a single line) from producing enormous output Set to 0 for unlimited, which is the default value. (ENGINE-2117) ###### ### Changed - Replaced `--x-no-python-schema-validation` with a value-taking `--x-rule-validation=full|core-only|none` flag. The default (`full`) preserves existing Python rule validation behavior; `core-only` matches the old flag's semantics (disables Python rule validation and uses semgrep-core RPC validation only); `none` skips both pre-validation passes, surfacing rule errors at scan-time. `--x-no-python-schema-validation` is still accepted as a no-op with a deprecation warning, and will be removed in a future release. (x-rule-validation) - Python: Updated Python grammar (LANG-201) ###### ### Fixed - Added bit shift operations to metavar comparison in addition to already present standard arithmetic operators and logical bit ops. (ENGINE-2448) - Reduce intermittent `validation_error` results on HTTP secret validators (Facebook, Slack, Stripe, Google, Cloudflare, etc.) by retrying transient network failures, mirroring the retry behavior already present for AWS validators. (SCRT-965)