Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
master
Motivation and Context
For security reasons, fork PRs don't have access to secrets if we use
pull_request
in GH Actions CI spec, only if we usepull_request_target
, which has its own security implications. See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/Codecov status reporting in CI requires a token, so for fork PRs to be able to do so we migrated to
pull_request_target
with the caveat that MRs have to be labelled and have therun ci
label applied, which can only be done by someone with triage access to the repo.This should give us a good compromise in terms of security.
Note⚠️
CI isn't running with these changes, because
pull_request_target
runs the workflow from the target branch, so only once this gets merged tomaster
will the workflow actually run as "expected".Description
Update
ci.yml
specification to allow fork PRs CI to run codecov, but only when labelled with therun ci
label.