Skip to content
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

ci: run browser tests on pull_request_target #703

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

nschonni
Copy link
Contributor

pull_request_target allows runs to access the secret values. Since this adds an attack vector described here https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ I added the extra condition to only run on the main repo push or if someone adds a safe to test label after reviewing the code

with:
node-version: 16.x
- run: npm install
- run: npm ci
Copy link
Member

Choose a reason for hiding this comment

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

Great improvement, I didn't know npm ci before.

Copy link
Member

@ctavan ctavan left a comment

Choose a reason for hiding this comment

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

Thank you for this contribution. I think the security risk in this case is acceptable.

@ctavan ctavan merged commit 862562e into uuidjs:main Mar 23, 2023
@nschonni nschonni deleted the browser-pr-target branch March 23, 2023 08:11
@broofa
Copy link
Member

broofa commented Mar 23, 2023

Question: What happens if a PR is tagged "safe to test" and then subsequently modified by the author (e.g. in some malicious way)?

(Not questioning this PR. Just a general question I've had for awhile.)

@nschonni
Copy link
Contributor Author

From my understanding, because the trigger is labeled, it gets triggered the first time that it's added, but wouldn't on subsequent pushes till the label is re-applied to trigger that event again

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.

3 participants