Commit d18c5eb
committed
ci: pin actions to SHAs and harden workflows
## What
Pin all GitHub Actions to full commit SHAs (with version comments) and apply
baseline security hardening from the gha-standards skill across both workflows.
## Why
Floating tag references (e.g. @v6) can be re-pointed if a maintainer account
is compromised. SHA pinning prevents supply-chain swaps. The accompanying
hardening (workflow-level permissions:{}, job-scoped permissions with
justification, harden-runner egress monitoring, persist-credentials:false on
checkout, PR-aware concurrency) applies least-privilege defaults.
## Notes
- harden-runner is set to egress-policy: audit, not block. It will report
unexpected network calls but not fail the build. Switch to block only after
reviewing a few audit runs.
- contributors.yml omits a concurrency block intentionally — it's
schedule/workflow_dispatch only, where concurrent runs are not a concern.
- ci.yml's concurrency uses github.head_ref || github.ref so PRs each get
their own group, and cancel-in-progress only fires on pull_request events
so post-submit push runs aren't interrupted.
- permissions:{} at workflow level is deny-all. New jobs added later without
their own permissions: block will have no token scopes — reviewers should
watch for that.
- contributors.yml's job has discussions:write but no contents:read. The
create-discussion step reads ./contributors.md generated by the prior
contributors step in the same workspace, so no checkout is needed — worth
a watch on the next scheduled run.
Signed-off-by: jmeridth <jmeridth@gmail.com>1 parent c4e7453 commit d18c5eb
2 files changed
Lines changed: 23 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | | - | |
17 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
30 | | - | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
40 | | - | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
0 commit comments