Repository navigation
ci: split perf workflow - #272
Conversation
Do not expose the token used to write the comment to PRs from forks.
letFunny
left a comment
There was a problem hiding this comment.
A few comments, thank for looking into this Paul. It would be nice if we can get some guidance for security as well.
letFunny
left a comment
There was a problem hiding this comment.
Thank you Paul for taking care of this, it looks great. Let's see how it works once it is merged.
|
nit, but you didn't tick 'Have you signed the CLA?' ;) |
niemeyer
left a comment
There was a problem hiding this comment.
My understanding is that this is addressing the running of workflows from PRs so that we don't leak unintended information or offer more access than necessary to the PR author. Yet, there's not a single comment being added about any of these situations, which means next week someone else can come here and take the chance in a different direction and the PR will likely go in as well.
Can we please be more clear about what this is addressing, how, and what shouldn't be done in that next PR? Please have the comments in places which are likely to make a difference on the follow ups.
Can we please be more clear about what this is addressing, how, and what shouldn't be done in that next PR? Please have the comments in places which are likely to make a difference on the follow ups. Your understanding is correct. I added a comment on each workflow, clarifying why they should stay separate and what to never do to protect secrets. See 38b27d9? |
niemeyer
left a comment
There was a problem hiding this comment.
Looks good, thanks for the additional comments.
| # The pull_request_target trigger MUST NOT be used as it bypasses the | ||
| # requirement of maintainer approval of a PR from an outside contributor and | ||
| # it is executed in the context of the target repository, giving access to | ||
| # secrets. |
|
|
Commenting here as Canonical's Security Operations Manager to acknowledge the contribution of Yarden Curiel in reporting the workflow vulnerability created by the former usage of |
Do not expose the token used to write the comment to PRs from forks.
This also ensures that PRs open from external contributors will not trigger
the workflows.
In the workflow posting the comment, use a fine-grained token with the
minimum permissions (write PR and read Actions).