Skip to content

ci: hash-pinned installs for our own workflows, pip-install gate, unpinned_install rule (Part of #4918) - #4942

Merged
squid-protocol merged 7 commits into
mainfrom
ci/4918-steps-2-4
Oct 12, 2026
Merged

squid-protocol merged 7 commits into
mainfrom
ci/4918-steps-2-4

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4918 (steps 2-4 + the #4931 review follow-ups). Step 1 landed in #4931.

What changed

  1. Re-stamp: template GG_REF moved from the branch commit to the ci: hash-pin the shipped surface: templates and action.yml (Part of #4918) #4931 merge commit 37e7187 (stamp_template_pins.py). Template/action comments now record that the @v2.4.0 action bump waits for the release that ships templates/requirements/, and that an explicit version: of a release older than the full extra drops the ML engines.
  2. Shared hash-pinned installs for our own CI: ci/requirements/*.in -> *.txt (uv pip compile --generate-hashes --universal, tests/tools/pin_ci_requirements.sh): bootstrap (pip/setuptools/wheel/build), engines, pytest, test, yaml, treesitter (==1.20.0, the pin smoke/full-suite already used), docs, lint, callgraph. Every pip install <name> in .github/workflows/* and bitbucket-pipelines.yml is now pip install --require-hashes -r ci/requirements/<set>.txt; -e installs keep working because the pins are installed first. gitgalaxy.yml and the root bitbucket file install the repo's own templates/requirements/*.txt. Dependabot gets a grouped pip entry for /ci/requirements. Pins only: no triggers, job logic or shepherd touched. Remaining non-SHA uses: (rosetta-audit, publish.yml's release/v1, the github template) are SHA-pinned.
    • Design note: pip turns hash mode on for a hashed constraints file and then rejects unpinned names, so the sets are -r --require-hashes files, not -c.
  3. Gate tests/core_engine/test_ci_install_pins.py: fails on a pip install of a named package without ==, a hashed requirements file or a local path, in workflows, templates, action.yml, bitbucket-pipelines.yml; self-tests that it flags unpinned examples; checks lockfiles are hashed, Dependabot watches them, and each -r <path> resolves from the step's cwd.
  4. Rule gitgalaxy/security/pipeline_pins.py: unpinned_install on YAML (pip/npm/gem/go/cargo install with no version, curl | bash, uses: not a commit SHA), wired in galaxyscope.py, SARIF GG-SAST-UNPINNED_INSTALL with line numbers and a rule descriptor. Tests in test_pipeline_pins.py (each form, pinned forms, line numbers, hostile input, end-to-end SARIF, and "our own pipelines are clean").

Evidence (self-scan, galaxyscope on the pipeline surface only)

tree results files
before #4931 (37e718724^) 107 40 incl. action.yml, all 5 templates, bitbucket-pipelines.yml, 33 workflows
origin/main before this PR 84 35
this branch 0 0

Golden masters

Both fixtures moved only in 12. Scan Output Snapshots/SARIF: +82 GG-SAST-UNPINNED_INSTALL results on corpus YAML, +1 rule descriptor, 0 removed (verified by diffing old vs new on both legs).

Gates

pr_gates --fast 5/5, --ratchets 7/7 (none skipped), crucible_check.py --update --yes both legs.

Cross-repo

None.

Not covered (see report)

Dockerfile RUN, shell outside YAML, apt/brew, GitLab image:/include:, build-isolation setuptools fetched by pip install -e, tests/requirements-mypy.txt unhashed; whether Dependabot opens PRs for uv-compiled lockfiles is unverified until its first run.

🤖 Generated with Claude Code

squid-protocol and others added 6 commits October 11, 2026 21:34
….0 action bump and pre-full-extra versions (Part of #4918)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…install gate; SHA-pin remaining uses (Part of #4918)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… as GG-SAST-UNPINNED_INSTALL (Part of #4918)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ALL rule (+82 results on corpus YAML, nothing removed) (Part of #4918)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

…hat the workflow installs the hashed set (Part of #4918)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol
squid-protocol marked this pull request as ready for review October 12, 2026 02:23
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 12, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #4942 @ 6d496f2: 1 failed check(s)

== graph-accuracy-audit (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/38194178868/job/114633111290
repro: python tests/tools/pr_gates.py --fast
errors:
fail-on-cache-miss: false
##[error]Process completed with exit code 1.
2026-10-12 02:08:13,666 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-12 02:08:15,751 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-12 02:08:16,451 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-12 02:08:20,300 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-12 02:08:24,426 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-12 02:08:26,472 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-12 02:08:26,473 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-12 02:08:26,475 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-12 02:08:26,477 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-12 02:08:26,677 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-12 02:08:26,678 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-12 02:08:26,680 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-12 02:08:26,681 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-12 02:08:26,682 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-12 02:08:26,683 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-12 02:08:26,685 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-12 02:08:27,535 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-12 02:08:27,538 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-12 02:08:27,668 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-12 02:08:32,626 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-12 02:08:42,262 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-12 02:08:42,525 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-12 02:08:42,832 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
... 72 more
log tail:
| m4 | 39 | 0 | 0.0% |
| makefile | 71 | 0 | 0.0% |
| matlab | 23 | 0 | 0.0% |
| objective-c | 154 | 0 | 0.0% |
| perl | 936 | 0 | 0.0% |
| php | 1722 | 0 | 0.0% |
| pli | 46 | 0 | 0.0% |
| powershell | 73 | 0 | 0.0% |
| python | 4310 | 0 | 0.0% |
| rexx | 115 | 0 | 0.0% |
| ruby | 261 | 0 | 0.0% |
| rust | 2055 | 0 | 0.0% |
| scala | 541 | 0 | 0.0% |
| scheme | 9 | 0 | 0.0% |
| shell | 608 | 0 | 0.0% |
| solidity | 105 | 0 | 0.0% |
| swift | 132 | 0 | 0.0% |
| tcl | 291 | 0 | 0.0% |
| typescript | 2985 | 0 | 0.0% |
| yacc | 1301 | 0 | 0.0% |
| yaml | 19 | 0 | 0.0% |
| zig | 2763 | 0 | 0.0% |
span_anchor_audit: OK -- 50 language(s) measured, none rose beyond tolerance.
Post job cleanup.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/5c666b0f-b405-4e93-8a9e-049b0f3c031b' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 12, 2026
@squid-protocol
squid-protocol merged commit 83536fd into main Oct 12, 2026
68 of 69 checks passed
@squid-protocol
squid-protocol deleted the ci/4918-steps-2-4 branch October 12, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant