Skip to content

ci: Resolve most zizmor findings as of zizmor@1.32.0 - #3261

Open
hashcatHitman wants to merge 11 commits into
rust-lang:mainfrom
hashcatHitman:zizmor
Open

hashcatHitman wants to merge 11 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.32.0, 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:
    • 2 instances of artipacked (auditor also flags explicitly persisted credentials, which were required to keep these workflows functional. they might be removable in the future, but for now, this is just how it is.)

Comment thread .github/workflows/publish-crates-io.yml Resolved
Comment on lines +61 to +62
with:
persist-credentials: true # The `publish-guide.sh` script requires this for `git push`

@hashcatHitman hashcatHitman Nov 4, 2026 •

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 want to get rid of this eventually. I'm pretty sure we wouldn't need it if we migrated to using actions/deploy-pages, which I do think should be done, but I don't currently have the time to figure that out.

View changes since the review

Comment on lines +19 to +20
with:
persist-credentials: true # The `update-dependencies.sh` script requires this for `git push`

@hashcatHitman hashcatHitman Nov 4, 2026 •

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 don't like this either, but as long as this repo needs that script, it is necessary. We (t-crabwatch/t-infra) should probably try to figure out what behavior is desired and if we can help configure Renovate to provide that behavior.

View changes since the review

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.

this script doesn't work anymore

https://github.com/rust-lang/mdBook/actions/workflows/update-dependencies.yml
image

renovate is configured https://github.com/rust-lang/mdBook/blob/main/.github/renovate.json5
So maybe we can remove that script in a separate PR?

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.

The script says Renovate wasn't working correctly:

# Updates all compatible Cargo dependencies.
#
# I wasn't able to get Renovate to update compatible dependencies in a way
# that I like, so this script takes care of it. This uses `cargo upgrade` to
# ensure that `Cargo.toml` also gets updated. This also makes sure that all
# transitive dependencies are updated.

So I'm not sure if we can or not...

It looks like it fails because it expects a branch named update-dependencies to exist, which doesn't? I'd ask the author about it.

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.

It looks like the branch was deleted in #3208, possibly on accident?

cc @GuillaumeGomez (PR author)
cc @ehuss (script author)

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.

Should have been merged indeed. Although, what's wrong with the branch removal?

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.

Well, the script we're talking about expects such a branch to exist. But as far as I can tell, there isn't anything that creates that branch? So I suspect it was supposed to be created once and left to exist (it seems like previous PRs did not delete the branch).

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.

Namely see: https://github.com/rust-lang/mdBook/actions/runs/41257116538/job/124702530066

It tries to fetch the update-dependencies branch and immediately fails because it doesn't exist. It used to work, though.

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.

Seems like a bug in the script.

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.

Well, fair enough. I just wasn't sure if you deleted the branch on accident or not. I guess we just have to see if the author wants to fix it or if it's even still needed. Though I don't think any of this really needs to block this PR.

@hashcatHitman

Copy link
Copy Markdown
Member Author

CI failure is from cargo audit, not my changes. This is mostly ready, but see the review comments I left. I would like to at least try to deal with the # TODO comment I made, but I'm not sure how to investigate without trying to actually publish crates to crates.io.

@hashcatHitman

Copy link
Copy Markdown
Member Author

r? crabwatch

@hashcatHitman
hashcatHitman marked this pull request as ready for review November 4, 2026 18:03
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Nov 4, 2026
@hashcatHitman hashcatHitman moved this from zizmor PR opened to zizmor PR in review in t-crabwatch policy expansion Nov 4, 2026
@rustbot

This comment has been minimized.

Comment thread .github/workflows/deploy.yml Resolved
Comment on lines +19 to +20
with:
persist-credentials: true # The `update-dependencies.sh` script requires this for `git push`

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.

this script doesn't work anymore

https://github.com/rust-lang/mdBook/actions/workflows/update-dependencies.yml
image

renovate is configured https://github.com/rust-lang/mdBook/blob/main/.github/renovate.json5
So maybe we can remove that script in a separate PR?

@rustbot

This comment has been minimized.

See: https://github.com/actions/checkout/releases/tag/v7.0.1

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/setup-node/releases/tag/v7.1.0

This is the same version we were already implicitly using.

Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
See: https://github.com/crate-ci/typos/releases/tag/v1.52.2

This is the same version we're already 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>
It exists, but not where `zizmor` expects.

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

rustbot commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

This branch has not been deployed

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

Labels

S-waiting-on-review Status: waiting on a review

Projects

Status: zizmor PR in review

Development

Successfully merging this pull request may close these issues.

4 participants