Skip to content

Commit 4878ca8

Browse files
chore(CI): add least-privilege permissions to GitHub Actions workflows (#322)
## Summary - Add explicit least-privilege `permissions` blocks to workflow files flagged by CodeQL. - Scopes derived from workflow operations (build, artifacts, Danger, release git push). - Resolves **5** open `actions/missing-workflow-permissions` alerts. ## Linear - Parent: [APPSEC-164](https://linear.app/stream/issue/APPSEC-164) ## Test plan - [ ] CI green - [ ] Code scanning alerts close after merge
1 parent 3cadef1 commit 4878ca8

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/cleanup.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- cron: "0 0 * * 0"
1111
workflow_dispatch:
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
cleanup:
1518
runs-on: ubuntu-latest

.github/workflows/pr-title-check.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ on:
44
pull_request:
55
types: [opened, edited, synchronize, reopened]
66

7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
711
jobs:
812
lint:
913
runs-on: ubuntu-latest
14+
permissions:
15+
statuses: write
1016
steps:
1117
- uses: aslafy-z/conventional-pr-title-action@v3
1218
env:

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
pull_request:
1313
types: [opened, synchronize, reopened]
1414

15+
permissions:
16+
contents: read
17+
pull-requests: read
18+
1519
jobs:
1620
lint:
1721
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)