Repository navigation
ci: Resolve most zizmor findings as of zizmor@1.31.1 - #1410
Conversation
BurntSushi
left a comment
There was a problem hiding this comment.
I'm overall in favor of this. How did you generate the hashes for this? I guess it probably makes sense to set up dependenabot for this, since it seems annoying to do so otherwise.
| run: cross test --verbose -p regex-lite --lib --target ${{ matrix.target }} | ||
| run: cross test --verbose -p regex-lite --lib --target ${TARGET} | ||
| env: | ||
| TARGET: ${{ matrix.target }} |
There was a problem hiding this comment.
This is due to the template-injection audit of zizmor. Template expansion can be abused or misused in some cases. That obviously isn't the case here, but because crabwatch uses the pedantic persona, zizmor flags all template expansion in code contexts, which it considers code smells.
It can be made less repetitive if we move the definition of the TARGET environment variable to the job level, if that's bothering you.
| uses: actions/checkout@v5 | ||
| - name: Install Rust | ||
| uses: dtolnay/rust-toolchain@master | ||
| uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 |
There was a problem hiding this comment.
Can you update these actions/checkout dependencies to the latest version?
zizmor --gh-token "$(gh auth token)" --config ./zizmor.yml --persona=auditor . --fix=allI commit each unique action/version separately after checking the releases on the project GitHub repository to make sure I have the correct version and the correct hash. The hashes are just commits corresponding to a specific release, in case that wasn't clear. It is certainly a bit tedious. |
See: https://github.com/actions/checkout/releases/tag/v5.1.0 This is the same version we're already implicitly using. Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Because `dtolnay/rust-toolchain` doesn't provide proper releases, it is impossible to pin correctly. It also isn't really necessary, since all standard GitHub Actions runners have `rustup` preinstalled. 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>
|
Hmmm yeah that seems like a pain. Definitely would appreciate having Dependenabot setup. If you can do that in this PR, that would be great! And yeah, only do it for GitHub Actions. |
See: https://github.com/actions/checkout/releases/tag/v7.0.1 Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
4e62ac4 to
371572c
Compare
Do you have a preferred: |
|
How about |
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
|
Let me know if you have any other questions or requests, or if you'd like me to rebase onto the latest |
|
Do I have to do anything else to make Dependabot work? Or is it automatic? |
I believe it should just work once the PR is merged. (Looks like it did, see: https://github.com/rust-lang/regex/actions/workflows/dependabot/dependabot-updates) |
In pursuit of getting more
zizmorlints enforced acrossrust-langrepos throughcrabwatch, this PR fixes mostzizmorfindings as ofzizmor@1.31.1, using theauditorpersona. The lints that actually fired per-persona level are:regularpersona findings:artipackedunpinned-usespedanticpersona findings:regularsuperfluous-actionstemplate-injectionanonymous-definition(Because coming up with names is hard and there is minimal benefit to this)concurrency-limits(Due to concerns about special cases. See also: Determine special cases forconcurrency-limitscrabwatch#107)auditorpersona findings:pedanticThe 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.