Skip to content

Preflight: commit result without a trailing newline (provenance gate failed every release since 10-08) - #112

Merged
jfillman merged 1 commit into
mainfrom
fix-chains-git-commit-newline
Oct 14, 2026
Merged

jfillman merged 1 commit into
mainfrom
fix-chains-git-commit-newline

Conversation

@jfillman

Copy link
Copy Markdown
Owner

Bug found live: the release gate's provenance check failed on every release PR since 2026-10-08, and the PRs were merged anyway: gitops-boarding-api#41 (staging) and #45 (prod). The signature itself verified. The Conforma policy rejected the provenance:

  • "Material digest "9d3dcde…\n" is not a git commit sha"
  • "Expected source code reference was not provided for verification"

Cause: stage-preflight writes the commit result with git rev-parse FETCH_HEAD | tr -d \\'\\n\\'. In bash that deletes the characters ' and n, not the newline, so CHAINS-GIT_COMMIT carried <sha>\\n into every build's SLSA provenance. Checked locally: the old command keeps the \\n; printf '%s' "$(…)" does not.

Fix: printf '%s' "$(git rev-parse FETCH_HEAD)".

After merge: images built before this fix keep the bad provenance, so their release PRs keep failing the gate. Each app's next build passes.

🤖 Generated with Claude Code

…ce gate failed every release since 2026-10-08)

`git rev-parse FETCH_HEAD | tr -d \'\n\'` deletes the characters ' and n, not the newline, so every build's SLSA
provenance recorded the source commit as "<sha>\n". The release gate's Conforma policy then failed every release
PR: "Material digest ... is not a git commit sha" and "Expected source code reference was not provided" (found live
on gitops-boarding-api#41 and #45; the signature itself verified). Introduced when preflight replaced the clone Task
on 2026-10-08. Images built before the fix keep the bad provenance; the next build of each app passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jfillman
jfillman merged commit fe53ba5 into main Oct 14, 2026
3 checks passed
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.

1 participant