Skip to content

Commit 59e3c2c

Browse files
committed
ci: declare workflow-level contents: read on 7 CI workflows
All 7 workflows (checkDependencies, ci, codeql, doCleanCode, pr-checks, unit-tests, version-increments) just run checks and validation. No GitHub API writes from the workflows themselves at the workflow level. For workflows where individual jobs need a higher scope (e.g., codeql analyze typically needs security-events: write), job-level permissions can still override upward. This PR only adds the workflow-level cap. Same post-CVE-2025-30066 (tj-actions/changed-files) hardening pattern. yaml.safe_load validated on each touched file. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
1 parent 3b9b910 commit 59e3c2c

7 files changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/checkDependencies.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
schedule:
88
- cron: '0 0 * * *'
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
check-dependencies:
1215
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/workflows/checkDependencies.yml@master

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
- 'docs/**'
1616
- '*.md'
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
build:
2023
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/workflows/mavenBuild.yml@master

.github/workflows/codeql.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
schedule:
99
- cron: '15 8 * * 1'
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
callCodeQLworkflow:
1316
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/workflows/codeQLworkflow.yml@master

.github/workflows/doCleanCode.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
schedule:
88
- cron: '0 2 * * *'
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
clean-code:
1215
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/workflows/cleanCode.yml@master

.github/workflows/pr-checks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
pull_request:
1010
branches: [ master ]
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
check-freeze-period:
1417
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/workflows/verifyFreezePeriod.yml@master

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
types:
77
- completed
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
check:
1114
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/workflows/publishTestResults.yml@master

.github/workflows/version-increments.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
workflows: [ 'Pull-Request Checks' ]
66
types: [ completed ]
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
publish-version-check-results:
1013
uses: eclipse-platform/eclipse.platform.releng.aggregator/.github/workflows/publishVersionCheckResults.yml@master

0 commit comments

Comments
 (0)