Skip to content

Commit d377d6f

Browse files
committed
security: add explicit permissions to discover and aggregate-security jobs
**Security Issue:** GitHub Code Scanning alerts #241 and #242 flagged missing explicit permissions in full-build.yml workflow jobs. **Risk:** Without explicit permissions, GITHUB_TOKEN may receive overly broad permissions by default, violating principle of least privilege. **Fix:** Added minimal permissions blocks to: - discover job (line 30): contents: read - aggregate-security job (line 582): contents: read Both jobs only need read access to checkout code and read manifests. No write permissions required. **Resolves:** - Code Scanning Alert #241 (discover job) - Code Scanning Alert #242 (aggregate-security job)
1 parent 18847b1 commit d377d6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/full-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
discover:
3030
runs-on: ubuntu-latest
3131
timeout-minutes: 10
32+
permissions:
33+
contents: read
3234
outputs:
3335
exporters: ${{ steps.detect.outputs.exporters }}
3436
build_needed: ${{ steps.detect.outputs.build_needed }}
@@ -584,6 +586,8 @@ jobs:
584586
if: always() && !cancelled() && needs.discover.outputs.build_needed == 'true'
585587
runs-on: ubuntu-latest
586588
timeout-minutes: 10
589+
permissions:
590+
contents: read
587591
steps:
588592
- uses: actions/checkout@v6
589593

0 commit comments

Comments
 (0)