# Overrides for security-scan-tools.txt (passed via `uv pip compile --override`).
#
# semgrep (latest 1.178.0) still pins pyjwt~=2.13.0, which carries a stack of
# PyJWT advisories fixed in 2.14.0/2.15.0. semgrep only imports jwt in its MCP
# token verifier, which the CI scan never runs. Because this forces a version
# outside semgrep's declared range, security-scan.yml installs the compiled
# file with --no-deps (every transitive dep is already hash-pinned in it).
# Drop this once semgrep relaxes its pin.
pyjwt[crypto]>=2.15.1

# semgrep (latest 1.181.0) pins mcp==1.29.0, which is affected by
# GHSA-84m7-p3x7-pcfv (unbounded Streamable HTTP sessions), fixed in 1.30.0.
# semgrep only imports mcp for `semgrep mcp`, which the CI scan never runs.
# Capped below 2 so the override stays on the 1.x API semgrep was built for.
# Drop this once semgrep moves its pin to 1.30.0 or later.
mcp>=1.30.0,<2

# semgrep (latest 1.183.0) pins opentelemetry-api/sdk/exporter ~=1.37.0, which is
# affected by GHSA-xcq7-p3pf-p88h (O(N^2) W3C tracestate header parsing),
# fixed in 1.45.1. semgrep uses OpenTelemetry only to export its own outbound
# spans (--trace) and never parses an inbound tracestate header. The whole
# family moves together; `semgrep --config=auto` / `p/python` results on
# semantica/ are identical on 1.37.0 and 1.45.2, and `--trace` still exports.
# Drop this once semgrep moves its pin to 1.45.1 or later.
opentelemetry-api>=1.45.1,<2
opentelemetry-sdk>=1.45.1,<2
opentelemetry-proto>=1.45.1,<2
opentelemetry-exporter-otlp-proto-common>=1.45.1,<2
opentelemetry-exporter-otlp-proto-http>=1.45.1,<2
opentelemetry-instrumentation-requests>=0.66b1,<1
opentelemetry-instrumentation-threading>=0.66b1,<1

# semgrep 1.175.0 pins wcmatch~=8.3, which is affected by GHSA-53pm-wgxf-c6qf
# (polynomial-time ReDoS when a pattern with several `*` wildcards is matched
# against an attacker-supplied file name), fixed in 11.2. semgrep only calls
# `glob.globmatch(path, pattern, flags=GLOBSTAR | DOTGLOB)` from
# target_manager.py. Across 34 representative include/exclude patterns over
# all 1,514 tracked paths in this repo (51,476 pairs), 8.5.2 and 11.2 return
# identical results; the advisory's own probe pattern against a 150-character
# name takes 9.4s on 8.5.2 and under 1ms on 11.2.
# Capped below 12: 12.0.4 changes how a pattern ending in `/**/` matches, and
# semgrep hands such patterns to wcmatch verbatim when a rule's own
# include/exclude ends with `/**/` (preprocess_path_patterns turns `foo/**/`
# into `**/foo/**/` and `**/foo/**/**`). On this repo's 1,514 tracked paths,
# 11.2 matches 456 of them with `**/semantica/**/` — the 454 files under
# semantica/ plus .claude/skills/semantica/{SKILL.md,init} — and 12.0.4
# matches none. The patterns semgrep builds for an ordinary rule,
# `**/semantica/**` and `/semantica/**`, behave identically on both versions
# (456 and 454), so this cap guards against a rule we cannot enumerate here,
# not a failure observed today. The scan itself reports 454 targets, which is
# exactly the number of tracked files under semantica/.
# Drop this once semgrep relaxes its pin to 11.2 or later.
wcmatch>=11.2,<12
