Skip to content
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

Secure building of third-party pull/merge requests #39

Open
mightybyte opened this issue Jul 15, 2020 · 0 comments
Open

Secure building of third-party pull/merge requests #39

mightybyte opened this issue Jul 15, 2020 · 0 comments

Comments

@mightybyte
Copy link
Owner

Automatic building of third-party pull requests is a potential security problem because it gives anyone in the world arbitrary code execution on the Zeus build machine and consequently the ability to but artifacts into the Nix cache that Zeus populates. See for example the warning in GitHub's self-hosted runner documentation. The nix build sandbox protections are probably not sufficient to solve this security issue.

Currently Zeus is secure against this because it only builds when someone pushes to the repository. But it is inconvenient because when a third party opens a pull request Zeus does not trigger a build. There are a few different approaches we could take to fix this:

  1. Do nothing and require a trusted user to review the pull request and push it to the repo after verifying the code is ok.
  2. Require some kind of confirmation from someone who has permissions to the repo. This could be implemented in the Zeus web UI or potentially triggered by some kind of action on GitHub such as a pull request review, comment, etc.
  3. Build third-party PRs automatically, but in a special way such as on an ephemeral build machine spun up for a one-time build and without pushing build artifacts to the cache.

Approach #2 would be very easy if it was triggered by some kind of action on GitHub. The difficulty there is figuring out what that action should be so that is both easy and secure. If it is done in the Zeus UI, it would be a bit more work, probably 1-5 days of dev time.

Approach #3 would be the best end-user experience because it would generate a CI build status without requiring any effort from the maintainers, but it is significantly more complicated and requires infrastructure for multiple Zeus build machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant