Skip to content

Add validate-action-pins tool to ci-tools image#18

Merged
lex57ukr merged 3 commits intomainfrom
14-add-action-hash-validation-tool
Feb 15, 2026
Merged

Add validate-action-pins tool to ci-tools image#18
lex57ukr merged 3 commits intomainfrom
14-add-action-hash-validation-tool

Conversation

@lex57ukr
Copy link
Contributor

Summary

CI workflows pin GitHub Actions to commit SHAs for supply-chain security, but nothing verified that a pinned SHA actually matched its claimed tag. This PR ships a validation tool in the ci-tools image that resolves tags via the GitHub API and compares them against pinned SHAs, catching mismatches automatically during make lint.

Related Issues

Fixes #14

Changes

  • Add validate-action-pins shell script that parses uses: lines, resolves tags via the GitHub REST API (handling both lightweight and annotated tags), and exits non-zero on mismatch
  • Wire the tool through the full resolve/build/verify pipeline as a first-class versioned tool (resolve_local helper, lockfile entry, Dockerfile, compose args, verify check)
  • Pin all GitHub Actions in CI and publish workflows to commit SHAs
  • Integrate pin validation into make lint via the lint-actions target, preferring the container-installed version with a repo-copy fallback for bare metal
  • Add jq to the ci-tools image for GitHub API response parsing
  • Extend shellcheck coverage to repo-local scripts in images/*/bin/
  • Document local-script conventions in docs/how-to/add-image.md
  • Add missing stylelint and chktex entries to the README tools table and acknowledgments

Further Comments

The script gracefully degrades when dependencies (curl, jq) are missing or the GitHub API is unreachable — it warns and exits 0. This means CI will pass on the current published image (which lacks jq) and begin enforcing once the new image ships.

lex57ukr and others added 2 commits February 14, 2026 23:27
Shell script that verifies GitHub Actions SHA pins match their claimed
tags via the GitHub REST API. Wired through the full resolve/build/verify
pipeline as a first-class versioned tool. Also adds missing stylelint
and chktex entries to the README tools table and acknowledgments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pin all GitHub Actions in CI and publish workflows to commit SHAs for
supply-chain security. Add validate-action-pins to the lint-actions
Makefile target, preferring the container-installed version with a
repo-copy fallback for bare metal. Gracefully skip validation when
dependencies (curl, jq) are missing. Extend shellcheck coverage to
repo-local scripts and document local-script conventions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lex57ukr lex57ukr added enhancement New feature or request security Security-related change docker Docker image changes labels Feb 15, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lex57ukr lex57ukr merged commit da9f925 into main Feb 15, 2026
1 check passed
@lex57ukr lex57ukr deleted the 14-add-action-hash-validation-tool branch February 15, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker image changes enhancement New feature or request security Security-related change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add action-hash validation tool to ci-tools image

1 participant