Open jleibs opened 1 year ago
This seems like a worthwhile read: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
Specifically our solution should likely look like: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow
We can now run contributor PRs through our CI safely: https://github.com/rerun-io/rerun/pull/3557/checks
Remaining work:
@jprochazk what has to happen to make the contributor template different?
We have a script that runs for every PR create/update that edits the PR body, we should:
rerun-io
contributors only, adding all the links we usually expectWe've now seen one malicious (and failed) attempt at stealing our GitHub token: https://github.com/rerun-io/rerun/pull/6736.
We believe the GitHub action permission system is not granular enough to have both security, power, and easy 3rd party PRs. So we need to move off GitHub actions.
Two problems on the current contributor PR:
pixi run -e wheel-test py-test
fails:https://github.com/rerun-io/rerun/actions/runs/9928447006/job/27424762059?pr=6853
Pull requests currently fail when submitted by external contributors because they are run without our secrets. The build part is fine, but the upload steps end up failing.
This is generally a good thing not to leak our credentials to external contributors, but it's a bit annoying since it would be nice to end up with sample html results, etc. from CI.
I started working on a proof-of-concept to allow this via pull_request_target: https://github.com/rerun-io/rerun/pull/1991
However, there are some unresolved security implications of that approach. We need to do more thinking and probably introduce more granular gcloud permissions to do this safely.