-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Github actions: browser tests fail for PR's raised from forked repos #4553
Comments
there has to be some sort of way around this. I don't really want to find out that the browsers break after merge |
cc @christian-bromann; I think this is the problem I mentioned some time ago. do you know of a workaround? |
@boneskull forks have to set their own credentials as it doesn't seem to be possible yet to make projects secrets available for them (found a thread here). One way to workaround this would be to have a sub-account that is allowed to run 1 or 2 concurrent sessions and hard code it into the setup so that forks can use these. So check if sauce credentials are available, if not (so we have a PR from a fork) use the credentials of the sub account. I guess you won't get that much PRs from forks and I doubt anyone would make the effort to abuse this. |
@boneskull @juergba I think |
Sub-account feature is not available under our sauce labs org. It is an enterprise plan only. I think we are not. |
I will test pull_reqquest_target more. I didn't fully understand it. |
See Keeping your GitHub Actions and workflows secure: Preventing pwn requests
From my understanding for
If we make a sub-account of Sauce Labs, we can run no. 1 more safely. But we couldn't. Any thought? @mochajs/core |
There is a manual workflow_dispatch event, I'm not sure wether it has access to secrets. It should, since it's triggered only by maintainers on Github. We could:
|
If we will trigger browser tests for forked PRs, using a I will test it. |
If the label You also have to test wether Edit: a malicious user could even set |
I believe the We should use
So, we should run something with PRs on Currently, there is no clear way with a manual trigger to show status properly and rerun it easily when pr author pushes new commits. We need more tests about that. |
With #4616 , we can attach I've tested it in #4618 By default, browser tests will be skipped. When we attach labels except When we attach |
Description
When a PR is created/synchronized from a forked repo, a
pull_request
event is emitted.Unfortunately we don't have access to secrets and therefore the login to Sauce Labs fails.
There is a new event
pull_request_target
which gives access to secrets, but also grants a read/write token for this repo. Which is bad and opens door for unfriendly people.The text was updated successfully, but these errors were encountered: