Commit 6c3b9e9
authored
chore(ci): add top-level permissions: read-all to workflows (RAN-46 AC) (#90)
Closes one of the audit gaps from RAN-46 AC #2 ("Workflow permissions:
default to read-all, scoped up per job") + Scorecard Token-Permissions
finding.
Before:
- ci-java.yml had no permissions declaration anywhere — relied on
repo-default GITHUB_TOKEN scope (which can be write-all on older repos).
- beta-java.yml + release-java.yml only had job-level scopes; missing the
explicit top-level read-all that Scorecard checks for.
After:
- All three workflows declare `permissions: read-all` at the top level.
- ci-java.yml's build job now declares `contents: read` explicitly
(no other scopes needed — Sonar uses SONAR_TOKEN, not GITHUB_TOKEN).
- beta-java.yml and release-java.yml keep their existing job-level
`contents: write` (and `packages: write` for beta) which override the
top-level for the deploy/tag steps.
Audit confirmation (orthogonal to the (A)/(B) security-stack ruling
still pending on RAN-46):
- All `uses:` SHA-pinned across all 4 workflows (Pinned-Dependencies)
- No pull_request_target anywhere (Dangerous-Workflow)
- scorecard.yml already had `permissions: read-all` at top level1 parent 6c8497f commit 6c3b9e9
3 files changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
0 commit comments