Skip to content

checks: pin actions/checkout to its commit and the archlinux container to a digest - #853

Open
mptfire wants to merge 1 commit into
derekross:mainfrom
mptfire:audit/ci-pin-actions
Open

mptfire wants to merge 1 commit into
derekross:mainfrom
mptfire:audit/ci-pin-actions

Conversation

@mptfire

@mptfire mptfire commented Nov 16, 2026

Copy link
Copy Markdown

Supply-chain hardening (audit round 2, 2026-11-16, finding S-1).

The two CI inputs that can move under a PR without any code change:

  • actions/checkout@v5 -> pinned to v5.0.0 commit 08c6903cd8c0fde910a37f88322edcfb5dd907a8 (.github/workflows/checks.yml, ci/linux-omarchy-mobile/checks.yml).
  • container: archlinux:latest -> pinned to the 2026-11-16 amd64 digest sha256:d4594bb2…. Bump the digest deliberately to update.

Both workflows keep their current behavior; tags/SHAs verified against the GitHub API today.

@derekross

Copy link
Copy Markdown
Owner

Thanks for this, and for the three beside it. I checked both pins against their sources rather than take them from the description: 08c6903c… is what refs/tags/v5.0.0 points at in actions/checkout, and sha256:d4594bb2… is what Docker Hub returns for archlinux:latest today (the image index; its one amd64 image was built on 2026-11-09). Both are genuine.

One change, please. @v5 doesn't run v5.0.0 today: the v5 tag is at v5.1.0 (fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09, 2026-07-20), which adds three commits on top of v5.0.0, among them the backported safer pull_request_target default and "backport fixes to releases-v5". So the pin as written moves CI back a release, and "both workflows keep their current behavior" isn't quite right. Could you pin fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 with the comment # actions/checkout v5.1.0, in all four places?

On the container: the job still runs pacman -Syu, so the packages are the mirror's of the day whatever the base is. What the digest fixes is the base layer, and with it pacman and the keyring that verifies everything else, which I think is worth pinning. My worry is the other direction: nothing bumps the digest, and an Arch image that is months old fails pacman -Syu as soon as a packager's key is newer than its keyring. Two small additions would cover that: refresh the keyring first (pacman -Sy --noconfirm --needed archlinux-keyring before the existing line), and put the command that reads the new digest into the comment (docker buildx imagetools inspect archlinux:latest), so a bump is one copy and paste. The comment could also say it is the image index resolved on 2026-11-16, since the image inside is from the 9th.

Two notes for the merge, nothing for you to do: #690 adds fetch-depth: 0 under the same checkout line, so whichever lands second gets a one-line rebase; and ci/linux-omarchy-mobile/checks.yml is the copy we keep beside the tool, so I'll carry the same pin over to the kernel repository's workflow myself.

Your run was waiting for my approval as a first contribution; I'll approve it once the v5.1.0 pin is in.

…tainer to its digest

Supply-chain hardening from the 2026-11-16 security audit (S-1):
tag-pinned actions and a floating container image are the two CI
inputs that can move under a PR without any code change. Pin the
action to the v5.1.0 commit (fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09,
what @v5 resolves to today) and the container to the image index
digest resolved on 2026-11-16 (the amd64 image inside is from
2026-11-09); bump the digest deliberately to update, and refresh
archlinux-keyring first so an older base can still verify a newer
packager key.

Assisted-By: pi coding agent (adversarial audit, 2026-11-16)

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your run has been approved and it is green on this head, both jobs, so the pinned checkout commit and the pinned container digest both work in practice. I re-checked the two values against GitHub and Docker Hub again today and they are still genuine.

The one thing still open is the release: v5 in actions/checkout points at v5.1.0 (fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09), so pinning v5.0.0 moves CI back a release. Could you change the four uses: lines to that commit, with the comment # actions/checkout v5.1.0? If you'd rather not come back to it, say so and I'll push that change to your branch myself.

The keyring refresh before pacman -Syu and the digest-reading command in the comment are still welcome in the same push, but I won't hold the merge for them.

@mptfire
mptfire force-pushed the audit/ci-pin-actions branch from 5414140 to ad4f416 Compare November 19, 2026 20:10
@mptfire

mptfire commented Nov 19, 2026

Copy link
Copy Markdown
Author

Reworked: all four pins are now actions/checkout v5.1.0 (fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 — verified against refs/tags/v5.1.0), the container comment names the imagetools command and dates both the index resolution (2026-11-16) and the inner image (2026-11-09), and archlinux-keyring is refreshed before the -Syu. The kernel-repo copy carries the same action pins.

Rebased onto current main (c462357) so the #690 fetch-depth overlap can be seen directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants