Skip to content

fix: handle workflow to checkout the approved commit#187

Merged
sqin2019 merged 2 commits into
mainfrom
sqin2019/fix
Feb 26, 2026
Merged

fix: handle workflow to checkout the approved commit#187
sqin2019 merged 2 commits into
mainfrom
sqin2019/fix

Conversation

@sqin2019

@sqin2019 sqin2019 commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

use SHA so that it checks out the snapshot that triggered the workflow

Although we have recommended users of this repo to enable "Dismiss stale pull request approvals when new commits are pushed" the repo setting (https://github.com/abcxyz/aod-template#prerequisites), there is a vulnerability that the user pushs a new commit after the approval check and the handle workflow checks out the new commit and execute the aod handle on the unapproved new commit.

Pending e2e test

Signed-off-by: Suhong Qin <suhongq@google.com>
@sqin2019 sqin2019 requested a review from a team as a code owner February 25, 2026 23:53

@crwilcox crwilcox left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

@sqin2019

Copy link
Copy Markdown
Contributor Author

tested, it is now checking out the SHA:
Screenshot 2026-02-26 at 10 09 41 AM

@sqin2019 sqin2019 merged commit f5496e3 into main Feb 26, 2026
13 checks passed
@sqin2019 sqin2019 deleted the sqin2019/fix branch February 26, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants