Skip to content

Commit 8c20979

Browse files
committed
ci: add explicit permissions to address CodeQL findings
1 parent e561f4a commit 8c20979

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2222
runs-on: ubuntu-latest
2323
timeout-minutes: 5
24+
permissions:
25+
contents: read
2426
steps:
2527
- uses: actions/create-github-app-token@v2
2628
id: app-token
@@ -74,6 +76,8 @@ jobs:
7476
if: failure()
7577
needs: [release]
7678
uses: masutaka/actions/.github/workflows/pushover.yml@main
79+
permissions:
80+
contents: read
7781
secrets:
7882
PUSHOVER_API_KEY: ${{ secrets.PUSHOVER_API_KEY }}
7983
PUSHOVER_USER_KEY: ${{ secrets.PUSHOVER_USER_KEY }}

.github/workflows/schedule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
if: github.ref_name == github.event.repository.default_branch && failure()
2323
needs: codeql
2424
uses: masutaka/actions/.github/workflows/pushover.yml@main
25+
permissions:
26+
contents: read
2527
secrets:
2628
PUSHOVER_API_KEY: ${{ secrets.PUSHOVER_API_KEY }}
2729
PUSHOVER_USER_KEY: ${{ secrets.PUSHOVER_USER_KEY }}

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
test:
3434
runs-on: ubuntu-latest
3535
timeout-minutes: 5
36+
permissions:
37+
contents: read
3638
steps:
3739
- uses: actions/checkout@v4
3840
- name: Setup Go environment
@@ -45,6 +47,8 @@ jobs:
4547
if: github.ref_name == github.event.repository.default_branch && failure()
4648
needs: [actionlint, codeql, test]
4749
uses: masutaka/actions/.github/workflows/pushover.yml@main
50+
permissions:
51+
contents: read
4852
secrets:
4953
PUSHOVER_API_KEY: ${{ secrets.PUSHOVER_API_KEY }}
5054
PUSHOVER_USER_KEY: ${{ secrets.PUSHOVER_USER_KEY }}

0 commit comments

Comments
 (0)