Commit 447ab7a
ci: give every Unity Cloud Build job a least-privilege permissions block
Audited every token-consuming operation per job: prebuild needs
contents:read (checkout + version composite's git fetch), statuses:write
(the four createCommitStatus calls) and pull-requests:read (changed-files
REST fallback); build needs contents:read, actions:read (runs/{id}/jobs)
and pull-requests:write (status-comment CRUD via build.py); build-gate
touches no token at all. The two workflow_call callers' build jobs get
the union block so the calls keep working if the repo default token
ever tightens (a caller caps its callee).
Fork PRs already run with a read-only token regardless of these blocks;
status/comment writes there fail today and are unchanged by this.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 536e961 commit 447ab7a
3 files changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
74 | 81 | | |
75 | 82 | | |
76 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
212 | 220 | | |
213 | 221 | | |
214 | 222 | | |
| |||
550 | 558 | | |
551 | 559 | | |
552 | 560 | | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
553 | 569 | | |
554 | 570 | | |
555 | 571 | | |
| |||
1018 | 1034 | | |
1019 | 1035 | | |
1020 | 1036 | | |
| 1037 | + | |
| 1038 | + | |
1021 | 1039 | | |
1022 | 1040 | | |
1023 | 1041 | | |
| |||
0 commit comments