Skip to content

fix: authorize contract SHA before apply - #9

Merged
rldyourmnd merged 1 commit into
mainfrom
fix/contract-sha-provenance
Aug 24, 2026
Merged

fix: authorize contract SHA before apply#9
rldyourmnd merged 1 commit into
mainfrom
fix/contract-sha-provenance

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

Summary

  • prove caller-selected contract SHA is an ancestor of reviewed main on GitHub-hosted capacity
  • prevent the self-hosted/OIDC apply job from being scheduled before authorization
  • split least-privilege permissions between authorization and apply
  • add an adversarial side-branch rejection fixture

Closes #8

Threat model

A fork-only or otherwise unmerged commit may be fetchable by SHA from the base repository object store. It is treated as data on a hosted runner and rejected unless git merge-base --is-ancestor proves reachability from origin/main. No checked-out contract code executes before that proof.

Validation

  • scripts/validate_module.sh
  • actionlint .github/workflows/cd-apply.yml

@rldyourmnd
rldyourmnd merged commit 905cad9 into main Aug 24, 2026
4 checks passed
@rldyourmnd
rldyourmnd deleted the fix/contract-sha-provenance branch August 24, 2026 15:36
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.

contract_sha is checked for shape but not for provenance, and cd-apply runs what it points at on self-hosted hardware with id-token: write

1 participant