CI: pin third-party GitHub Actions to commit SHAs (write-scoped jobs first)

Open
#198 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, yaml
Domain
ci-cd, security

Research direction

Start by reading .github/workflows/containers.yml and .github/workflows/release.yml, focusing on jobs with write permissions and their uses: references. Pin third-party actions to full 40-character commit SHAs and retain each version tag in a trailing comment; decide whether to include actions/* and github/* as the issue requests. The work is done when the targeted references are pinned and workflow validation passes; the optional CI check can be considered separately.

Written by the indexing model from the issue text.

Description

ci

Every action in .github/workflows/ is referenced by tag (azure/[email protected], docker/login-action@v4, aquasecurity/[email protected], …). A tag can be moved by the action's owner, so a compromised or re-pointed tag would run in our jobs, including the ones that hold packages: write or contents: write:

  • containers.yml: the image build/push jobs (docker/login-action, docker/build-push-action, docker/bake-action, docker/metadata-action, docker/setup-buildx-action, docker/setup-qemu-action) and, since R-9 (#196), chart-push (azure/[email protected], which resolves to 9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 today).
  • release.yml: the release job.

An automated security review flagged the chart-push reference after #196 merged. It was left as a tag there because that is the convention every other reference in the repo follows; changing one reference would not change the exposure.

Task

  • Pin every third-party action (everything outside actions/* and github/*; decide whether to pin those too) to a full 40-character commit SHA with the tag in a trailing comment, e.g. uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1. Start with the jobs that hold write permissions.
  • Dependabot's github-actions ecosystem is already configured and updates SHA pins with their comments.
  • Optionally add a check (actionlint cannot do this; a small script or zizmor) so a new tag-pinned third-party action fails CI.

Lead-only steps

None.

Dominant language
Python
Stars
0
Forks
2
Avg merge
8h 26m
Merged PRs (30d)
47

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TechTraverse/stac-higher

All issues in TechTraverse/stac-higher

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.