Skip to content

feat: support SHA hash pinning for trusted builder workflows#882

Open
kipz wants to merge 1 commit intoslsa-framework:mainfrom
kipz:kipz/support-sha-pinning
Open

feat: support SHA hash pinning for trusted builder workflows#882
kipz wants to merge 1 commit intoslsa-framework:mainfrom
kipz:kipz/support-sha-pinning

Conversation

@kipz
Copy link

@kipz kipz commented Mar 3, 2026

Resolves #12

Summary

  • Adds IsSHA helper to detect 40-char lowercase hex commit SHAs
  • Adds IsValidBuilderSHARef which resolves a SHA to its semver tags via the GitHub API
  • Introduces TagResolver interface plus GitHubTagResolver implementation
  • Wires GitHubTagResolver into all CLI verify commands; set GITHUB_TOKEN to avoid rate limiting
  • Updates verifyTrustedBuilderRef to accept SHA-pinned refs

SHA pinning is immutable: once committed, a SHA cannot change, making it a stronger security guarantee than mutable tags.

@kipz kipz force-pushed the kipz/support-sha-pinning branch from 02e32a6 to c81384a Compare March 3, 2026 11:19
Allows reusable workflow builder refs to be specified as a 40-character
commit SHA (e.g. abc123...) in addition to semver tag refs. At
verification time the SHA is resolved to its associated release tag(s)
via the GitHub REST API, and at least one must be a valid vX.Y.Z semver
tag.

Introduces TagResolver interface and GitHubTagResolver implementation.
Set GITHUB_TOKEN to authenticate API requests and avoid rate limiting.

Fixes slsa-framework#12

Signed-off-by: James Carnegie <james.carnegie@datadoghq.com>
@kipz kipz force-pushed the kipz/support-sha-pinning branch from c81384a to 39f31e1 Compare March 3, 2026 11:31
@kipz kipz marked this pull request as ready for review March 3, 2026 11:35
@kipz kipz requested a review from a team March 3, 2026 11:35
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.

Feature: only accept reusable workflow pinned by version

1 participant