|
Actions are awesome... but scary as soon as you have a public repos, contractor, rogue employee, etc. They seem to go against security fundamentals. Ex: Actions should allow going into default-deny mode for all basic runtime capabilities and resource use, and only brought back on via RBAC. Today, it's not hard to steal npm/pip/etc creds or get into people's corp runners. Having gone through the browser security policy heyday, this is deja vu, except now for exposing the server side and supply chain. Ex: - do not run on any event.. unless user authorized for that event. Same for actions. - separate out policies and users cannot edit policies unless authorized to do that - do not get physical/logical resources (runners, disk quota, long runs, ...) unless given - default-deny network outbound with url safe-listing That way only trusted users can run them, and a bit harder for them to get hurt when there is a surprising action that they run The next level would probably be something like sandboxing : allow anyone to run an action , but a sandbox mode can autofail if violated, and have explicit imports/exports to lock down for how it gets used. A lot possible.. but need to invest in the basics first.. |
Unfortunately, using self-hosted runners to provide additional capabilities not supported by Github-hosted ones is basically impossible (for public repos at least) as you can't restrict a runner to an organization or project. Set up a bare-metal runner and it will receive jobs from random forks.