fix: accept canonical G2 merge push shape - #8
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adjusts the G2 evidence verifier to accept the canonical GitHub “push to main after squash-merge” event shape by relying only on stable push payload fields, and updates the evidence document/template to reflect “candidate” status until CI attestation is recorded.
Changes:
- Relaxed
mainpush event validation in the post-squash verifier to avoid relying on redundant/variable webhook metadata (created/deleted/forced/size/distinct_size/commits/head_commit). - Updated the test fixture push payload to match the newly accepted canonical event shape.
- Converted
docs/G2-EVIDENCE.mdback to “candidate” placeholders and “not run remotely” matrix rows.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/check-g2-evidence.py | Narrows push-event provenance checks to ref + before/after SHAs while keeping downstream PR/commit/tree verification intact. |
| scripts/check-g2-evidence-test.py | Updates the squash-merge push event fixture to omit redundant webhook fields no longer required by the verifier. |
| docs/G2-EVIDENCE.md | Resets the evidence document to “candidate” placeholders and “not run remotely” results pending CI attestation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Narrows the post-squash verifier to stable, authoritative push fields after the live
mainevent exposed variation in redundant webhook metadata.Security remains fail-closed through exact repository/main ref, valid before/after SHAs, pushed commit sole-parent verification, unique merged same-repo PR association, squash-to-reviewed-tree equality, and the evidence-only tested-source comparison.
Evidence is candidate until exact-source CI passes.