Skip to content

Attest gh-aw release assets before publishing - #79876

Merged
pelikhan merged 5 commits into
mainfrom
pelikhan/extension-release-provenance
Nov 21, 2026
Merged

pelikhan merged 5 commits into
mainfrom
pelikhan/extension-release-provenance

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Summary

The existing build produces the native binary names GitHub CLI expects, but the published v1.2.2 Linux AMD64 asset had a release attestation without build provenance.

  • Verify the downloaded checksums.txt and generate signed build provenance for the exact dist/* assets before upload. If either step fails, the release is not published.
  • Use the same SHA-pinned attestation action as cli/gh-extension-precompile, while preserving the custom build, Defender scan, and manual approval gate. Release URLs, binary names, and the checksum format stay unchanged, and shell installers do not need attestation support.

Validation

  • make recompile, Actionlint, and make agent-report-progress passed. The targeted offline zizmor comparison found the same seven low-severity findings as the baseline; Docker-based scanners were unavailable.
  • The current shell installer installed the published v1.2.2 release. Both the v1.2.2 and current installers accepted release-format Linux and Windows fixtures. The broader installer suite stopped at an authenticated-retry assertion in the local harness.
  • No release was dispatched; live attestation remains unverified.

@pelikhan
pelikhan marked this pull request as ready for review November 21, 2026 20:04
Copilot AI adaptive review requested due to automatic review settings November 21, 2026 20:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Checksum verification can succeed with missing, truncated, or duplicate entries, allowing binaries to be attested and published even though the shell installer rejects them.

1 open issue
What changed in this PR

Adds a pre-publication integrity and provenance gate to gh-aw’s custom release pipeline, preserving asset names, release URLs, and installer behavior.

Changes:

  • Adds checksum verification and SHA-pinned build-provenance attestation before release creation.
  • Preserves the custom build, Defender scan, and manual approval gate.
  • Regenerates the compiled workflow and updates release guidance and build-script comments.

Live attestation remains unverified; no release was dispatched.

File Description
scripts/​build-release.sh Clarifies build-only behavior and native asset naming; comments only.
.github/​workflows/​release.md Adds checksum verification and provenance attestation before publishing.
.github/​workflows/​release.lock.yml Updates generated steps, action metadata, and workflow hashes.
.github/​aw/​release-workflow.md Documents checksum verification and attestation before publishing.

Review effort: Max (adaptive)

Comment thread .github/workflows/release.md Resolved
@pelikhan

Copy link
Copy Markdown
Collaborator Author

/matt

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~9 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Re: the /matt request: The command started the Matt Pocock Skills Reviewer. No code change was requested in this comment.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Re: the reviewer status notification: This is a progress update, not a review finding, so no code change is needed for this comment.

@github-actions

Copy link
Copy Markdown
Contributor

Correction to the review body

Two statements in the submitted review were wrong. The rest of the review still stands.

  • A manifest entry for a file that is absent from dist/ fails sha256sum --check (exit 1, with or without --strict). It is not a gap.
  • A duplicated manifest entry passes plain sha256sum --check (exit 0). The earlier exit 1 came from my extra uniq -d step, not from sha256sum. Duplicates are a real gap.
  • Still a gap: an unlisted file in dist/ passes sha256sum --check (exit 0).

The set-equality check in the inline comment covers all three cases. @copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~9 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷
Comment /matt to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /tdd and /grill-with-docs. Requesting changes because the checksum verification does not enforce the set of files that gets attested and published.

📋 Key Themes and Highlights

Key Themes

  • Integrity gap: sha256sum --check checksums.txt (without --strict) exits 0 when dist/ has a file the manifest does not list. It also passes when the manifest lists a file that is absent, or has a duplicate entry (the duplicate-entry case exited 1 in my test, so it depends on the checksum form). A set-equality check closes this, as shown in the inline comment.
  • Test coverage: the new verify and attest steps are inline YAML and are not covered by actions/setup/sh/release_integrity_test.sh.

Positive Highlights

  • ✅ The attest step is pinned to 4d101475... (v4.2.2), and the SHA matches the tag.
  • ✅ Lock file matches the source change, and the release job holds id-token: write and attestations: write.
  • ✅ Attestation runs after the artifact round trip and before gh release create, and it covers dist/*, the same set that gets uploaded. The SBOM files are workflow artifacts only, so they are not in scope.
  • ✅ The release-workflow.md docs row now matches the new ordering.

Open Questions

  • Live attestation has not been exercised. The PR body says the broader installer suite stopped on an authenticated-retry assertion in the local harness.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~9 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again

name: release-binaries-${{ needs.config.outputs.release_tag }}
path: dist/

- name: Verify release asset checksums

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/tdd] The verify step is inline YAML, so none of the cases it must catch are tested. actions/setup/sh/release_integrity_test.sh already covers release integrity helpers. Move this check into a small script there and add failing cases for an unlisted file in dist/, a manifest entry for an absent file, a duplicated entry, and a tampered file. The good case should pass.

💡 Verified check

I confirmed this set-equality check passes the good case and fails all four bad cases. Plain sha256sum --strict --check exits 0 on an unlisted file.

sha256sum --strict --check checksums.txt
expected=$(awk '{print $2}' checksums.txt | sort)
actual=$(ls -A | grep -v '^checksums.txt$' | sort)
test "$expected" = "$actual"
test -z "$(awk '{print $2}' checksums.txt | sort | uniq -d)"

@copilot please address this.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (.github/workflows/release.md:626): address unresolved feedback - Review comment

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "10b80890883173b916a6431139f4e0194334c355",
  "kind": "requested",
  "schema_version": "1",
  "state": "99cbfa0fd04be5b9a9272466566d1c66dece3a3b9028c77caf84539d88cdfa9f",
  "work": [
    "f6843963170dc76b5f602dc712eacd2c8d563bf3d65e9b2ceef29208cbb44480"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

@pelikhan
pelikhan merged commit b476ef3 into main Nov 21, 2026
69 of 70 checks passed
@pelikhan
pelikhan deleted the pelikhan/extension-release-provenance branch November 21, 2026 21:26
Copilot stopped work on behalf of gh-aw-bot due to an error November 21, 2026 21:27
Copilot AI requested a review from gh-aw-bot November 21, 2026 21:27
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.

4 participants