Skip to content

fix(bin): override semgrep pins to install patched mcp, wcmatch, otel - #15

Merged
Portll merged 1 commit into
mainfrom
fix/dependabot-python-20261124
Nov 24, 2026
Merged

Portll merged 1 commit into
mainfrom
fix/dependabot-python-20261124

Conversation

@Portll

@Portll Portll commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Closes Dependabot alerts 30, 31, 32, 33, 40, 42 and 43, all in container/requirements.txt.

Why Dependabot could not do this

semgrep 1.180.0 (locked) and 1.186.0 (latest) both declare mcp==1.29.0, opentelemetry-api~=1.37.0 and wcmatch~=8.3. Each has advisories fixed only in a later release, so no resolver reaches a fixed version while honouring those pins, and upgrading semgrep does not help.

What changes

  • container/overrides.txt: floors for the three packages and the opentelemetry packages that move with the API.
  • container/requirements.txt: regenerated in the pinned base image with uv pip compile --override. semgrep stays at 1.180.0; the lock still holds 72 packages.
Package Before After
mcp 1.29.0 1.30.0
wcmatch 8.5.2 11.2
bracex 3.0.1 3.2.4
opentelemetry-api, -sdk, -proto, -exporter-otlp-proto-common, -exporter-otlp-proto-http 1.37.0 1.45.2
opentelemetry-instrumentation, -instrumentation-requests, -instrumentation-threading, -semantic-conventions, -util-http 0.58b0 0.66b2
opentelemetry-exporter-http-transport, opentelemetry-exporter-otlp-common absent 0.66b2
importlib-metadata, zipp present dropped
  • container/licenses.json: the vendored opentelemetry-util-http licence pin moves to the 0.66b2 tag. The text at that tag has the same SHA-256.
  • container/README.md: the regeneration recipe now uses uv with the overrides file, and records why the overrides exist and when to drop them.
  • bin/test/container-dockerfile.test.mjs: a test that fails when the lock installs an overridden package below its floor. It fails on the previous lock (mcp: the lock installs 1.29.0, below the floor 1.30.0).

The image installs the lock with pip --require-hashes --no-deps, so pip does not re-check semgrep's declared pins.

Verification

  • bin/test/container-dockerfile.test.mjs, container-licenses.test.mjs, dependency-policy.test.mjs, docker-down-void.test.mjs, no-unpinned-fetch.test.mjs: 55 pass, 0 fail.
  • container/Dockerfile builds from this tree, including the licence collector.
  • sh container/smoke.sh <image> exits 0: 19 lanes ran confined, the semgrep lane among them.
  • semgrep 1.180.0 under the old lock and the new one, in the pinned base image: semgrep --version runs, semgrep mcp --help prints the same text, and scans of one fixture gave the same findings and the same scanned paths with no errors in three modes (no path flags, --exclude, --include). The fixture carries a .semgrepignore with ** patterns.
  • pip check reports semgrep's overridden requirements and nothing else.

Reachability before this change

  • mcp: semgrep imports it only for the semgrep mcp subcommand, which commitwork never runs.
  • wcmatch: used by semgrep's target manager, so reachable in principle through a scanned repository's file names and .semgrepignore patterns.
  • opentelemetry: the advisories concern parsing inbound trace-context headers.

Not in this change

Alert 39 (minimatch, through the renovate devDependency) has no version fix: every renovate release pins minimatch 10.2.6, and forcing minimatch 11 makes glob 10 under renovate return an empty list for **/*.js. Both places that run renovate are time-bounded.

@Portll
Portll merged commit 9ca5d71 into main Nov 24, 2026
44 of 46 checks passed
@Portll
Portll deleted the fix/dependabot-python-20261124 branch November 24, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant