Skip to content

ci: Resolve most zizmor findings as of zizmor@1.31.1 - #759

Merged
clarfonthey merged 10 commits into
rust-lang:mainfrom
hashcatHitman:zizmor
Oct 31, 2026
Merged

clarfonthey merged 10 commits into
rust-lang:mainfrom
hashcatHitman:zizmor

Conversation

@hashcatHitman

Copy link
Copy Markdown
Member

In pursuit of getting more zizmor lints enforced across rust-lang repos through crabwatch, this PR fixes most zizmor findings as of zizmor@1.31.1, using the auditor persona. The lints that actually fired per-persona level are:

regular persona findings:

pedantic persona findings:

auditor persona findings:

  • Everything from pedantic
  • Not fixed in this PR:
    • None

The hash pin format is supported by tools like Dependabot and Renovate, which can update the pinned hashes and their associated comments. If you'd like help setting either of those up, let me know which you prefer, and if you'd like it in this PR or a new one. By default, I'd assume to set it up to only update GitHub Actions.

See: https://github.com/actions/checkout/releases/tag/v3.7.0

This is the same version we're already implicitly using.

Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
See: https://github.com/actions/checkout/releases/tag/v4.4.0

This is the same version we're already implicitly using.

Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
See: https://github.com/release-plz/action/releases/tag/v0.5.147

This is the same version we're already implicitly using.

Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
@hashcatHitman

Copy link
Copy Markdown
Member Author

Let's see if this works here.

r? crabwatch

@hashcatHitman

hashcatHitman commented Oct 31, 2026 •

Copy link
Copy Markdown
Member Author

Nope. Looks like it'll be another coin flip. As last time, Heads=Marco.

@hashcatHitman

Copy link
Copy Markdown
Member Author
$ fend d2
  1: 50.00%  ##############################
  2: 50.00%  ##############################
$ fend roll 1d2
1

CC: @marcoieni

miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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.

that's a very old version of the checkout action, should this be upgraded to v7?

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.

Don't mind doing whatever's needed to upgrade to the latest version.

…what changed about checking out a git repository that required 4 major version bumps? 🙈

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.

…what changed about checking out a git repository that required 4 major version bumps? 🙈

https://github.com/actions/checkout

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.

Ah yes, my favourite kind of breaking change: using a newer version of Node.js.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

that's a very old version of the checkout action, should this be upgraded to v7?

It certainly wouldn't hurt, but I default to not updating anything in these PRs unless asked.

…what changed about checking out a git repository that required 4 major version bumps? 🙈

The only difference I know of off the top of my head is the one zizmor documents. By default, using actions/checkout causes a credential to be persisted on disk. Versions below v6.0.0 store the credential directly in the checked-out repo's .git/config, while v6.0.0 and later store it under ${RUNNER_TEMP}. But that shouldn't matter anymore after this since we're setting persist-credentials: false.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Don't mind doing whatever's needed to upgrade to the latest version.

Also, does this mean you'd like me to bump actions/checkout? I can, and it probably maybe should happen, but it isn't an explicit goal for this PR otherwise.

@clarfonthey
clarfonthey requested a review from marcoieni October 31, 2026 12:38
@clarfonthey

Copy link
Copy Markdown
Contributor

r? crabwatch

We don't have triagebot enabled for the repo. I should look into setting that up.

@hashcatHitman

Copy link
Copy Markdown
Member Author

r? crabwatch

We don't have triagebot enabled for the repo. I should look into setting that up.

Yeah, I'm not sure how I'd check other than by trying or looking for the config in rust-lang/team. Seems easiest to just try.

By the way, a review from Marco isn't required on this if it's something you're comfortable with reviewing yourself. This workflow is just meant to be a convenience for maintainers: #t-infra > pr review request @ 💬

@clarfonthey

clarfonthey commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

I mean, it looks good to me; I just am not sure if there's other stuff that's missing from this PR.

Like, from the perspective of being a gatekeeper to new changes, I'm fine merging this, but from the perspective of providing an actually useful review, I don't actually know enough about this to provide any additional guidance.

@hashcatHitman

Copy link
Copy Markdown
Member Author

I mean, it looks good to me; I just am not sure if there's other stuff that's missing from this PR.

Like, from the perspective of being a gatekeeper to new changes, I'm fine merging this, but from the perspective of providing an actually useful review, I don't actually know enough about this to provide any additional guidance.

The changes in this PR are pretty straightforward, thankfully (we have some pretty unusual CI setups; hashbrown is not one of them), so I'm confident in them being good to go. So I think just looking at it from the gatekeeper perspective is fine here.

@hashcatHitman
hashcatHitman marked this pull request as ready for review October 31, 2026 15:05
@xtqqczze

Copy link
Copy Markdown
Contributor

Is zizmor's impostor-commit audit already enabled? Otherwise, these pinned SHAs could just as easily reference commits from forks rather than the intended upstream actions.

@hashcatHitman

Copy link
Copy Markdown
Member Author

Is zizmor's impostor-commit audit already enabled? Otherwise, these pinned SHAs could just as easily reference commits from forks rather than the intended upstream actions.

Yes, it is. You can see it in the policy here: https://github.com/rust-lang/crabwatch/blob/c564abe3fc4920999ff3b90fd7cce1a54ad9d387/zizmor-policy.yml#L27-L28

@clarfonthey
clarfonthey added this pull request to the merge queue Oct 31, 2026
Merged via the queue into rust-lang:main with commit f7bae3d Oct 31, 2026
26 checks passed
@hashcatHitman hashcatHitman moved this from zizmor PR opened to Needs Policy Update in t-crabwatch policy expansion Oct 31, 2026
@hashcatHitman
hashcatHitman deleted the zizmor branch October 31, 2026 20:12
@hashcatHitman hashcatHitman moved this from Needs Policy Update to Policy Adjusted in t-crabwatch policy expansion Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Policy Adjusted

Development

Successfully merging this pull request may close these issues.

3 participants