-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run zizmor in CI, and fix most warnings #14844
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
|
||
- uses: tj-actions/changed-files@v45 | ||
id: changed | ||
|
@@ -99,6 +100,8 @@ jobs: | |
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: "Install Rust toolchain" | ||
run: rustup component add rustfmt | ||
- run: cargo fmt --all --check | ||
|
@@ -111,6 +114,8 @@ jobs: | |
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: "Install Rust toolchain" | ||
run: | | ||
rustup component add clippy | ||
|
@@ -129,6 +134,8 @@ jobs: | |
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: "Install Rust toolchain" | ||
run: rustup show | ||
- name: "Install mold" | ||
|
@@ -173,6 +180,8 @@ jobs: | |
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: "Install Rust toolchain" | ||
run: rustup show | ||
- name: "Install mold" | ||
|
@@ -200,6 +209,8 @@ jobs: | |
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: "Install Rust toolchain" | ||
run: rustup show | ||
- name: "Install cargo nextest" | ||
|
@@ -224,6 +235,8 @@ jobs: | |
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: "Install Rust toolchain" | ||
run: rustup target add wasm32-unknown-unknown | ||
- uses: actions/setup-node@v4 | ||
|
@@ -251,6 +264,8 @@ jobs: | |
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: "Install Rust toolchain" | ||
run: rustup show | ||
- name: "Install mold" | ||
|
@@ -267,6 +282,8 @@ jobs: | |
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: SebRollen/[email protected] | ||
id: msrv | ||
with: | ||
|
@@ -299,6 +316,8 @@ jobs: | |
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: "Install Rust toolchain" | ||
run: rustup show | ||
- uses: Swatinem/rust-cache@v2 | ||
|
@@ -325,6 +344,8 @@ jobs: | |
FORCE_COLOR: 1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: astral-sh/setup-uv@v4 | ||
- uses: actions/download-artifact@v4 | ||
name: Download Ruff binary to test | ||
|
@@ -355,6 +376,8 @@ jobs: | |
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: "Install Rust toolchain" | ||
run: rustup component add rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
|
@@ -379,6 +402,8 @@ jobs: | |
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
@@ -489,6 +514,8 @@ jobs: | |
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: cargo-bins/cargo-binstall@main | ||
- run: cargo binstall --no-confirm cargo-shear | ||
- run: cargo shear | ||
|
@@ -499,6 +526,8 @@ jobs: | |
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
@@ -524,6 +553,8 @@ jobs: | |
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
@@ -555,6 +586,8 @@ jobs: | |
MKDOCS_INSIDERS_SSH_KEY_EXISTS: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY != '' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.13" | ||
|
@@ -595,6 +628,8 @@ jobs: | |
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: "Install Rust toolchain" | ||
run: rustup show | ||
- name: "Cache rust" | ||
|
@@ -622,6 +657,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
name: "Download ruff-lsp source" | ||
with: | ||
persist-credentials: false | ||
repository: "astral-sh/ruff-lsp" | ||
|
||
- uses: actions/setup-python@v5 | ||
|
@@ -657,6 +693,8 @@ jobs: | |
steps: | ||
- name: "Checkout Branch" | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: "Install Rust toolchain" | ||
run: rustup show | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,8 @@ jobs: | |
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: "Install Rust toolchain" | ||
run: rustup target add wasm32-unknown-unknown | ||
- uses: jetli/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,5 +88,20 @@ repos: | |
- id: prettier | ||
types: [yaml] | ||
|
||
- repo: https://github.com/woodruffw/zizmor-pre-commit | ||
rev: v0.8.0 | ||
hooks: | ||
- id: zizmor | ||
# `release.yml` is autogenerated by `dist`; security issues need to be fixed there | ||
# (https://opensource.axo.dev/cargo-dist/) | ||
exclude: .github/workflows/release.yml | ||
# We could consider enabling the low-severity warnings, but they're noisy | ||
args: [--min-severity=medium] | ||
|
||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.29.4 | ||
hooks: | ||
- id: check-github-workflows | ||
Comment on lines
+101
to
+104
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just some more extra linting for our workflows. It's unrelated to the other changes in the PR. It doesn't have any quarrels with any of our workflows currently, but I figured it might be a good idea to add it as well. |
||
|
||
ci: | ||
skip: [cargo-fmt, dev-generate-all] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we prefer to keep configuration in separate files rather than putting it in pre-commit, but it doesn't seem possible to specify these in zizmor's configuration file right now (https://woodruffw.github.io/zizmor/configuration/#settings)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this too. Tip: open an issue for zizmor and I bet William will implement it :)