Commit 4f89e0d
authored
ci(security-review): add safe-to-review label as alternate trigger (#1297)
* ci(security-review): add safe-to-review label as alternate trigger for community PRs
Re-add the labeled event to pull_request_target so maintainers can kick the
security review on a community PR by applying 'safe-to-review' without
committing to an approval. The auth gate keys on the labeler (sender) for
that path, mirroring the approver path. Other label changes are filtered
out at the job level so unrelated label churn doesn't spawn API calls.
CONTRIBUTING.md updated to describe the dual-path.
* ci(security-review): use GitHub App token on every github-script step
Default GITHUB_TOKEN is read-only on pull_request_target / pull_request_review
events from forks (GitHub policy, ignores the workflow's permissions: block).
That made the label-add step fail with 403 'Resource not accessible by
integration' on community PRs, which then short-circuited the rest of the
job (including the Generate GitHub App token step), causing the summary
step to fail with 'Input required and not supplied: github-token'.
Hoist the App token step to the top of the security-review job and pass
${{ steps.app-token.outputs.token }} on every github-script step that
mutates state (label add, label remove, summary comment). The Resolve PR
number step also gets it for consistency, even though it only reads.
Verified the cancelled state on PR #1297's first run was unrelated: it was
concurrency: cancel-in-progress canceling the pull_request_target run when
the pull_request_review run queued — expected behavior, not a bug.1 parent fcbdf59 commit 4f89e0d
2 files changed
Lines changed: 47 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | | - | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
55 | 67 | | |
56 | 68 | | |
57 | 69 | | |
| |||
94 | 106 | | |
95 | 107 | | |
96 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
97 | 119 | | |
98 | 120 | | |
99 | 121 | | |
100 | 122 | | |
101 | 123 | | |
102 | 124 | | |
| 125 | + | |
103 | 126 | | |
104 | 127 | | |
105 | 128 | | |
| |||
119 | 142 | | |
120 | 143 | | |
121 | 144 | | |
| 145 | + | |
122 | 146 | | |
123 | 147 | | |
124 | 148 | | |
| |||
181 | 205 | | |
182 | 206 | | |
183 | 207 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | 208 | | |
192 | 209 | | |
193 | 210 | | |
| |||
264 | 281 | | |
265 | 282 | | |
266 | 283 | | |
| 284 | + | |
267 | 285 | | |
268 | 286 | | |
269 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
0 commit comments