Skip to content

ci: restore fork guard on certora workflows - #198

Open
SashaMIT wants to merge 2 commits into
aave-dao:mainfrom
SashaMIT:ci/restore-certora-fork-guard
Open

ci: restore fork guard on certora workflows#198
SashaMIT wants to merge 2 commits into
aave-dao:mainfrom
SashaMIT:ci/restore-certora-fork-guard

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Aug 6, 2026

Copy link
Copy Markdown

Summary

The pull_request fork guard is commented out in all five certora workflows:

#    if:
#      github.event.pull_request.head.repo.full_name == github.repository || (github.event_name == 'push' &&
#      github.ref == format('refs/heads/{0}', github.event.repository.default_branch))

With the guard disabled, a fork PR triggers jobs that execute repository content (make munged inside certora/, i.e. the PR's own Makefile) while declaring id-token: write and wiring secrets.CERTORAKEY (empty on fork runs, but the job environment is still more privileged than fork code should meet). The guard's intent is exactly the right policy: certora runs only for same-repo PRs or pushes to the default branch.

This PR uncomments the guard as originally written in all five files. Fork PRs will simply skip certora jobs (they would fail anyway without the certora key).

Test plan

  • All five files parse as valid YAML
  • Same-repo PRs and main pushes still run the jobs; fork PRs skip them

Made with Cursor

The release job holds npm OIDC trusted-publishing rights (id-token:
write) and contents: write, but consumes shared actions via the mutable
@main branch ref. A compromised or mistakenly-pushed main on
aave-dao/github-workflows would flow straight into the publish path.

Pin all four aave-dao/github-workflows refs to the current main commit
(c6fd9ab), tagged with a '# main' comment for readability.

Made-with: Cursor
The pull_request fork guard (run certora only for same-repo PRs or
pushes to the default branch) was commented out in all five certora
workflows. These jobs execute repository content (make munged inside
certora/) and declare id-token: write, so they should not run
fork-supplied code.

Uncomment the guard as originally written.

Made-with: Cursor
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