Skip to content
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

fix: improve security posture of GitHub Actions with zizmor #91

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/format-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint-markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Ruby
# See https://github.com/ruby/setup-ruby#versioning
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/release-binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ on:
- "version.txt"
workflow_dispatch:

permissions:
contents: write

jobs:

generateTag:

name: "Auto-generate Git tag whenever version.txt changes"
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write

steps:

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true

- name: Fetch git tags
run: git fetch --force --tags
Expand Down Expand Up @@ -55,21 +55,26 @@ jobs:
runs-on: ubuntu-latest
needs: generateTag
timeout-minutes: 15
permissions:
contents: write

steps:

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true

- name: Fetch git tags
run: git fetch --force --tags

- uses: actions/setup-go@v5
with:
go-version: stable
cache-dependency-path: src/wp2hugo/go.sum
# To prevent cache poisoning
# Ref: https://woodruffw.github.io/zizmor/audits/#cache-poisoning
cache: false

# More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs.
Expand Down
Loading