Skip to content

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

Merged
workingjubilee merged 7 commits into
rust-lang:mainfrom
hashcatHitman:zizmor
Oct 27, 2026
Merged

workingjubilee merged 7 commits into
rust-lang:mainfrom
hashcatHitman:zizmor

Conversation

@hashcatHitman

@hashcatHitman hashcatHitman commented Oct 17, 2026 •

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.

@hashcatHitman
hashcatHitman marked this pull request as ready for review October 17, 2026 22:50
@hashcatHitman

Copy link
Copy Markdown
Member Author

After investigating, the CI failures appear unrelated to the changes made in this PR.

@hashcatHitman

Copy link
Copy Markdown
Member Author

Suggestion: merge #774, then give me a chance to rebase this PR so I can fix any issues it reintroduces.

@hashcatHitman
hashcatHitman marked this pull request as draft October 22, 2026 18:03
@hashcatHitman hashcatHitman changed the title ci: Resolve all zizmor findings as of zizmor@1.31.1 ci: Resolve most zizmor findings as of zizmor@1.31.1 Oct 22, 2026
@workingjubilee

Copy link
Copy Markdown
Member

Merged.

@hashcatHitman

Copy link
Copy Markdown
Member Author

Ah, thanks! I'll get this working.

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.142

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>
See: https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#case

Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
@hashcatHitman
hashcatHitman marked this pull request as ready for review October 26, 2026 21:37
@hashcatHitman

Copy link
Copy Markdown
Member Author

This should be ready to merge now, as long as there aren't any concerns on the review side.

@Kobzol Kobzol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I find the move from inline expressions (that are not user controlled) to environment variables kinda stupid, tbh.. But if Zizmor wants it..

@workingjubilee

Copy link
Copy Markdown
Member

The justification for it is precisely "template injection", and the pedantic persona prohibits all, which tbh to me feels a bit like saying "run shellcode only if someone can get it into an env var, and move your vulns into setting your env vars". hello???

as I wish to annihilate this repo's (relevance) by moving it, I would rather not change such things that would require me to reunderstand the CI code significantly in the interim while this repo still lives, if that is alright.

@workingjubilee

Copy link
Copy Markdown
Member

everything else is fine.

@hashcatHitman

Copy link
Copy Markdown
Member Author

as I wish to annihilate this repo's (relevance) by moving it, I would rather not change such things that would require me to reunderstand the CI code significantly in the interim while this repo still lives, if that is alright.

Sure, I'll drop 2daac5c, f98e955, and aad2764. I can always revisit it another time, if need be.

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

Copy link
Copy Markdown
Member Author

Should be good to go now.

@workingjubilee workingjubilee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! This should be good.

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

@workingjubilee workingjubilee Oct 27, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It kinda sucks that this is what we gotta do and pinning a version down to the patch ain't good enough, but I absolutely prefer the result.

When I first found out about the reality that every version was just a mutable tag, I had to wonder if that code was written by Buster of "Arthur" cartoon fame

Would that we could retain such innocence in this world!

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.

If it makes you feel better, lockfiles are a thing for GitHub Actions now. We don't want to use them just yet, but they might be an alternative in the (near?) future. See: #t-infra > github actions workflow lockfiles

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That would def be better, but the hash plus comment is good enough for me, merely noisy. if inline comments for version instead of only tailing comments were allowed it would address my only druther here also (I want the version number "first", and an above-comment isn't quite right either) but I almost kinda hope yaml doesn't support that...?

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.

I almost kinda hope yaml doesn't support that...?

It doesn't. I hope. In any case, zizmor doesn't, so :).

@workingjubilee
workingjubilee merged commit b39b7b3 into rust-lang:main Oct 27, 2026
40 checks passed
@workingjubilee

Copy link
Copy Markdown
Member

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.

As I mentioned, per #778 we intend to make this repo much more irrelevant, so I'd rather no convenient automation to make the code more comfortable where it is currently sitting.

@hashcatHitman

Copy link
Copy Markdown
Member Author

As I mentioned, per #778 we intend to make this repo much more irrelevant, so I'd rather no convenient automation to make the code more comfortable where it is currently sitting.

Sounds good to me, yeah. I just offer it to everyone so they aren't left with harder-to-update dependencies and no help about it.

Thanks!

@hashcatHitman
hashcatHitman deleted the zizmor branch October 27, 2026 04:34
@workingjubilee

Copy link
Copy Markdown
Member

Appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants