Skip to content

Commit 2c70879

Browse files
peter-matkovskiPeter Matkovskicursoragent
authored
ci: add least-privilege permissions to GitHub Actions workflows (#3238)
## 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 **6** 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 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated GitHub Actions workflow permissions to use clearer, scoped permission settings. * Restricted automation to read-only access for pull request checks where possible, while preserving required write access for CI tasks. * Improved consistency and security across repository automation workflows. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Peter Matkovski <matkovski@Peters-MBP.local> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c89366b commit 2c70879

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212

1313
env:
1414
BUILD_CACHE_KEY: ${{ github.sha }}-dist
15+
16+
permissions:
17+
contents: read
18+
pull-requests: read
19+
1520
jobs:
1621
lint:
1722
runs-on: ubuntu-latest
@@ -25,6 +30,9 @@ jobs:
2530

2631
build:
2732
runs-on: ubuntu-latest
33+
permissions:
34+
actions: write
35+
contents: read
2836
name: Build & Validate
2937
steps:
3038
- uses: actions/checkout@v6

.github/workflows/pr-check.yml

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

7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
711
jobs:
812
pr-title:
913
name: Validate PR Title

.github/workflows/size.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
env:
1111
NODE_OPTIONS: --max_old_space_size=4096
1212

13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
1317
jobs:
1418
compressed-size:
1519
name: Compressed Size

0 commit comments

Comments
 (0)