All posts

AI Engineering

100% Action Pins, Unpinned CI Inputs: A Lockfile Boundary Audit

Separate declared action pins from reusable workflows, containers, runners, and runtime downloads with a synthetic inventory and 11 independently executed tests.

Published and maintained by Sambro · Report a correction

7 min read GitHub ActionsLockfilesCI reproducibilityCoding agents

What belongs in the denominator?

A coding agent reports that every CI dependency is pinned. Both actions in the review have commit identifiers. Yet the same workflow calls a reusable workflow on main, uses a latest container and a changing runner image, and downloads an installer at runtime. Two out of two can be accurate without describing the entire execution environment.

This article argues for keeping action coverage and other inputs in separate columns, not for avoiding lockfiles. We run an independent JSON inventory exercise and define a useful read-only assignment for an agent. We do not implement GitHub lockfile verification or change production workflow settings.

Check the release date and the actual boundary

GitHub announced general availability of Actions workflow lockfiles on October 28, 2026. The gh actions-lock extension generates .github/workflows/actions.lock for actions and their transitive dependencies. No individual byline is displayed; this is a GitHub announcement. github.blog — 2026-10-28-github-actions-workflow-lockfiles-are-generally-available

Official documentation excludes reusable-workflow calls at jobs.<job_id>.uses. Pin the call with a full commit SHA; the called workflow’s action dependencies belong to its defining repository’s lockfile. Runner images and input values are also outside this boundary. This living documentation was checked October 31, 2026 UTC. docs.github.com — workflow-dependency-lockfiles

The official CLI repository also excludes container images. It distinguishes --verify-local, an offline coverage check without provenance verification, from --verify. Compare community explanations and search snippets with current documentation and the installed version’s --help. Repository checked on the same date: github.com — gh-actions-lock

An independent six-row inventory

The synthetic inventory contains build, a direct action, and upload, a transitive action. Their lockSha values repeat a and b forty times: they are fictional. release references a reusable workflow on main; image uses a latest container; runner represents ubuntu-latest; installer represents a runtime installer download. There are no real repositories or executable attack payloads in this fixture.

The function puts only declared action rows in the action denominator. The other four rows remain in outsideActionLockfile. needsAttention separately lists items requiring follow-up under our example rules. This distinguishes an independently pinned identifier from an input managed by the action lockfile.

The function reads JSON; it does not parse YAML or discover transitive dependencies. If a person omits a dependency, it cannot discover the missing row. Accordingly, the metric is named declaredActionPins. Neither inventory completeness nor real lockfile verification success is being measured.

The same ratio can leave different work outstanding

We ran the example on October 31, 2026 UTC (November 1 in Korea) with Node.js 24.22.1. It needs no external packages, API keys, or model calls. All 11 example tests passed. Save these four files in one directory, then run the commands below.

Code: lock boundary — audit.mjs · Synthetic inventory: lock boundary — fixture.json · Tests: lock boundary — audit.test.mjs · Observed output: lock boundary — results.json

baseline has 2/2 action pins but four other items needing attention. missing_transitive removes only upload’s lockSha, producing 1/2 and five follow-up items. additional_pins gives the workflow a fictional full SHA and the image a fictional digest. Attention narrows to runner and installer, while four inputs remain outside the action lockfile.

The additional SHA and digest are repeated characters, not verified objects. They illustrate syntax and must not be copied into production. These counts describe a hand-authored fixture, not a survey of GitHub repositories or Sambro’s production CI.

Run after saving the four files; Node.js 22 or later
node audit.mjs fixture.json
node --test audit.test.mjs
Observed summary of the synthetic inventory
case                 declared action pins  outside action lockfile  needs attention
baseline             2/2 = 100%            4                        4
missing_transitive   1/2 = 50%             4                        5
additional_pins      2/2 = 100%            4                        2

Do not silently accept short SHAs or empty denominators

Tests reject duplicate IDs, unknown categories, and invalid action origins. A short commit string does not count as an action pin. An empty inventory returns ratio: null rather than 100%. A local-action remains a separate-review item. We also check that auditing does not mutate the input.

Syntax is not provenance or content review. Forty characters do not establish that a commit exists, belongs to the intended repository history, or contains acceptable code. The output therefore always states that it provides no provenance, safety, completeness, or reproducibility verdict. There is no final all-safe boolean.

A more specific runner label alone does not freeze every package or external service. Record the execution environment separately and make downloaded inputs traceable to the files actually checked. That is an operational recommendation, not a capability implemented by this small example.

Ask an agent to map boundaries before changing them

Start with a read-only request: separate actions, reusable workflows, images, runners, and runtime downloads, and attach a source location to each inventory row. Ask for inspected file scope and unresolved inputs rather than an all-pinned conclusion. Looking only at uses lines can miss downloads performed inside run steps.

If adoption is authorized, use an isolated branch and follow the official setup procedure. Generate and update the file with the CLI rather than editing it by hand; you can start with one workflow. We did not install or execute gh actions-lock, run GitHub lockfile verification, or change shared CI configuration for this article. Setup: docs.github.com — lock-workflow-dependencies

The goal is an honest handoff. Record improved action coverage as an improvement, then keep other inputs and unknowns visible beside it. The next reviewer needs to know what remains to inspect, not merely which percentage increased.

Back to Sambro Blog