Commit 3310588
docs: apply deny-by-default permissions to all README examples (#425)
* docs: add top-level permissions: {} to secret-scan example
Completes the per-job permissions pattern by denying all permissions at
the workflow level by default, then granting only contents: read to the
trufflehog job. Prevents consumers of the reusable workflow from
inheriting permissive GITHUB_TOKEN defaults.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: add top-level permissions: {} to all README examples
Applies deny-by-default permissions at the workflow level across every
template example (intro + 17 workflows). Per-job permissions already
existed and were left unchanged.
GitHub does not auto-zero workflow-level permissions when job-level
permissions are set; jobs without their own block still inherit the
workflow-level scope (or the repo default, often write-all). The
top-level {} ensures that any job without an explicit permissions block
gets nothing instead of the repo default, protecting consumers against
future job additions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ada67d3 commit 3310588
1 file changed
Lines changed: 42 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
| |||
117 | 124 | | |
118 | 125 | | |
119 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
120 | 130 | | |
121 | 131 | | |
122 | 132 | | |
| |||
141 | 151 | | |
142 | 152 | | |
143 | 153 | | |
| 154 | + | |
| 155 | + | |
144 | 156 | | |
145 | 157 | | |
146 | 158 | | |
| |||
181 | 193 | | |
182 | 194 | | |
183 | 195 | | |
| 196 | + | |
| 197 | + | |
184 | 198 | | |
185 | 199 | | |
186 | 200 | | |
| |||
221 | 235 | | |
222 | 236 | | |
223 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
224 | 241 | | |
225 | 242 | | |
226 | 243 | | |
| |||
308 | 325 | | |
309 | 326 | | |
310 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
311 | 331 | | |
312 | 332 | | |
313 | 333 | | |
| |||
342 | 362 | | |
343 | 363 | | |
344 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
345 | 368 | | |
346 | 369 | | |
347 | 370 | | |
| |||
370 | 393 | | |
371 | 394 | | |
372 | 395 | | |
| 396 | + | |
| 397 | + | |
373 | 398 | | |
374 | 399 | | |
375 | 400 | | |
| |||
399 | 424 | | |
400 | 425 | | |
401 | 426 | | |
| 427 | + | |
| 428 | + | |
402 | 429 | | |
403 | 430 | | |
404 | 431 | | |
| |||
447 | 474 | | |
448 | 475 | | |
449 | 476 | | |
| 477 | + | |
| 478 | + | |
450 | 479 | | |
451 | 480 | | |
452 | 481 | | |
| |||
487 | 516 | | |
488 | 517 | | |
489 | 518 | | |
| 519 | + | |
| 520 | + | |
490 | 521 | | |
491 | 522 | | |
492 | 523 | | |
493 | 524 | | |
494 | | - | |
495 | 525 | | |
496 | 526 | | |
| 527 | + | |
497 | 528 | | |
498 | 529 | | |
499 | 530 | | |
| |||
506 | 537 | | |
507 | 538 | | |
508 | 539 | | |
| 540 | + | |
| 541 | + | |
509 | 542 | | |
510 | 543 | | |
511 | 544 | | |
| |||
542 | 575 | | |
543 | 576 | | |
544 | 577 | | |
| 578 | + | |
| 579 | + | |
545 | 580 | | |
546 | 581 | | |
547 | 582 | | |
| |||
573 | 608 | | |
574 | 609 | | |
575 | 610 | | |
| 611 | + | |
| 612 | + | |
576 | 613 | | |
577 | 614 | | |
578 | 615 | | |
| |||
612 | 649 | | |
613 | 650 | | |
614 | 651 | | |
| 652 | + | |
| 653 | + | |
615 | 654 | | |
616 | 655 | | |
617 | 656 | | |
| |||
643 | 682 | | |
644 | 683 | | |
645 | 684 | | |
| 685 | + | |
| 686 | + | |
646 | 687 | | |
647 | 688 | | |
648 | 689 | | |
| |||
0 commit comments