Commit d8495cf
authored
build: Add explicit least-privilege permissions to CI workflow (#185)
Declare workflow-level contents: read as the default least-privilege scope,
and override per-job to contents: write for the build job because
maven-dependency-submission-action posts to the Dependency submission API
and that endpoint requires contents: write.
This documents the actual scope needed by each part of the workflow rather
than inheriting the repository default token permissions, which is the
recommended hardening pattern.
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
* Drop dependency-graph step, simplify perms to contents: read
Per @jdneo's review: the 'Update dependency graph' step (maven-dependency
-submission-action) has been failing in CI; removing it lets the workflow
hold to the strict workflow-level contents: read default with no per-job
write override needed.
Net change vs main:
- workflow-level permissions: contents: read (new)
- Update dependency graph step: removed
- per-job permissions: contents: write override on build: not added
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>1 parent 3f0a5d4 commit d8495cf
1 file changed
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
0 commit comments