Skip to content

Commit 2bef2f8

Browse files
authored
ci: declare per-job contents: read on the three sonar-* workflows (#158)
sonar-bulk-operations / sonar-create-project / sonar-delete-project are manual (workflow_dispatch) admin actions that checkout the repo and run .github/scripts/sonar-manager.sh with a SONAR_TOKEN. Default GITHUB_TOKEN is only used for the checkout step. Matches the per-job permissions style already used by ci.yml / ci-test-go.yml / ci-lint-go.yml in this repo. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
1 parent d92506c commit 2bef2f8

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/sonar-bulk-operations.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313

1414
jobs:
1515
bulk-operation:
16+
permissions:
17+
contents: read
1618
runs-on: ubuntu-latest
1719
steps:
1820
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/sonar-create-project.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010

1111
jobs:
1212
create-project:
13+
permissions:
14+
contents: read
1315
runs-on: ubuntu-latest
1416
steps:
1517
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/sonar-delete-project.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010

1111
jobs:
1212
delete-project:
13+
permissions:
14+
contents: read
1315
runs-on: ubuntu-latest
1416
steps:
1517
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

0 commit comments

Comments
 (0)