-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a validation check for pr approval in the deploy-pr workflow #660
base: develop
Are you sure you want to change the base?
Added a validation check for pr approval in the deploy-pr workflow #660
Conversation
Hey @Spiral-Memory, I have worked on this vulnerablity which btw was difficult to find out and finally I have found the fix after researching. I have tested using my other github account, you can also test it here for better clearence https://github.com/devanshkansagra/Embedded-Chat . Also please review this pull request |
Awesome work @devanshkansagra Will discuss about this with you today. |
Okay sure. Then let's finish up this as early as possible coz this was very long time awaited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still carries the same vulnerability as discussed.
Hey @Spiral-Memory, I have removed the part of transfering pr number as artifact and instead I have used github api to fetch the pr number in deploy-pr workflow |
You can check and review whenever you are free |
Awesome work @devanshkansagra Is it working ? |
Yes @Spiral-Memory, this workflow is working. You can check it out here in my test repo https://github.com/devanshkansagra/Embedded-Chat by raising a demo pr This is based on the thing I researched on the internet and various AIs including ChatGPT, Github-Copilot etc. also I haven't gone in depth regarding this Github-API, and jq stuff and same goes with the checking approval status |
No, what i am asking is, with this, it will check the PR permission for the first PR in the list, not the PR it is triggered on, have you tested this ? |
Yea I have tested it by raising two different prs in parallel |
Okay then tomorrow, we will see how exactly is it working and then will merge it if testing succeeds. |
Okay No problem |
Hey you are right, yesterday I ran the approval check was shown the respective pr numbers but today I have tested very parallel, it was checking the top of the list pr number |
Hey @Spiral-Memory, I have pushed the commit, you can check / review it |
Hey @Spiral-Memory, I have one thing to ask, in |
No not just that, it also tests if project is getting built correctly after the new change so it shouldn't break the project |
ohh okay |
This Pull request adds an additional pr approval check in
deploy-pr.yml
workflow. This adds validation to ensure the deploy-pr workflow runs only after PRs are approved by collaborators or owners. The GitHub API is used to verify approval status, preventing unauthorized deployments from forked repositories.Acceptance Criteria fulfillment
deploy-pr
workflowVideos/Screenshots
N/A