Skip to content

fix(toolbox): drop the PyJWT override, which semgrep 1.183.0 made redundant - #100

Merged
garymike merged 1 commit into
mainfrom
fix/drop-pyjwt-override
Oct 30, 2026
Merged

garymike merged 1 commit into
mainfrom
fix/drop-pyjwt-override

Conversation

@garymike

Copy link
Copy Markdown
Owner

The override existed for a real reason: semgrep pinned pyjwt[crypto]~=2.13.0, which held PyJWT at 2.13.0 and therefore at CVE-2026-102268 (CRITICAL, fixed in 2.14.0). sast-toolbox and skill-audit-toolbox each installed 2.15.1 with --no-deps to defeat that constraint.

As of semgrep 1.183.0 the constraint is pyjwt[crypto]<3,>=2.15.0. The resolver cannot reach a vulnerable version, and an explicit pin would only drift out of step with semgrep's own floor.

Measured, not reasoned

Semgrep declaring a floor of >=2.15.0 is not the same as the resolver landing above 2.14.0, and this override existed for a CRITICAL. So both images were built without it and asked what they actually got:

image resolved PyJWT semgrep verdict
sast-toolbox 2.15.1 1.183.0 OK, >= 2.14.0
skill-audit-toolbox 2.15.1 1.183.0 OK, >= 2.14.0

2.15.1 is exactly what the override was forcing, so removing it changes nothing about what ships. It was redundant in fact, not just in principle.

gate-proof.sh against the override-free image:

16 assertions, 16 PASS, 0 FAIL

  gecko-demo               64/100    exit 1, BLOCKS
  gecko-hook-demo          76/100    exit 1, BLOCKS
  config-injection-demo    100/100   exit 1, BLOCKS
  sibling-config-demo      51/100    exit 1, BLOCKS
  memory-poisoning-demo    0/100     exit 0, does NOT block

All five scores unchanged, which matters because the gate's malice layer rides on semgrep.

A trace, not a clean deletion

Both Dockerfiles keep a comment explaining the absence:

PyJWT is deliberately NOT pinned here. It used to be: semgrep pinned pyjwt[crypto]~=2.13.0 … Re-add one only if semgrep's lower bound ever drops below 2.14.0 again.

Deleting outright would leave the next person reading CVE-2026-102268 against these images unable to tell whether the override was dropped deliberately or never existed. The comment also names the one condition that would justify re-adding it, so the decision does not have to be re-derived.

toolbox/tools.lock loses its two pyjwt entries, one per image that carried the override.

Expect Image pins to go red on merge

This changes toolbox/, so the pins will no longer match the repo's build inputs and the follow-up pin move applies. scripts/move-image-pins.py now exists for exactly that and will permit itself to run, since the check will genuinely be red rather than green.

…undant

The override existed because semgrep pinned pyjwt[crypto]~=2.13.0, which held PyJWT at 2.13.0
and therefore at CVE-2026-102268 (CRITICAL, fixed in 2.14.0). sast-toolbox and
skill-audit-toolbox each installed 2.15.1 with --no-deps to defeat that constraint. As of
semgrep 1.183.0 the constraint is pyjwt[crypto]<3,>=2.15.0, so the resolver cannot reach a
vulnerable version, and an explicit pin would only drift out of step with semgrep's floor.

Measured rather than reasoned, because semgrep declaring a floor is not the same as the
resolver landing above it, and this override existed for a CRITICAL. Built both images without
it:

  sast         pyjwt=2.15.1  semgrep=1.183.0
  skill-audit  pyjwt=2.15.1  semgrep=1.183.0

2.15.1 is exactly what the override was forcing, so removing it changes nothing about what
ships. gate-proof.sh passes 16 of 16 against the image built without it, with all five fixture
scores unchanged.

A comment stays in both Dockerfiles instead of a clean deletion. Without it the next person
reading CVE-2026-102268 against these images cannot tell whether the override was dropped
deliberately or never existed, and it names the condition for re-adding one: semgrep's lower
bound dropping below 2.14.0 again.

tools.lock loses its two pyjwt entries, one per image that carried the override.
@garymike
garymike merged commit 521b738 into main Oct 30, 2026
9 checks passed
@garymike
garymike deleted the fix/drop-pyjwt-override branch October 30, 2026 22:57
garymike added a commit that referenced this pull request Oct 30, 2026
…blished (#101)

The follow-up half of #100, so callers resolve images built without the PyJWT override rather
than with it. Nothing about the installed toolchain changes: both images resolve PyJWT 2.15.1
either way, which is what made the override safe to drop.

First run where scripts/move-image-pins.py PERMITTED the move rather than refusing. Every
earlier invocation either refused because the check was green or needed --force; here the
check was genuinely red and the guard named the five workflows that were behind before doing
anything. The direction the guard exists for, now exercised.

Verified as always: each digest resolved from the per-commit sha-521b73807420 tag rather than
latest, and its build-inputs label read back from the registry and compared with the
fingerprint this repo computes now. check-image-pins.py reports all five current, and the
fingerprints match what the Image pins run on 521b738 reported as the repo's inputs.
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