Skip to content

Commit 3639710

Browse files
authored
chore(vuln): scope workflow permissions to least privilege (SEC-167) (#195)
1 parent 933f49c commit 3639710

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/housekeeping.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
schedule:
55
- cron: '42 1 * * *'
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
prs:
912
name: Clean up stale prs
@@ -39,6 +42,8 @@ jobs:
3942
branches:
4043
name: Cleanup old branches
4144
runs-on: ubuntu-latest
45+
permissions:
46+
contents: write
4247
steps:
4348
- name: Harden the runner (Audit all outbound calls)
4449
uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0

.github/workflows/pr-description-enforcer.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ on:
66
- edited
77
- reopened
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
enforce:
1114
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: read
1218

1319
steps:
1420
- name: Harden the runner (Audit all outbound calls)

.github/workflows/tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
1111
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
1216
jobs:
1317
unit:
1418
name: Unit

0 commit comments

Comments
 (0)