Commit 2a829f4
committed
Pin GitHub Actions to commit SHAs, drop unmaintained coverage comment
OSSF Scorecard's pinned-dependencies check was at 1/10. Out of 14
GitHub-owned action references only 3 were SHA-pinned (all in
scorecard.yml from PR #138); the rest were on floating tags like @v4
or, in one third-party case, on a branch ref (@main). Floating refs
are mutable; supply-chain attacks on actions become silent on push.
Pinning every reference to a full-length commit SHA with the human-
readable version as a trailing comment. Dependabot already runs on the
github-actions ecosystem (added earlier in this PR) so the version
comments stay fresh as bumps land.
Workflow-by-workflow:
- bandit.yml: pin actions/checkout v6.0.2, PyCQA/bandit-action v1.0.1
- codeql.yml: pin actions/checkout v6.0.2 and all three
github/codeql-action sub-paths (init, autobuild, analyze) to v4.35.3
- publish.yml: pin actions/checkout v6.0.2, actions/setup-python v6.2.0,
actions/upload-artifact v4.6.2, actions/download-artifact v4.3.0,
and pypa/gh-action-pypi-publish v1.14.0 (was @release/v1 branch)
- python.yml: pin actions/checkout v6.0.2, actions/setup-python v6.2.0;
drop MishaKav/pytest-coverage-comment@main step entirely. It was the
only third-party action on a moving branch ref and the only reason
the build job needed pull-requests: write. Coverage still gets
printed to the workflow log via pytest --cov-report term-missing.
The pip-install commands in these workflows are still unpinned. That's
a follow-up PR -- requires generating a hash-pinned requirements.txt
with pip-tools and reworking the install steps.1 parent 8410499 commit 2a829f4
4 files changed
Lines changed: 13 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | | - | |
| 18 | + | |
21 | 19 | | |
22 | 20 | | |
23 | | - | |
| 21 | + | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
0 commit comments