Secure Self-Hosted Runners by Limiting Them to Specific Workflows

0
446

Over the last few months, we’ve made it easier for large organisations to improve the consistency and security of their CI/CD workflows using GitHub Actions. For example, you can create reusable workflows, share actions and reusable workflows within your enterprise, or secure your deployments with OpenID Connect. Today, we’re taking things a step further.

We’re excited to announce an enhancement to the self-hosted runners experience that improves the security of your CI/CD workflows. Many organisations today have secrets stored on their self-hosted runners in order to enable production deployments or other highly-privileged workflows. Previously, any workflow in the repository, such as an issue labeller, could access these runners, but that’s no longer the case. Now, admins can pick which specific workflows can access a runner group. This is a great way to secure your deployments if you aren’t ready to adopt OpenID Connect.

When combined with reusable workflows, this feature enables admins to enforce consistent usage of runner groups and workflows across their organisation. For example, you can have a runner group with production secrets on it and require that everyone use it via a reusable deployment workflow. Other workflows in the organisation can’t access these runners unless they also use the reusable deployment workflow. This allows you to standardise your deployment workflows, including the runners they use, for your entire organisation.

Here’s how to set this up:

  1. Create a reusable workflow that describes the steps you want everyone to utilize when deploying to production.
  2. In the runner group settings, set Repository access to All repositories.
  3. In the runner group settings, set Workflow access to Selected workflows, and specify the reusable workflow you created.

screenshot of workflow access settings

Once these settings are saved, everyone in your organisation will be able to use the production runner group, but only when executing the monalisa/automation/workflows/deployment.yaml reusable workflow at ref v1.


LEAVE A REPLY

Please enter your comment!
Please enter your name here