Repository navigation
Zizmor - #1886
Zizmor#1886
Conversation
Coverage Report for CI Build 38962872602Coverage remained the same at 87.475%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
|
@chavic I think you would be best to take a look here just because I think you might be interested in this. |
caarloshenriq
left a comment
There was a problem hiding this comment.
Concept ACK
Hardening looks right (zizmor offline 362 → 0 locally). One real bug:
smoke-npm is broken. Replayed the run block against a locally-built tarball:
ERR_MODULE_NOT_FOUND: Cannot find package '@ubjs/core'
imported from dist/nodejs/generated/payjoin.js
The tar -x unpacks only the package's dist and never installs the runtime dep @ubjs/core. Doesn't show here because javascript.yml doesn't trigger on .github-only PRs, but publish-npm needs smoke-npm, so it'll block the next payjoin-ffi PR and JS release. npm install --ignore-scripts ../pkg/payjoin-*.tgz keeps deps resolving.
spacebear21
left a comment
There was a problem hiding this comment.
cACK
Regarding the broken smoke-npm job, I wonder if we can/should add triggers on .github files? Feels like any change to how a job runs should at least be checked in the PR changing it.
|
I added a commit that adds on self file change run the job. I didn't apply it to Edit: squashed it into the prepare commit |
ecf2491 to
c1ddd44
Compare
DanGould
left a comment
There was a problem hiding this comment.
Pinning commit hashes turns off Dependabot alerts for these actions (GitHub only alerts on semver refs like @v4, not hashes), so we would add a .github/dependabot.yml for the github-actions ecosystem to keep the pins current, otherwise this is a regression
|
Also wondering if dropping |
Ahh yes, I did not use the template straight from the zizmor documentation I can add that |
2dc5c14 to
125c560
Compare
|
I added an additional |
da804d8 to
704964d
Compare
There was a problem hiding this comment.
Some ~sane sounding bot feedback + the conversation we had offline. Almost there ..
Thanks for sticking with this. Let's drop the last commit as discussed out of band. To push edits to workflow files, the pin bump job needs a token with the workflows permission, and a token like that can run arbitrary code in CI. That's a lot of trust for about five pins. The rust-toolchain pins only freeze the action's wrapper, since the toolchain is still picked when the job runs, so a manual bump now and then is fine. That leaves a few things:
- The nightly toolchain job edits
rust.yml, and with the token limited to contents and pull requests (nightly-maintenance.yml#L47-L48) its push will be rejected. Please addpermission-workflows: writethere. Master's token gets that permission implicitly. - Dependabot only reads
.github/workflowswithdirectory: /(dependabot.yml#L17), so the pins in.github/actions/setup-nixwon't get bumped.directories: ["/", "/.github/actions/*"]covers both. While you're in there, could you pin determinate-nix-action tov3.23.2instead ofmainso dependabot can track it? - The uv entry points at the root (dependabot.yml#L6), but uv.lock is in
payjoin-ffi/python. - Optional: the
test-*jobs in flake-maintenance (#L64-L86) run against master's flake.lock, not the updated one. The PR that update-flake-lock opens already runs those workflows, so I think they can go.
It also needs a rebase. The only conflict is in crates-release.yml.
1a09cc2 to
9b4f547
Compare
Add on own edit checks for workflows that may have impacts on PR success Fix smoke to allow CI to pass This also adds a specific lockfile `smoke/package.json` so the CI job does not install anything ad-hoc which would violate the zizmor checks.
Following the zizmor hash pinning we need a dependabot job to update our workflow action checks to keep things current.
This PR introduces the zizmor CI hardening
I know there are a lot of file changes here but ultimately we just want consistency in the first commit.
Closes #1840
Coded with Big Pickle
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.