Skip to content

Pin GitHub Actions to commit SHAs and base images to digests #617

Closed

Description

@davidgouge

Part of #607.

Why

Workflows use actions by tag or branch (actions/checkout@v4, DFE-Digital/github-actions/...@master),
and the Dockerfiles use base images by tag (aspnet:10.0). A tag or branch can move. A commit SHA
or an image digest cannot.

Scope

  • Pin each action to a full commit SHA, with the version in a comment.
  • Pin the base images by digest.
  • Rely on Dependabot (see the Dependabot issue in this epic) to keep the pins current.
  • Agree with the platform team how to pin the DfE shared actions, which follow @master.

Done when

  • No workflow uses an action by tag or branch, except where the platform team agrees otherwise.
  • The Dockerfiles use base images by digest.

Activity

  1. added theissue type on Oct 15, 2026
  2. added this to the Sprint 27 milestone on Oct 20, 2026
  3. self-assigned this
    on Oct 21, 2026
  4. added a commit that references this issue on Oct 22, 2026
  5. ajs-uk-dev commented on Oct 22, 2026

    @ajs-uk-dev
    Contributor

    The platform team has said how to pin the DfE shared actions (22 October 2026). Their rule, in teacher-services-cloud: GitHub workflows and security:

    • Pin to a commit SHA: community actions, actions from publishers GitHub has not verified, and any action where supply chain security is a concern.
    • Leave on a major version or branch: official GitHub actions (actions/*), actions from verified publishers, and first-party actions, including DFE-Digital/github-actions.

    This is the exception that "Done when" allows for. #661 follows it:

    • oras-project/setup-oras is the only action we use whose publisher is not verified, so it is pinned to a SHA.
    • actions/*, azure/login, anchore/sbom-action and DFE-Digital/github-actions/*@master stay as they are.
    • The base images in the four Dockerfiles are pinned by digest.
    • scripts/check-pins.sh enforces this in Build.

    #661 closes this issue when it merges.

  6. added a commit that references this issue on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions