Commit 357d2fe
authored
chore: apply security best practices and onboard stepsecurity (#131)
This pull request updates the GitHub Actions workflows to improve
security and reliability. The main changes include hardening the CI
runners, pinning action versions to specific commit SHAs, and updating
permissions for certain jobs.
**Security hardening and workflow improvements:**
* Added the `step-security/harden-runner` action to all workflows
(`commit-lint.yml`, `npm-publish.yml`, `pull_request_checks.yml`),
blocking all network egress except for globally allowed endpoints.
[[1]](diffhunk://#diff-f9aa500b86b242f58f185509ad323b3526cf5effc683df4b5cb4d78df4108c5fR7-R26)
[[2]](diffhunk://#diff-8a5ce8b612395836520d0655143f732d08e747af57f3cfe76b5e283600106240L16-R23)
[[3]](diffhunk://#diff-ae3a094ad37eeebef2d33cfc7571af414c00ce49e02be88f32f3de2905a8a2d1L12-R19)
* Replaced version tags for `actions/checkout` and `actions/setup-node`
with specific commit SHAs to prevent supply chain attacks.
[[1]](diffhunk://#diff-f9aa500b86b242f58f185509ad323b3526cf5effc683df4b5cb4d78df4108c5fR7-R26)
[[2]](diffhunk://#diff-8a5ce8b612395836520d0655143f732d08e747af57f3cfe76b5e283600106240L16-R23)
[[3]](diffhunk://#diff-ae3a094ad37eeebef2d33cfc7571af414c00ce49e02be88f32f3de2905a8a2d1L12-R19)
* Pinned AWS-related actions (`aws-actions/configure-aws-credentials`,
`aws-actions/aws-secretsmanager-get-secrets`) to specific commit SHAs in
`npm-publish.yml`.
**Permissions and access control:**
* Added or updated `permissions` blocks to restrict and explicitly
define required permissions for jobs, including granting `id-token:
write` where needed for OIDC authentication.
[[1]](diffhunk://#diff-f9aa500b86b242f58f185509ad323b3526cf5effc683df4b5cb4d78df4108c5fR7-R26)
[[2]](diffhunk://#diff-8a5ce8b612395836520d0655143f732d08e747af57f3cfe76b5e283600106240R32-R56)1 parent 5b34ebb commit 357d2fe
File tree
3 files changed
+43
-10
lines changed- .github/workflows
3 files changed
+43
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
13 | 24 | | |
14 | 25 | | |
15 | | - | |
| 26 | + | |
16 | 27 | | |
17 | 28 | | |
18 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| |||
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| 32 | + | |
| 33 | + | |
26 | 34 | | |
27 | | - | |
28 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
29 | 43 | | |
30 | 44 | | |
31 | 45 | | |
32 | 46 | | |
33 | 47 | | |
34 | 48 | | |
35 | 49 | | |
36 | | - | |
| 50 | + | |
37 | 51 | | |
38 | 52 | | |
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
42 | | - | |
| 56 | + | |
43 | 57 | | |
44 | 58 | | |
45 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | | - | |
13 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
14 | 22 | | |
15 | 23 | | |
16 | 24 | | |
| |||
0 commit comments