Conversation
…olves Scorecard PinnedDependenciesID #17 #18) Replaces `pip install --upgrade pip + pip install semgrep` with the official semgrep/semgrep:1.161.0 image, pinned by multi-arch manifest digest sha256:326e5f41cc972bb423b764a14febbb62bbad29ee1c01820805d077dd868fea48. Why this is a quality improvement, not just rule-appeasement: - Image bytes are content-addressed by digest. Tag mutation cannot affect us; the earlier `pip install semgrep` was version-floating and would silently pick up any new semgrep release between CI runs. - Removes the entire pip-bootstrap surface (Setup Python + pip --upgrade + pip install semgrep). Smaller attack surface, faster CI, fewer pinning surfaces to maintain. - Multi-arch index digest covers both x86_64 and arm64 runners. Per Aaron 2026-04-27: "given we want high quality signals for future AI training and we persision the PRs do you still agree?" — fix, do not relax. This commit is the fix. Resolves Scorecard alerts #17, #18 (PinnedDependenciesID, pipCommand). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the semgrep CI job to run semgrep from a SHA-pinned official Docker image instead of installing it via pip, addressing supply-chain pinning concerns raised by Scorecard.
Changes:
- Switch
lint (semgrep)job to a job-levelcontainer:usingsemgrep/semgreppinned by digest. - Remove Python setup and
pip install semgrepsteps from the workflow.
…ard PinnedDependenciesID #15 #16) elan.sh — switched from `curl ... master/elan-init.sh | sh` (latest master, unpinned) to: 1. Download elan-init.sh at v4.2.1 commit SHA (58e8d545e33641f66dbcbd22c4283109e71757be) 2. Verify SHA256 (4bacca9502cb89736fe63d2685abc2947cfbf34dc87673504f1bb4c43eda9264) 3. Execute the verified copy linux.sh — switched from `curl mise.run | sh` (auto-detects latest at runtime) to: 1. Download the pinned tarball mise-v2026.4.24-linux-{x64,arm64}.tar.gz directly from github.com/jdx/mise/releases 2. Verify per-arch SHA256 (x64: de2f924…2c58, arm64: cf5f4899…5727) 3. Extract mise/bin/mise to ~/.local/bin and source PATH Why this is a quality improvement, not just rule-appeasement: - The previous shapes silently absorbed any new elan/mise release between CI runs. A compromised upstream master branch (elan) or a redirector swap (mise.run) would have shipped to every dev laptop + every CI run with no signal. Content-hash pinning makes such an event a hard fail with a verification message. - Bumping is a deliberate two-line change (commit/tarball + hash) with a documented procedure in each script's comment block — easier to audit than `master`/`mise.run`. - Portable SHA256 verification (sha256sum/shasum fallback) per Otto-235 4-shell target. Per Aaron 2026-04-27: "preserve quality signals" — fix, don't relax. Resolves Scorecard alerts #15 (elan downloadThenRun) and #16 (mise downloadThenRun). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c222ce4ee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… Aaron 2026-04-27) Reverts the Docker-container approach in favour of the GOVERNANCE §24 three-way-parity invariant: dev laptops + CI runners + devcontainers all install semgrep through the same `tools/setup/install.sh` via mise. CI was the odd one out (had its own actions/setup-python + pip install), which would have made switching CI hosts costly and broke host-portability. Aaron 2026-04-27: > "actions/setup-python we should be using our base python that our > install scripts install we are trying to not use github stuff > unless we have to so it's easy to switch hosts and our dev machine > and build machine setup is the same, that's one of the invariants > we want to try to keep as close as possible dev machine / build > machines are same/very similar for setup/share the setup/install > scripts and post install scripts. this makes CI more deterministic > too." What changed: - `.mise.toml`: added `pipx = "1.11.1"` (aqua-backed; same SHA-pinned release path as actionlint / shellcheck / uv) and `"pipx:semgrep" = "1.161.0"`. Now any machine that runs install.sh gets the same semgrep version pinned the same way. - `.github/workflows/gate.yml` lint-semgrep: dropped the `container: semgrep/semgrep@sha256:...` block from the previous iteration; dropped `actions/setup-python` and the two `pip install` steps. Job is now: checkout → install.sh → semgrep. Same shape as build-and-test. This still resolves Scorecard PinnedDependenciesID #17 + #18 (the unpinned pip-bootstrap surface goes away entirely) and additionally: - Restores host-portability — no GitHub-specific actions in this job - First-class dev-laptop parity (semgrep was previously not actually installed by install.sh; now it is) - More deterministic CI (mise resolves declarative pins; no pip dependency-resolver wandering) Verified locally: `mise install` + `mise exec -- semgrep --version` produces 1.161.0 on the same shape. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… decision (Aaron 2026-04-27) Removes `pipx = "1.11.1"` from `.mise.toml` — mise's `pipx:` backend auto-routes through `uv tool install` when uv is available, so adding pipx as a separate package was redundant. Bumps `uv` from 0.9 to 0.11.8 (latest, verified via gh API today 2026-04-27 — current training data is stale per Otto-247 version-currency rule). Adds: - `docs/DECISIONS/2026-04-27-uv-canonical-python-tool-manager.md` — ADR documenting uv as the canonical Python tool manager for Zeta, the lineage from `../scratch` (where uv was made first-class first), the mise pipx:→uv auto-route behaviour, and the rules for using `pipx:foo` pins without an actual pipx package. - `memory/feedback_three_way_parity_install_scripts_dev_ci_devcontainer_minimize_github_specific_surface_aaron_2026_04_27.md` — substrate memory naming Aaron's host-portability invariant; what three-way parity buys; what was almost violated by the Docker-container draft; the right-fix decision flow. - MEMORY.md row pointing at the new memory + ADR. Aaron 2026-04-27 verbatim: - "we have uv do we need pipx, isn't there a uvx this should be much faster also +pipx = '1.11.1' is this latest, remember you mode cached latest can't be trusted you have to search the internet this goies for all version numbers you add, let's not start on an older version." - "the fact that uv is our desired python setup should be documented somewehre this project ../scratch made it first class too" Verified locally: `mise install` with `uv = "0.11.8"` + `pipx:semgrep = "1.161.0"` (no separate pipx) installs semgrep 1.161.0 via uv tool install. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…-refs, stale comment)
7 review threads:
1. Copilot P1 — name attribution in gate.yml + .mise.toml comments
("Per Aaron 2026-04-27") violates the role-ref-on-current-state
discipline (history surfaces only). Replaced with role-refs:
"the host-portability invariant" / "per the three-way-parity
invariant (GOVERNANCE §24)".
2. Codex P2 — preserve armv7 support that `curl mise.run | sh`
used to give us implicitly. Added the armv7 case + SHA256
to the per-arch dispatch in linux.sh.
3. Copilot P1 — temp dir leak on failure in linux.sh: `mktemp -d`
only cleaned up on the success path. Added `trap 'rm -rf
"${MISE_TMP}"' EXIT` so the dir is removed even on download /
SHA / extract failure.
4. Copilot P1 — same pattern in elan.sh tmp file. Added EXIT
trap.
5. Copilot P1 — gate.yml install-toolchain step comment claimed
"mise installs python + pipx + semgrep" but pipx was dropped
in commit d62fc6d (mise auto-routes pipx: through uv).
Updated the comment to reflect current state and to point at
the uv-canonical ADR.
6. Copilot P1 — same name-attribution issue in .mise.toml
semgrep block. Replaced.
7. Copilot P1 — PR description was already updated; thread
should be re-evaluated by reviewer with the current
description in view.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drives toward Aaron's three-way-parity invariant (GOVERNANCE §24): dev laptops + CI runners + devcontainers all install semgrep through the same
tools/setup/install.sh→ mise → declarative.mise.toml. Noactions/setup-python, no inlinepip install, no GitHub-specific shapes for what install.sh already does.Resolves Scorecard PinnedDependenciesID alerts #15, #16, #17, #18.
What changed
.mise.tomluv = "0.9"→"0.11.8"(current; verified via gh API today). Added"pipx:semgrep" = "1.161.0". No separate pipx package — mise auto-routespipx:throughuv tool installwhen uv is in the toolchain..github/workflows/gate.ymlactions/setup-python+ the twopip installlines. Replaced with./tools/setup/install.sh(same step build-and-test uses) → runsemgrep.tools/setup/common/elan.shmaster/elan-init.sh | sh→ download at v4.2.1 commit SHA, verify SHA256 (4bacca95…9264), then exec.tools/setup/linux.shcurl mise.run | sh→ downloadmise-v2026.4.24-linux-{x64,arm64}.tar.gzdirectly from GitHub releases, verify per-arch SHA256, extract.docs/DECISIONS/2026-04-27-uv-canonical-python-tool-manager.mdpipx:foomise pins route through uv automatically; lineage from../scratch.memory/feedback_three_way_parity_install_scripts_dev_ci_devcontainer_minimize_github_specific_surface_aaron_2026_04_27.mdMEMORY.mdAaron's framing
Preserve quality signals (2026-04-27, earlier today):
→ This PR is the fix, not a relax.
Three-way parity / minimize GitHub-specific surface (2026-04-27, mid-PR):
→ Drove the revert from the initial Docker-container approach to install.sh-based.
uv first, no redundant pipx (2026-04-27, late-PR):
→ Removed redundant
pipx = "1.11.1"; bumped uv to current 0.11.8 verified via gh API.Document uv-as-canonical (2026-04-27):
→ ADR lands documenting it.
Why this is a quality improvement, not just rule-appeasement
actions/setup-python+ twopip installsteps from gate.yml; removes pip-bootstrap surface entirely..mise.tomledit; CI inherits.Bumping procedure (documented inline)
ELAN_INIT_COMMIT(gh api/repos/leanprover/elan/releases/latest) andELAN_INIT_SHA256(curl + sha256sum) together.MISE_VERSIONand bothMISE_SHA256_*values together; pull from/repos/jdx/mise/releases/latest..mise.tomlpipx:semgrep: bump version pin; mise's pipx: backend (auto-routed to uv) handles the rest. See ADRdocs/DECISIONS/2026-04-27-uv-canonical-python-tool-manager.md.Test plan
mise install+mise exec -- semgrep --versionon the post-PR.mise.tomlshape produces 1.161.0mise/bin/miseat top of archive; SHA256 matches digest from GitHub API)🤖 Generated with Claude Code