Skip to content

Commit 2fee640

Browse files
committed
fix: add explicit permissions block to CI workflow
Add minimal permissions block to comply with GitHub security best practices. The GITHUB_TOKEN now only has 'contents: read' permission, which is sufficient for a CI workflow that only runs tests and builds. This resolves the CodeQL alert: 'Workflow does not contain permissions' See: https://docs.github.com/en/actions/security-guides/automatic-token-validation
1 parent 662ac3e commit 2fee640

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
pull_request:
77
branches: ["**"]
88

9+
# Minimum permissions required for CI workflow (secure by default).
10+
# See: https://docs.github.com/en/actions/security-guides/automatic-token-validation
11+
permissions:
12+
contents: read
13+
914
jobs:
1015
test:
1116
name: Test

0 commit comments

Comments
 (0)