From ff518da4d7ff57318e6eda20a870193b09b90069 Mon Sep 17 00:00:00 2001 From: Guy Saar Date: Fri, 13 Nov 2026 11:21:56 -0600 Subject: [PATCH] Scope workflow token permissions and waive placeholder GCS key - preview-readme, release, verify-chart-version: default to contents: read; grant pull-requests: write to the preview job and contents/packages: write to the release job only. - .github/repoguard.yaml: waive sha256:3021d90eb943, the truncated placeholder private key in the GCS service-account examples. Co-Authored-By: Claude Opus 5.5 --- .github/repoguard.yaml | 4 ++++ .github/workflows/preview-readme.yaml | 6 ++++++ .github/workflows/release.yaml | 6 ++++++ .github/workflows/verify-chart-version.yaml | 3 +++ 4 files changed, 19 insertions(+) create mode 100644 .github/repoguard.yaml diff --git a/.github/repoguard.yaml b/.github/repoguard.yaml new file mode 100644 index 0000000..96c20d7 --- /dev/null +++ b/.github/repoguard.yaml @@ -0,0 +1,4 @@ +waivers: + - check: no-hardcoded-keys + reason: "Not a credential: truncated placeholder private key in the GCS service-account examples (README, override-values example, test-values)" + findings: [sha256:3021d90eb943] diff --git a/.github/workflows/preview-readme.yaml b/.github/workflows/preview-readme.yaml index 9327f86..a562552 100644 --- a/.github/workflows/preview-readme.yaml +++ b/.github/workflows/preview-readme.yaml @@ -8,6 +8,9 @@ on: - README.md.gotmpl - README.md +permissions: + contents: read + jobs: preview-readme: # This job checks out the head branch by name and posts the rendered README @@ -20,6 +23,9 @@ jobs: if: github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest timeout-minutes: 5 + permissions: + contents: read + pull-requests: write # post/minimize the preview comment steps: - uses: actions/checkout@v7 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 82a35a2..fff1875 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,6 +7,9 @@ on: paths: - charts/s3proxy/** +permissions: + contents: read + jobs: update-readme: runs-on: ubuntu-latest @@ -74,6 +77,9 @@ jobs: runs-on: ubuntu-latest needs: - update-readme + permissions: + contents: write # GitHub release + tag + packages: write # push chart to ghcr.io steps: - name: Checkout repository uses: actions/checkout@v7 diff --git a/.github/workflows/verify-chart-version.yaml b/.github/workflows/verify-chart-version.yaml index c30dc6b..7db51ac 100644 --- a/.github/workflows/verify-chart-version.yaml +++ b/.github/workflows/verify-chart-version.yaml @@ -12,6 +12,9 @@ on: # status"). Instead the job always runs and no-ops (passes) when the chart is # not modified — see the "Detect chart changes" step below. +permissions: + contents: read + jobs: verify-version: runs-on: ubuntu-latest