-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: add zizmor, address zizmor findings (#98)
- Loading branch information
Showing
6 changed files
with
61 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,22 +5,23 @@ on: | |
|
||
name: release | ||
|
||
permissions: | ||
# Used for trusted publishing. | ||
# Used to sign the release's artifacts with sigstore-python. | ||
id-token: write | ||
|
||
# Used to attach signing artifacts to the published release. | ||
contents: write | ||
|
||
jobs: | ||
pypi: | ||
name: upload release to PyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Used for trusted publishing. | ||
# Used to sign the release's artifacts with sigstore-python. | ||
id-token: write | ||
|
||
# Used to attach signing artifacts to the published release. | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- uses: actions/setup-python@v5 | ||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5 | ||
with: | ||
python-version-file: pyproject.toml | ||
|
||
|
@@ -31,4 +32,4 @@ jobs: | |
run: python -m build | ||
|
||
- name: publish | ||
uses: pypa/[email protected] | ||
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2 |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: GitHub Actions Security Analysis with zizmor 🌈 | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["**"] | ||
|
||
jobs: | ||
zizmor: | ||
name: zizmor latest via Cargo | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
# required for workflows in private repositories | ||
contents: read | ||
actions: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
with: | ||
persist-credentials: false | ||
- name: Setup Rust | ||
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1 | ||
- name: Get zizmor | ||
run: cargo install zizmor | ||
- name: Run zizmor 🌈 | ||
continue-on-error: true | ||
run: zizmor --format sarif . > results.sarif | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload SARIF file | ||
uses: github/codeql-action/upload-sarif@396bb3e45325a47dd9ef434068033c6d5bb0d11a # v3 | ||
with: | ||
sarif_file: results.sarif | ||
category: zizmor |