Skip to content

Commit 5c02030

Browse files
docs: document actions pinning policy (#136)
Co-authored-by: CoderDeltaLAN <CoderDeltaLAN@users.noreply.github.com>
1 parent 6e41c74 commit 5c02030

3 files changed

Lines changed: 74 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This project has a published GitHub Release line, but no stable support or API g
66

77
## [Unreleased]
88

9+
- Documented the GitHub Actions pinning policy decision before the v0.4.0 release train.
910
- Refreshed the external audit package manifest and corrected pre-v0.4.0 readiness statuses after F-01.
1011
- Triaged superseded v0.3.1 release-target wording before the v0.4.0 release train.
1112
- Add non-UTF-8 error-contract coverage for `dedupe` and `conflicts`.

docs/ACTIONS-PINNING-POLICY.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# GitHub Actions Pinning Policy
2+
3+
Status: accepted policy decision.
4+
Scope: GitHub Actions workflow references for this repository.
5+
Current phase: policy decision only; no workflow action references are changed here.
6+
7+
## Decision
8+
9+
agent-rules-kit accepts full-length commit SHA pinning as the stricter long-term supply-chain policy for GitHub Actions.
10+
11+
The implementation is intentionally separated from this documentation phase. Action references must not be converted by string replacement or broad automation. Each action must preserve its full repository path, including sub-actions such as github/codeql-action/init and github/codeql-action/analyze.
12+
13+
## Why this policy exists
14+
15+
GitHub's security guidance states that pinning an action to a full-length commit SHA is currently the only way to use an action as an immutable release.
16+
17+
The same guidance also notes that tag-based references are more convenient and common, but tags can move or be deleted if an action repository is compromised.
18+
19+
This project currently uses explicit version tags for trusted actions. That is acceptable as a transitional state, not as the final strictest policy.
20+
21+
## Required implementation rules
22+
23+
A future implementation phase must:
24+
25+
- use a dedicated branch;
26+
- update only workflow action references and the local audit inventory needed to verify them;
27+
- verify each SHA belongs to the canonical action repository, not a fork;
28+
- preserve sub-action paths exactly;
29+
- keep workflow permissions minimal;
30+
- run local checks before stage;
31+
- stage exact files only;
32+
- run a strong pre-push before push;
33+
- verify PR checks and main checks by exact SHA;
34+
- document the update path for future Dependabot or manual refreshes.
35+
36+
## Prohibited implementation shortcuts
37+
38+
Do not:
39+
40+
- rewrite action references with blind regex replacement;
41+
- collapse sub-actions such as github/codeql-action/init into github/codeql-action;
42+
- invent SHAs;
43+
- copy SHAs from unofficial sources;
44+
- combine pinning with release, PyPI, README final, dependency changes, branch protection, Scorecard, CodeQL, or product behavior;
45+
- describe SHA pinning as a security guarantee.
46+
47+
## Current workflow references
48+
49+
Current transitional references:
50+
51+
- actions/checkout@v7
52+
- actions/setup-python@v6
53+
- github/codeql-action/init@v4
54+
- github/codeql-action/analyze@v4
55+
- actions/upload-artifact@v4
56+
- actions/download-artifact@v8
57+
- pypa/gh-action-pypi-publish@release/v1
58+
59+
## Release-train impact
60+
61+
For v0.4.0, this policy closes the decision gap.
62+
63+
The actual conversion to full-length SHA pinning remains a separate supply-chain implementation phase and must not be rushed into a release branch without exact repository/SHA verification and a clean Always-Green run.

docs/SECURITY-SUPPLY-CHAIN-EVALUATION.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,24 +129,27 @@ Recommended future Scorecard phase boundary:
129129

130130
## GitHub Actions pinning policy
131131

132-
The workflows currently use version tags such as `actions/checkout@v7`, `actions/setup-python@v6`, `actions/upload-artifact@v4`, `actions/download-artifact@v8`, and `pypa/gh-action-pypi-publish@release/v1`.
132+
The workflows currently use version tags such as `actions/checkout@v7`, `actions/setup-python@v6`, `github/codeql-action/init@v4`, `github/codeql-action/analyze@v4`, `actions/upload-artifact@v4`, `actions/download-artifact@v8`, and `pypa/gh-action-pypi-publish@release/v1`.
133133

134-
Potential stronger policy:
134+
Current policy decision:
135135

136-
- pin third-party actions by full commit SHA;
137-
- document how pinned actions are reviewed and updated.
136+
- full-length commit SHA pinning is accepted as the stricter long-term GitHub Actions supply-chain policy;
137+
- the current tag-based references are a transitional state, not the final strictest policy;
138+
- the policy and implementation guardrails are documented in `docs/ACTIONS-PINNING-POLICY.md`.
138139

139140
Risks and constraints:
140141

141142
- full SHA pinning improves immutability but increases update burden;
142143
- a partial or stale pinning policy can create false confidence;
143-
- changing action references must be its own CI/supply-chain phase.
144+
- changing action references must be its own CI/supply-chain implementation phase;
145+
- sub-actions such as `github/codeql-action/init` and `github/codeql-action/analyze` must preserve their full path when pinned.
144146

145147
Decision for this phase:
146148

147-
- do not change action references here;
149+
- do not change workflow action references here;
148150
- keep current explicit permissions;
149-
- evaluate action pinning in a separate phase if the maintainer wants stricter supply-chain hardening.
151+
- record the accepted policy and exact implementation guardrails;
152+
- defer actual SHA conversion to a dedicated implementation phase with exact repository/SHA verification.
150153

151154
## Decision
152155

0 commit comments

Comments
 (0)