-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lint our GitHub Actions workflows with zizmor
zizmor is a new tool to lint GitHub Actions workflows. For the most part our workflows are pretty low risk since we don't give it a bunch of credentials, but we can avoid issues in the future by locking them down now. Two overall issues needed to be fixed: * setting persist-credentials: false for actions/checkout, which we do everywhere except in the workflows that need to push. * Don't use template expansion when we can use a normal bash variable. While zizmor is written in Rust, it is also shipped as a prebuilt binary via PyPI, so we can set it as a poetry dependency and run it as part of our normal lint CI. Refs <freedomofpress/securedrop-tooling#18>.
- Loading branch information
Showing
10 changed files
with
75 additions
and
5 deletions.
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
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 |
---|---|---|
|
@@ -33,7 +33,6 @@ jobs: | |
steps: | ||
- run: | | ||
apt-get update && apt-get install --yes git make gnupg sudo python3-poetry | ||
- uses: actions/checkout@v4 | ||
- name: Setup user | ||
run: | | ||
# We want to run tests as a regular user, similar to Qubes VMs | ||
|
@@ -42,6 +41,8 @@ jobs: | |
run: apt-get install --yes build-essential curl libssl-dev pkg-config | ||
if: ${{ matrix.component == 'proxy' }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
# Install Rust, keep in sync with rust-toolchain.toml | ||
- uses: dtolnay/[email protected] | ||
if: ${{ matrix.component == 'proxy' }} | ||
|
@@ -74,6 +75,8 @@ jobs: | |
- run: | | ||
apt-get update && apt-get install --yes git make gnupg sudo python3-poetry | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Setup user | ||
run: | | ||
# We want to run tests as a regular user, similar to Qubes VMs | ||
|
@@ -100,6 +103,8 @@ jobs: | |
- run: | | ||
apt-get update && apt-get install --yes git make python3-poetry | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Install dependencies | ||
run: | | ||
poetry -C client install | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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