-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Do not run snyk pr comment workflow on forks #11240
Conversation
Trivy scan found the following vulnerabilities:
|
Wouldn't this disable security scanning on community-submitted PRs? Is there a way we could do that? |
It's just the scan that produces the comments like the one above. The problem is PRs from forks don't get |
@MasslessParticle so yeah, snyk needs a security token: https://github.com/grafana/loki/actions/runs/6884061084/job/18725837632?pr=11240. So our options are:
|
That makes sense. I think two workflows makes the most sense. I've approved this because it looks good and seems like one of the two needed workflows |
Only run the snyk pr comment workflow on PRs from branches, not on forks. We can't run this `on: pull_request_target` because in needs access to the `SNYK_TOKEN` secret, and when run `on: pull_request`, forks don't have permissions to comment on the PR (because they don't get the `GITHUB_TOKEN` secret.
Only run the snyk pr comment workflow on PRs from branches, not on forks. We can't run this `on: pull_request_target` because in needs access to the `SNYK_TOKEN` secret, and when run `on: pull_request`, forks don't have permissions to comment on the PR (because they don't get the `GITHUB_TOKEN` secret.
Only run the vulnerability scan jobs on PRs from branches, not on forks.
The other option here would be to change the
on
topull_request_target
, but I'm not confident we could still run the snyk scan in that case as it relies onsecrets.SNYK_TOKEN
. This action is more informative anyway, so I'm fine with only running it on branches.