Skip to content

Commit

Permalink
fix(zizmor): used zizmor to find and fix all security related warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stvnksslr committed Dec 14, 2024
1 parent c682cc7 commit da31c63
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- main

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
RUST_VERSION_STABLE: 1.83.0
Expand All @@ -16,9 +19,14 @@ env:
jobs:
test:
name: test
permissions:
contents: read
checks: write # Required for test results
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- run: cargo test

Expand All @@ -27,6 +35,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
Expand All @@ -37,7 +47,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy
- run: cargo clippy
9 changes: 6 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ on:
types: [ published ]

permissions:
pull-requests: write
contents: write
contents: read

jobs:
build:
name: Build - ${{ matrix.target }}
permissions:
contents: write # Only needed for release artifact uploads
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
Expand Down Expand Up @@ -38,6 +39,8 @@ jobs:
steps:
- name: Checkout Git repo
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set Perl environment variables
if: runner.os == 'Windows'
Expand All @@ -46,7 +49,7 @@ jobs:
echo "OPENSSL_SRC_PERL=$((where.exe perl)[0])" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
- name: Install rust toolchain
if: ${{ !contains(matrix.platform.target, 'apple') }}
if: ${{ !contains(matrix.target, 'apple') }}
uses: dtolnay/rust-toolchain@stable

- uses: taiki-e/setup-cross-toolchain-action@v1
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ on:
- main

permissions:
pull-requests: write
contents: write
contents: read

jobs:
release:
name: Release
permissions:
contents: write # Only needed for creating releases
id-token: write # Required for release-plz
runs-on: ubuntu-latest
concurrency:
group: release-plz-${{ github.ref }}
Expand All @@ -20,6 +22,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
token: ${{ secrets.RELEASE_PLZ_TOKEN }}

Expand Down

0 comments on commit da31c63

Please sign in to comment.