BRK286 · Breakout
Secure the CI pipeline: Practical defenses for GitHub Actions
Speakers: Steve Glass, Jeff Martin
Microsoft’s player cannot open a video at a given time: once it plays, skip to the time shown.
What the session covers
Steve Glass and Jeff Martin from the GitHub Actions team walk through a five-stage sample supply chain attack on GitHub Actions and show a mitigation for each stage. Covered defenses include safer actions/checkout defaults against pull_request_target 'pwn requests', read-only cache tokens and cache mode syntax, Actions policies, actions lock files that pin transitive dependencies and detect imposter commits, keyless GitHub App tokens via Actions OIDC, and an Actions firewall egress allow list. The session also shows agentic workflows under the same controls and Azure private networking (VNet injection) for hosted runners and Copilot cloud agent. It closes with pricing (security features free, firewall in technical preview), a roadmap and an adoption plan.
Best for: DevOps and security engineers who own GitHub Actions workflows or govern runners and Copilot cloud agent at organization or enterprise level.
New material starts at 03:22. After a basic intro on Actions concepts and supply chain risk, the first attack stage with the new safer actions/checkout defaults for pull_request_target starts at 03:22.
Where to skip: Skip to 03:22. The core is 08:10–21:29 (cache tokens, Actions policies, the lock file demos with tag hijacking and imposter commits) and the firewall demo at 25:24. Watch 32:45 for Copilot cloud agent on VNet-connected runners and 36:19–40:39 for status and roadmap; the agentic workflows segment at 29:57 is optional.
Chapters (13)
- 00:00 Recap Depth 100 · Novelty 0/3
Session intro, agenda and GitHub Actions basics as a supply chain risk
Steve Glass and Jeff Martin from the GitHub Actions team introduce the session: a sample five-stage supply chain attack, a mitigation for each stage, agents in CI, Azure private networking and an adoption plan. Steve gives a 30-second overview of Actions (events, YAML workflows, jobs, runners, steps and actions referenced with uses) and maps it to Azure Pipelines concepts. He explains that every uses statement runs someone else's code with your tokens and secrets, and how compromised producers spread malware to consumers in a cycle.
- 03:22 New Depth 300 · Novelty 2/3
Stage 1: pwn requests via pull_request_target and safer actions/checkout defaults
The sample setup uses a PR note action with lint.yml and release.yml (contents write) in a producer repo and comment.yml in a consumer repo, across five stages and three trust boundaries. pull_request_target runs in the default-branch context with secrets and the default-branch cache scope; checking out the PR head SHA runs attacker code in a trusted workflow (a 'pwn request'). Actions checkout now refuses this combination and fails the run, with explicit syntax available if head checkout is really needed, and also refuses unsafe workflow_run inputs. A demo shows a fork PR editing the README triggering lint.yml, which fails on the unsafe fork-head pattern.
- 08:10 New Depth 300 · Novelty 2/3
Stages 2-3: read-only cache tokens, cache mode syntax and actions policies
Default-branch workflows share one cache scope, so poisoning lint.yml's cache can reach the privileged release.yml and let an attacker retarget an existing tag such as v3 to a malicious commit. Actions now issues read-only cache tokens to runs triggered without write permission, and new workflow YAML syntax sets cache mode (read, write or none) at job or workflow level; cache mode none blocks restores in the release workflow. Actions policies, built on the rulesets framework, can run in active or evaluate mode, target individual workflow files, restrict actors (users, GitHub apps, Copilot), restrict event triggers and require lock files at enterprise, organization or repository level.
- 12:40 Demo Depth 400 · Novelty 2/3
Stage 4 demo: tag hijacking in transitive dependencies and actions lock files
Jeff explains that action tags like v3 are mutable pointers; immutable releases and tag rulesets are producer-side controls that consumers cannot apply. SHA pinning is shown to be insufficient because a pinned composite action (PR size labeler) internally references diff-stats@v1 by mutable tag. Actions lock files, delivered as a GitHub CLI extension (gh actions-lock) with an accompanying agent skill, pin the full transitive closure while letting the workflow use human-readable tags. After the v1 tag is moved, the SHA-pinned run executes the unreviewed commit while the locked run resolves diff-stats at the pinned SHA.
- 18:03 Demo Depth 400 · Novelty 2/3
Demo: imposter commits rejected by the lock CLI and blocked at runtime
Jeff explains imposter commits: a commit SHA from a fork that GitHub resolves as if it belonged to the original repository, shown with a warning banner that it does not belong to any branch. Re-running the lock command on a workflow referencing the imposter commit fails, preventing it from entering the lock file. He then manually forges the lock file, commits it and runs the workflow; the job does not start because the lock file is validated at runtime, not only at generation time.
- 21:29 New Depth 200 · Novelty 2/3
Lock files: current guarantees and roadmap (org onboarding, Docker, producers)
Jeff summarises what lock files provide today: every action in the dependency graph, including transitive and composite dependencies, pinned to a value that does not change at runtime, enforceable by policy and kept current by Dependabot, which updates the lock file together with the workflow. Next steps are an admin panel for enterprise and organization onboarding, support for reusable workflows and Docker actions, and letting an action's action.yml define its own lock file for consumers to pull in.
- 22:55 New Depth 300 · Novelty 2/3
Stage 5: reducing blast radius and keyless GitHub App tokens via Actions OIDC
Assuming the attacker already runs code in the job, the goal is to reduce secrets, tokens and egress paths that enable smash-and-grab exfiltration. Today GitHub App automations require placing the app's private key in the job, a persistent secret that must be revoked. Keyless GitHub App tokens, coming soon, use Actions OIDC to mint short-lived tokens based on a trust policy; the YAML needs id-token write permission and the first-party create GitHub App token action with only a client ID, and access can be limited by workflow, branch and event.
- 25:24 Demo Depth 300 · Novelty 2/3
Demo: Actions firewall egress allow list blocks exfiltration from a compromised action
Actions firewall gives the runner an allow list of domains, configured in a file with enforcement or audit mode, and is enabled by using a runner label with a firewall suffix. A matrix runs a license-checking action that pipes a script from a pages site to bash on a plain and a firewall runner after the script is swapped for an exfiltration payload. Both runs are green, but the firewall decision artifact shows the evil endpoint was blocked on the firewall runner. The firewall sits on the trusted host of a nested VM so untrusted code cannot disable it, and the action was in the lock file, showing pinning alone does not make behaviour immutable.
- 29:57 Demo Depth 200 · Novelty 1/3
Agentic workflows in CI: same controls apply, issue triage demo
Agentic workflows describe a task in natural language and a compiler turns it into an Actions YAML workflow that applies agent reasoning and is triggered by Actions events; use cases include CI failure analysis, docs and aggregating team updates. They are read-only and write only through safe outputs, and the cache defaults, egress firewall and planned keyless tokens also apply. A demo shows an issue-triage agentic workflow labelling a new issue as a question, with the run showing firewall activity, policy violations and token usage.
- 32:45 Demo Depth 300 · Novelty 1/3
Azure private networking for hosted runners and Copilot cloud agent on your VNet
Azure private networking is VNet injection: you delegate a subnet to GitHub, which deploys a NIC for hosted runners so existing NSGs, Azure Firewall or other firewalls apply and private resources such as Artifactory or storage are reachable. It is configured once per organization or enterprise and runner groups point to the network configuration. Because Copilot cloud agent runs on Actions compute, it can be assigned to VNet-connected runners, adding Copilot's own firewall as a second layer. The demo creates a runner group and runner bound to a network configuration and switches Copilot cloud agent to that labelled runner.
- 36:19 New Depth 100 · Novelty 2/3
Pricing and availability: free security features, firewall in technical preview
The new Actions security features, VNet injection and policies are free, including for public repositories; runner minutes by size, private repository usage beyond entitlements and agentic token usage plus VM time are billed. Everything presented is said to be generally available except two items: Actions firewall, publicly available in technical preview with GA targeted before the end of June 2027, and keyless app tokens, staff-shipped with a preview expected within about a quarter. Documentation and feedback for the firewall are found under 'actions firewall early access'.
- 37:47 New Depth 200 · Novelty 2/3
Roadmap and adoption plan: publisher guarantees, approvals, enterprise firewall policy
Roadmap items include official actions releases built on immutable releases, turnkey lock file onboarding for thousands of repositories, admin approval of workflow runs instead of outright failure, a reference rule restricting where workflows run, firewall policy via the actions policy engine at enterprise, organization and repository level with repository custom properties, and marketplace indicators. The recommended adoption plan: review the new defaults and the opt-in syntax for unsafe checkout, define actions policies (the actor rule can support SOC 2 auditing), experiment with lock files, watch the changelog, and explore the firewall and Azure private networking.
- 40:39 Closing Depth 100 · Novelty 0/3
Closing: on-demand resources and Q&A offer
The speakers point to related on-demand sessions for further learning. They offer to take a few questions in the room or outside after the session and thank the audience.
Announcements (15)
-
Safer actions/checkout defaults for pull_request_target
Actions refuses to check out the pull request head SHA in pull_request_target workflows (and unsafe workflow_run inputs) and fails the run unless explicit opt-in syntax is used.
Speaker’s quote (at 06:12)
„when that is used within combination of the reference being the pull request headshot, GitHub actions will refuse checkout and that workflow run will fail.“
-
Read-only cache tokens
Workflow runs triggered without write permission to the repository receive read-only cache tokens, preventing cache poisoning of the default branch scope.
Speaker’s quote (at 08:53)
„But GitHub actions now issues read-only cache tokens to the default branch in these types of scenarios.“
-
Cache mode workflow syntax
New YAML syntax that sets cache permissions of read, write or none at job or workflow level.
Speaker’s quote (at 09:25)
„GitHub Actions has introduced new syntax for our workflow YAML that allows you to enforce a cache mode.“
-
Actions policies
Ruleset-based policies that control who and what can trigger specific workflows, restrict event triggers and require lock files, in active or evaluate mode.
Speaker’s quote (at 10:19)
„We've also shipped new capabilities, such as actions policies, which allow you to determine who and what can trigger a given workflow run.“
-
Actions lock files (gh actions-lock CLI extension)
A lock file generated by a GitHub CLI extension that pins every direct and transitive action dependency to a commit SHA and is enforced at runtime.
Speaker’s quote (at 15:37)
„So we came up with something called actions lock files. And this is kind of the entry point to lock files is this CLI repo.“
-
Enterprise and organization onboarding for lock files
Planned admin tooling showing which repositories have adopted lock files and managing adoption at scale.
Speaker’s quote (at 21:57)
„And here's what's next. We are wanting to build some tooling for enterprises and organizations to onboard.“
-
Lock file support for reusable workflows and Docker actions
Planned extension of lock files to cover reusable workflows and Docker actions.
Speaker’s quote (at 22:29)
„The other thing we want to do is add reusable workflows and Docker actions to the lock file.“
-
Producer-defined lock files in action.yml
Planned ability for an action's specification file to define its own lock file that consumers pull in.
Speaker’s quote (at 22:29)
„for producers, we want to make it so that an action not YAML, which is what defines an action specification, that it can define its own lock file.“
-
Keyless GitHub App tokens
Uses Actions OIDC to mint short-lived GitHub App tokens based on a trust policy instead of storing the app private key in the job.
preview expected within the next quarter or so
Speaker’s quote (at 24:27)
„So coming soon, we have Keyless GitHub app tokens, and that's going to use actions OIDC to mint a short-lived token based on a trust policy that you define“
-
Actions firewall
Egress allow-list firewall for GitHub-hosted runners, publicly available in technical preview with GA targeted before end of June 2027.
GA targeted before the end of June 2027 · Free
Speaker’s quote (at 37:10)
„And those actions firewall runners, they are publicly available just in technical preview.“
-
Official actions releases on immutable releases
Planned stronger publisher guarantees by building official actions releases on top of immutable releases.
Speaker’s quote (at 37:47)
„actions lock files cover consumers, but we need to build actions releases, like official actions releases on top of immutable releases.“
-
Admin approval of workflow runs
Planned option for an admin to approve a workflow run before execution instead of the run failing when criteria are not met.
Speaker’s quote (at 38:12)
„However, what if an admin wants just to approve a workflow run before it gets executed.“
-
Reference rule for actions policies
Planned rule dictating where a workflow can run, for example which branch.
Speaker’s quote (at 38:40)
„new rules such as a reference rule, being able to dictate where a workflow can run, what branch, for example, are things that we are looking to add.“
-
Enterprise-level Actions firewall policy
Planned use of the actions policy engine to apply firewall policy at enterprise, organization and repository level with repository custom properties filtering.
Speaker’s quote (at 38:40)
„The same policy engine that we demonstrated today for actions policy, we want to leverage for the firewall so that you can apply firewall policy at the enterprise organization and repository level“
-
Marketplace decision indicators for actions
Planned indicators in the marketplace to help developers decide which actions to use.
Speaker’s quote (at 39:18)
„give the marketplace a little bit of love and show indicators that will help in decision making with regard to what actions should be used.“
Demos (6)
-
Show that a fork pull request against a repo whose lint.yml uses pull_request_target with a head-SHA checkout is blocked before untrusted code runs.
Steps (5)
- Fork the PR note repository.
- Edit the README (e.g. add 'hi') in the fork.
- Open a pull request against the original repository, which triggers lint.yml.
- Open the Actions checks for the PR and inspect the lint.yml run.
- Observe the run failed because of the unsafe fork-head pattern combined with pull_request_target.
Prerequisites: A workflow triggered on pull_request_target that checks out github.event.pull_request.head.sha.
-
Show that a consumer pinning actions to SHAs is still exposed to tag hijacking in transitive dependencies, and that an actions lock file prevents it.
Steps (7)
- In VS Code, open a workflow whose actions are pinned to commit SHAs with the tag in a comment for Dependabot.
- Inspect the pinned PR size labeler composite action and note it uses diff-stats@v1 by mutable tag.
- Move the diff-stats v1 tag to a different commit to simulate an attack and start the workflow runs.
- Install the gh actions-lock extension for the GitHub CLI and generate a locked version of the workflow.
- Review the lock file: the action at v1 with its recorded commit SHA, metadata and the pinned diff-stats dependency.
- Compare the runs: the SHA-pinned run prints the 'unreviewed diff stats commit' marker, the locked run does not.
- In the locked run, open the Set up job step to confirm the lock file is used and diff-stats was fetched at the pinned SHA.
Prerequisites: GitHub CLI with the actions lock files extension installed; a repository with workflows using composite actions.
-
Show that actions lock files detect imposter commits from forks both during lock generation and at workflow runtime.
Steps (6)
- Create a commit in a fork of the PR note action that changes it to a composite action emitting an indicator of compromise.
- Reference that commit SHA via the original repository in the SHA-pinned workflow and note the UI banner that the commit does not belong to any branch.
- Re-run the lock file command in the CLI and observe it errors and refuses to add the commit.
- Manually edit the lock file to swap in the imposter SHA; CLI validation fails.
- Commit the forged lock file anyway and run the workflow.
- Observe the job does not start because the lock file is validated at runtime.
Prerequisites: GitHub CLI with the actions lock files extension; a workflow using a lock file.
-
Show that an egress allow list on firewall runners blocks data exfiltration by a compromised third-party action, while a plain runner is compromised silently.
Steps (6)
- Create an Actions firewall configuration file in enforcement mode with an allow list of three domains.
- In the workflow, use a runner label with the firewall suffix and reference the firewall configuration; define a matrix with a plain runner and a firewall runner.
- Use a license-checking action that downloads a script from a pages site and runs it.
- Swap the hosted script for a payload that sends data to an unexpected collector endpoint.
- Run the workflow and confirm both matrix jobs finish green with no visible sign of compromise.
- Open the firewall decision artifact and check which domains were allowed and that the unlisted domain was blocked on the firewall runner.
Prerequisites: Access to Actions firewall runners (technical preview, documented under 'actions firewall early access'); a firewall configuration file in the repository.
-
Set up an agentic workflow that triages new issues and inspect the security artifacts of its run.
Steps (6)
- Describe an issue-triage task in natural language (is the issue a question, should it go to the backlog).
- Run the agentic workflows compiler to generate the workflow YAML.
- Create a new issue in the repository (here an Ignite test issue asking if the PR note action is safe).
- Confirm the issue is labelled as a question.
- Open the Actions run history and inspect the run triggered by the issue event.
- Review the run artifacts: firewall activity, policy violations and token usage.
Prerequisites: Agentic workflows compiler; agentic runs are billed for token usage and runner VM time.
-
Bind Copilot cloud agent sessions across an organization to GitHub-hosted runners inside a customer Azure VNet.
Steps (5)
- Create a runner group (named Ignite) and grant access to the selected organization.
- Select an existing Azure private networking configuration for the runner group.
- Create a hosted runner (Ignite runner) in that group and set the concurrency (one machine in the demo; size it to your usage in practice).
- Open the Copilot cloud agent settings and switch from the standard ubuntu-latest runner to the labelled runner from the Ignite group.
- Uncheck 'allow repositories to customize the runner type' so all agent sessions use this runner group and network configuration.
Prerequisites: An Azure subnet delegated to GitHub and a network configuration created in advance; organization or enterprise admin rights.