Repository navigation
ci: close workflow-hardening and release archive-check gaps found reviewing #2794 - #2809
Merged
Merged
Conversation
…iewing #2794 check_workflow_hardening.py rule 6 now refuses `checksum` set to anything but `true`, and reads a wrapped plain or quoted `with:` value as YAML folds it, so a second tool on a continuation line is checked. The docstring and messages narrow to what the guard reads and name the SHA-pinned actions that still install floating code. release.yml's per-artifact archive check refuses a flat download, an empty download, an empty artifact and hidden entries, and names the version in its mismatch message. A new pytest runs the step from release.yml against the build matrix's real layout and each refused one. The toolchain-pin comments describe the post-#2794 path: the `toolchain:` input sets the version and a Rust release arrives as the docker ecosystem's `rust:` bump of deploy/sponsord. Closes #2798 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Gas snapshotNo gas changes vs base. |
Code coverage overviewLanguages: Rust, Solidity Rust / code-coverage/cargo-llvm-cov
View coverage of the 3 most impacted files.
Solidity / code-coverage/forge
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
There was a problem hiding this comment.
🟡 Changes recommended
A suffix-matching hidden archive can bypass both hidden-entry rejection and the exact-count guard, requiring explicit rejection of dot-prefixed basenames and a regression test.
1 open issue
What changed in this PR
This PR strengthens CI and release checks following #2794, adding regression coverage and correcting documentation without changing Rust, contract, or API behavior.
Changes:
- Tightens install-action validation for checksum settings and wrapped tool lists.
- Adds release artifact layout checks and a harness that exercises the workflow’s shell step.
- Clarifies guard coverage and how Dependabot-driven Rust toolchain updates propagate.
| File | Description |
|---|---|
Cargo.toml |
Corrects the comment describing synchronized toolchain versions. |
.pre-commit-config.yaml |
Clarifies the toolchain-pin hook’s purpose. |
.github/workflows/release.yml |
Adds artifact layout validation and clearer diagnostics. |
.github/workflows/ci.yml |
Updates toolchain comments and removes obsolete checkout commentary. |
.github/scripts/tests/test_release_upload_assets.py |
Adds workflow-backed archive validation tests. |
.github/scripts/tests/test_check_workflow_hardening.py |
Covers additional guard cases and wrapper exit codes. |
.github/scripts/check_workflow_hardening.py |
Checks checksum inputs and wrapped scalars; clarifies scope. |
.github/scripts/check_toolchain_pin.py |
Corrects toolchain documentation and error guidance. |
.github/dependabot.yml |
Clarifies Docker-driven Rust updates and action input versions. |
Review effort: Balanced
…checks A hidden archive whose name carries the right version and target passed the per-artifact check, and the count and upload globs skip dotfiles, so an impostor artifact went unnoticed. The step now refuses any dot-prefixed name first. check_workflow_hardening.py's with_input strips the folded value before unquoting, so a value on the line after its key reads correctly, and returns a quoted value whose close it did not find with its opening quote, so every comparison fails rather than passing a truncated value. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…h tests Name every floating download the guard leaves out of scope, the clippy cache's path into the release, rule 5's job keys, and where download-artifact extracts flat. RELEASING.md and CONTRIBUTING.md name the stable toolchain cargo-semver-checks-action installs. Tests pin folding across a blank line, a checksum other than a literal true, and the duplicate-name guard; the wrapper test drops inherited GIT_* variables. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hives The runner matches a step's input names without regard to case, so `Checksum: false` turned checksums off while the hardening check read the input as unset. with_input now compares names case-blind; an expression used as an input name joins the declared out-of-scope shapes. The per-artifact archive check refuses an artifact named `binaries-` with no target, and any entry that is not a regular file: a symlink moved to the top level would be checksummed with another archive's bytes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

What
Closes the gaps the post-merge review of #2794 found.
Rule 6 false passes (
check_workflow_hardening.py).checksumset to anything buttrue.with_inputreads a wrapped plain or quoted value as YAML folds it. Atool:list continued on a deeper line is now checked in full.release.ymlarchive check. The "Each archive comes from its own target's artifact" step now refuses:dotglob.A mismatch now says "does not name version $VERSION and target $target". The token sentence above the step ends at "only keeping untrusted code out of the run closes that".
A new harness,
test_release_upload_assets.py.run:fromrelease.ymland runs it asshell: bashdoes.build-binariesmatrix and asserts that the layout's archive count equalsEXPECTED_ARCHIVES.Toolchain docs. These now say that the
toolchain:input sets the version and that a Rust release arrives as the docker ecosystem'srust:bump ofdeploy/sponsord:.pre-commit-config.yamldependabot.yml(both comments)ci.ymltoolchain-pinstep commentCargo.tomlcheck_toolchain_pin.py: the docstring claim that a lonerust:bump builds on a different compiler is corrected, the site table leads with the input, and the error footer names the Dockerfile.Guard wording.
clippycache sentence is reworded.Tests.
checksum(false,'false'andtrue);tool:values, plain and quoted;fallback: nonein the next step;Taiki-E/Install-Action;.yml/.yamlrow glob;check-workflow-hardening.sh's exit code.The ed25519-vectors checkout comment is removed.
Reviewer notes
(#2794)) is dropped. Since chore(release): generate CHANGELOG.md with git-cliff under cargo release #2808,CHANGELOG.mdis generated by git-cliff at release time. It holds no ci: pin every workflow and download release artifacts by source #2794 entry to fix.slither-version, a setup-uvversion) would be one more hand-bumped value. All of these actions run under read-only tokens.Verification
uvx --with pyyaml pytest .github/scripts/tests scripts/tests: 523 passed..github/scripts/check-workflow-hardening.sh: OK (148 refs)..github/scripts/check-toolchain-pin.sh: OK (22 sites).Mutation proof, one mutant at a time. Each mutant fails its suite. The guard mutants:
checksumclause;.lower();main()return 0 on errors.The release-step mutants:
dotglob;pre-commit runon the changed files passes. cargo-deny reports the pre-existing RUSTSEC-2026-0387 (crypto-bigint) as a non-blocking warning.actionlintreports nothing inrelease.yml. Itsci.ymlfindings (code-qualityscope, SC2012) are pre-existing.No Rust, contract or API change, so clippy, nextest and the snapshots are not affected.
🤖 Generated with Claude Code