Tags like @v4, latest or an unpinned package can change under you without a commit in this repo (see the tj-actions/changed-files incident, March 2025). Pinning makes every change to what runs visible in git.
Enterprise practice: actions pinned by commit SHA, images by digest, packages by hash, downloaded binaries verified by checksum.
Steps
Pin every uses: to a full commit SHA with the version as a comment (@<sha> # v4)
Lock lint tools with hashes: move direct dependencies to requirements-dev.in, generate requirements-dev.txt with uv pip compile --generate-hashes, and install with pip install --require-hashes -r requirements-dev.txt
Downloaded binaries are checked against a SHA-256 (Betterleaks)
Pin container images in adopted stacks by digest (image: name:tag@sha256:...), as part of each stack adoption
No workflow, requirements file or stack references a moving tag or an unhashed package.
Tags like `@v4`, `latest` or an unpinned package can change under you without a commit in this repo (see the `tj-actions/changed-files` incident, March 2025). Pinning makes every change to what runs visible in git.
**Enterprise practice:** actions pinned by commit SHA, images by digest, packages by hash, downloaded binaries verified by checksum.
## Steps
- [ ] Pin every `uses:` to a full commit SHA with the version as a comment (`@<sha> # v4`)
- [ ] Lock lint tools with hashes: move direct dependencies to `requirements-dev.in`, generate `requirements-dev.txt` with `uv pip compile --generate-hashes`, and install with `pip install --require-hashes -r requirements-dev.txt`
- [ ] Downloaded binaries are checked against a SHA-256 (Betterleaks)
- [ ] Pin container images in adopted stacks by digest (`image: name:tag@sha256:...`), as part of each stack adoption
- [ ] Document the pinning rule in `CONVENTIONS.md`
## Tools
uv (`uv pip compile`), pip `--require-hashes`, `sha256sum`.
## Done when
No workflow, requirements file or stack references a moving tag or an unhashed package.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Tags like
@v4,latestor an unpinned package can change under you without a commit in this repo (see thetj-actions/changed-filesincident, March 2025). Pinning makes every change to what runs visible in git.Enterprise practice: actions pinned by commit SHA, images by digest, packages by hash, downloaded binaries verified by checksum.
Steps
uses:to a full commit SHA with the version as a comment (@<sha> # v4)requirements-dev.in, generaterequirements-dev.txtwithuv pip compile --generate-hashes, and install withpip install --require-hashes -r requirements-dev.txtimage: name:tag@sha256:...), as part of each stack adoptionCONVENTIONS.mdTools
uv (
uv pip compile), pip--require-hashes,sha256sum.Done when
No workflow, requirements file or stack references a moving tag or an unhashed package.