Commit a235ac8
committed
Use
When `actions/checkout` is used to check out the repository on CI,
it persists credentials related to the GitHub token in the local
scope configuration at `.git/config`, unless `persist-credentials`
is explicitly set to `false`. This facilitates subsequent remote
operations on the repository that could otherwise fail, but we have
no such operations in any of our workflows.
As an added layer of protection to keep these credentials from
leaking into logs (or otherwise being displayed or subject to
exfiltration) in case there is ever unintended coupling between the
operation of the test suite (or any step subsequent to checkout
that is used to prepare or run tests or other checks) and the
cloned `gitoxide` repository itself, this:
- Adds `persist-credentials: false` in a `with` mapping on every
step that uses `actions/checkout`.
- Adds a new CI job that checks that every `actions/checkout` step
in any job in any workflow sets `persist-credentials` to `false`.
In addition to usual testing on CI, the `release.yml` workflow is
among the workflows changed here, and it has also been tested:
https://github.com/EliahKagan/gitoxide/actions/runs/17899238656
See also:
- https://github.com/actions/checkout/blob/main/README.md
(Covers what happens with/without `persist-credentials: false`).
- actions/checkout#485actions/checkout with persist-credentials: false
1 parent f8be65f commit a235ac8
3 files changed
+37
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| 65 | + | |
| 66 | + | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| |||
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| 82 | + | |
| 83 | + | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
| |||
177 | 183 | | |
178 | 184 | | |
179 | 185 | | |
| 186 | + | |
| 187 | + | |
180 | 188 | | |
181 | 189 | | |
182 | 190 | | |
| |||
197 | 205 | | |
198 | 206 | | |
199 | 207 | | |
| 208 | + | |
| 209 | + | |
200 | 210 | | |
201 | 211 | | |
202 | 212 | | |
| |||
221 | 231 | | |
222 | 232 | | |
223 | 233 | | |
| 234 | + | |
| 235 | + | |
224 | 236 | | |
225 | 237 | | |
226 | 238 | | |
| |||
268 | 280 | | |
269 | 281 | | |
270 | 282 | | |
| 283 | + | |
| 284 | + | |
271 | 285 | | |
272 | 286 | | |
273 | 287 | | |
| |||
339 | 353 | | |
340 | 354 | | |
341 | 355 | | |
| 356 | + | |
| 357 | + | |
342 | 358 | | |
343 | 359 | | |
344 | 360 | | |
| |||
365 | 381 | | |
366 | 382 | | |
367 | 383 | | |
| 384 | + | |
| 385 | + | |
368 | 386 | | |
369 | 387 | | |
370 | 388 | | |
| |||
382 | 400 | | |
383 | 401 | | |
384 | 402 | | |
| 403 | + | |
| 404 | + | |
385 | 405 | | |
386 | 406 | | |
387 | 407 | | |
| |||
412 | 432 | | |
413 | 433 | | |
414 | 434 | | |
| 435 | + | |
| 436 | + | |
415 | 437 | | |
416 | 438 | | |
417 | 439 | | |
| |||
422 | 444 | | |
423 | 445 | | |
424 | 446 | | |
| 447 | + | |
| 448 | + | |
425 | 449 | | |
426 | 450 | | |
427 | 451 | | |
| |||
441 | 465 | | |
442 | 466 | | |
443 | 467 | | |
| 468 | + | |
| 469 | + | |
444 | 470 | | |
445 | 471 | | |
446 | 472 | | |
| |||
520 | 546 | | |
521 | 547 | | |
522 | 548 | | |
| 549 | + | |
| 550 | + | |
523 | 551 | | |
524 | 552 | | |
525 | 553 | | |
| |||
557 | 585 | | |
558 | 586 | | |
559 | 587 | | |
| 588 | + | |
560 | 589 | | |
561 | 590 | | |
562 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| 239 | + | |
| 240 | + | |
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
| |||
537 | 541 | | |
538 | 542 | | |
539 | 543 | | |
| 544 | + | |
| 545 | + | |
540 | 546 | | |
541 | 547 | | |
542 | 548 | | |
| |||
0 commit comments