Skip to content

ci(semgrep): install the hash-pinned tree with --no-deps (1/2 for PyJWT/urllib3 alerts) - #400

Merged
Chris-Wolfgang merged 3 commits into
mainfrom
deps/semgrep-no-deps
Oct 11, 2026
Merged

Chris-Wolfgang merged 3 commits into
mainfrom
deps/semgrep-no-deps

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

1 of 2 for the PyJWT / urllib3 alerts on .github/requirements/semgrep.txt. Merge this first, then its 2/2 PR.

Change (protected-only: .github/workflows/semgrep.yaml)

pip install --no-deps --require-hashes -r .github/requirements/semgrep.txt.

semgrep.txt is a complete, hash-pinned dependency tree, so pip's resolver has nothing to add; it can only re-apply semgrep's own pins. The 2/2 PR overrides one of them: semgrep 1.177.0 and 1.178.0 (the latest) both pin pyjwt[crypto]~=2.13.0, and every PyJWT ≤ 2.14.0 is affected by 12 advisories (1 critical). Without --no-deps, pip refuses that tree.

Why it's safe to merge first

The current semgrep.txt is also a complete tree, so --no-deps installs exactly the same packages from it. This PR's own Semgrep run shows it: the workflow installs the base branch's requirements file.

Evidence

Proven on Chris-Wolfgang/DbContextBuilder, where the identical change (Chris-Wolfgang/DbContextBuilder#477, then #479) has run green on main.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 10, 2026 23:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

0 open findings

What changed in this PR

Updates the Semgrep GitHub Actions workflow to install the hash-pinned Semgrep dependency tree without invoking pip’s dependency resolver, enabling follow-on dependency pin overrides for the PyJWT/urllib3 alert remediation.

Changes:

  • Add --no-deps to the pip install --require-hashes step for Semgrep.
  • Document why --no-deps is required and how it interacts with the pinned transitive tree / overrides.
File Description
.github/​workflows/​semgrep.yaml Installs Semgrep requirements with --no-deps to avoid resolver re-applying upstream pins while still enforcing hash checking.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Chris-Wolfgang
Chris-Wolfgang merged commit 6846d00 into main Oct 11, 2026
19 checks passed
@Chris-Wolfgang
Chris-Wolfgang deleted the deps/semgrep-no-deps branch October 11, 2026 16:11
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.

2 participants