Skip to content
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
7 changes: 7 additions & 0 deletions .github/workflows/build-publish-container-goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ on:
registry_subject_name:
type: string
required: true

permissions:
contents: write # release creation, uploading assets
packages: write # docker login, image push, upload container provenance
id-token: write # Sigstore signing (attest-build-provenance)
attestations: write # write build provenance attestations

jobs:
container_build_publish:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-rpm-quadlet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
description: 'Artifact-name for unsigned RPM artifacts'
default: 'rpms-unsigned'
type: string

permissions:
contents: read # baseline for checkout

jobs:
rpmbuild:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
push:
branches: [ main ]

permissions:
contents: read # baseline for checkout

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ on:
default: 'on-failure'

permissions:
contents: read
contents: read # baseline for checkout
pull-requests: write # for comment-summary-in-pr

jobs:
Expand Down
36 changes: 21 additions & 15 deletions .github/workflows/docker-build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,18 @@ on:
type: string
default: ''

permissions: write-all # Necessary for provenance and SBOM attestations
permissions:
contents: read # baseline for all jobs

jobs:
build-push-images:
environment: 'Docker Push'
runs-on: ubuntu-latest
permissions:
contents: read # checkout repository
packages: write # docker login, image push, upload container provenance
id-token: write # Sigstore signing (built-in provenance)
attestations: write # built-in provenance & SBOM
steps:
- name: checkout repository
uses: actions/checkout@v6.0.3
Expand Down Expand Up @@ -151,18 +157,18 @@ jobs:
needs: build-push-images
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
permissions:
contents: write
contents: write # create GitHub release
steps:
- name: Parse semver string
id: semver_parser
uses: booxmedialtd/ws-action-parse-semver@v1.4.7
with:
input_string: ${{ github.event.ref }}
version_extractor_regex: 'refs/tags/v(.*)$'
- uses: ncipollo/release-action@v1.21.0
with:
# by default this will use the tag push tag as the tag and name
# if we want to trigger tagging from the workflow, "tag" and "commit"
# need to be set to create a new one
prerelease: ${{ steps.semver_parser.outputs.prerelease != '' }}
skipIfReleaseExists: true
- name: Parse semver string
id: semver_parser
uses: booxmedialtd/ws-action-parse-semver@v1.4.7
with:
input_string: ${{ github.event.ref }}
version_extractor_regex: 'refs/tags/v(.*)$'
- uses: ncipollo/release-action@v1.21.0
with:
# by default this will use the tag push tag as the tag and name
# if we want to trigger tagging from the workflow, "tag" and "commit"
# need to be set to create a new one
prerelease: ${{ steps.semver_parser.outputs.prerelease != '' }}
skipIfReleaseExists: true
Comment thread
seantronsen marked this conversation as resolved.
6 changes: 5 additions & 1 deletion .github/workflows/go-build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ on:
type: string
default: ''

permissions: write-all # Necessary for the generate-build-provenance action with containers
permissions:
contents: write # release creation, uploading assets
packages: write # docker login, image push, upload container provenance
id-token: write # Sigstore signing (attest-build-provenance)
attestations: write # write build provenance attestations

jobs:
goreleaser:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
default: './...'

permissions:
contents: read
contents: read # baseline for checkout

jobs:
govulncheck:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/gpg-sign-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ on:
description: 'Name for the public key composite artifact'
type: string
default: 'public-keys'

permissions:
contents: read # baseline for checkout

jobs:
artifacts-sign:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
workflow_call:

permissions:
contents: read
contents: read # baseline for checkout

jobs:
actionlint:
Expand All @@ -29,8 +29,8 @@ jobs:
name: zizmor
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write # for SARIF upload to GHAS
contents: read # baseline for checkout
security-events: write # for SARIF upload to GHAS
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-registry-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
type: string

permissions:
packages: write
packages: write # delete container image versions from GHCR

jobs:
cleanup:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-signed-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
name: Release signed artifacts
run-name: Generate release with signed artifacts for ${{ github.ref }}
permissions:
contents: write
contents: write # create GitHub Release and upload artifacts
on:
workflow_call:
inputs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/trivy-image-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ on:
default: '1'

permissions:
contents: read
security-events: write # for SARIF upload to GHAS
contents: read # baseline for checkout
security-events: write # for SARIF upload to GHAS

jobs:
trivy:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/validate-rpm-quadlet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
required: true
type: string

permissions:
contents: read # baseline for checkout

jobs:
parse:
runs-on: ubuntu-latest
Expand Down