Join our Newsletter — 33% off our NHI Course

Why do overly permissive GitHub Actions permissions increase supply chain risk in repositories that use custom actions?

Overly permissive workflow permissions expand what an injected step can do if an action or input is compromised. When the default token has write access, a malicious payload can modify code, alter workflow behavior, or exfiltrate secrets from the runner. Least privilege limits the blast radius, which is critical because build pipelines often inherit trust across multiple repositories and dependencies.

Why excessive GitHub Actions permissions magnify supply chain exposure

Custom actions sit inside a trust chain that often crosses repository boundaries, reusable workflows, package dependencies, and build-time secrets. When a workflow token has more access than the job truly needs, any compromised action, poisoned input, or injected step can do far more damage than the build itself requires. The issue is not just execution, it is execution with excess authority.

That is why least privilege matters so much in CI/CD. A repository that grants write-level permissions to a workflow token turns a narrow compromise into a broader platform event: code can be changed, release artifacts can be altered, and trusted automation can be used as a delivery path for malicious behaviour.

What custom actions make worse

Custom actions increase the number of places where trust can fail. They may be maintained outside the repository, pulled from shared sources, or updated without a full code review at the point of use. If one of those actions is compromised, the action inherits the workflow’s permissions and can operate as if it were part of the repository’s own automation.

The CI/CD Pipeline Identity Security Guide is useful here because the problem is not only code integrity, but also what the pipeline identity can do once code or action content is replaced. That includes pinned action usage, trust boundaries, and token scoping.

Custom actions also widen the blast radius of dependency-style abuse. A malicious step does not need to own the whole repository if it can write to workflow files, inject new jobs, or use a powerful token to pull data from the runner environment. The attack path becomes especially dangerous when actions are reused across many repositories and the same permission model is copied everywhere.

For a concrete example of how GitHub Actions abuse can expose secrets at scale, the GitHub Action tj-actions Supply Chain Attack shows how a compromised action can turn workflow trust into mass secrets exposure. The same basic pattern applies whenever a workflow token or runner context is over-privileged.

How over-permissioning turns compromise into code and secrets loss

When the token has write access, a malicious payload can often move from execution to persistence. It can commit changes, alter workflow definitions, tamper with release steps, or stage follow-on payloads in a place that future builds will trust. In a custom-action environment, that is more dangerous because the action is already inside the automation boundary.

The other major risk is secret exposure. Build jobs often handle deployment keys, package credentials, signing tokens, or cloud access material. If the workflow can read too much, or if an attacker can pivot from the action into runner state, secrets may be exfiltrated before detection. Once those credentials are stolen, the compromise can extend beyond GitHub into downstream systems and third-party services.

That is the supply chain problem: a single action compromise can become a release compromise, a secrets compromise, and a downstream trust compromise at the same time. Least privilege narrows the maximum damage to the minimum set of operations the workflow actually needs.

Risk and Threat Considerations

Overly permissive GitHub Actions permissions create a high-value abuse path because the attacker does not need to break the repository directly, only the automation path that the repository already trusts. In a custom-action setup, that can convert one malicious step into code tampering, secret theft, or pipeline persistence across multiple repositories.

Failure mechanism: A compromised action, injected step, or poisoned input inherits a token with write or broad read access, then uses that authority to modify workflow files, push malicious changes, or dump runner-resident secrets.

Impact: The compromise can spread from a single job to release integrity, secret confidentiality, and downstream systems that trust the pipeline’s outputs or credentials.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8, NIST SP 800-53 Rev 5 and SLSA set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
CIS Controls v8 CIS-5 — Account Management Workflow token scope and action permissions are account/privilege control issues in CI/CD.
Recommendation — Restrict workflow token scope and revoke unnecessary write permissions for build jobs.
NIST SP 800-53 Rev 5 IA-5 — Authenticator Management GitHub Actions permissions rely on token and secret lifecycle discipline to limit abuse.
AC-6 — Least Privilege The question is directly about reducing excessive workflow authority to limit supply chain impact.
SA-15 — Development Process, Standards, and Tools Custom actions are part of the software supply chain and development pipeline controls.
Recommendation — Rotate and limit workflow credentials and secrets that a compromised action could abuse. Apply least privilege to workflow tokens, runners, and reusable actions. Require review and integrity checks for custom actions and workflow changes.
SLSA Supply-chain Levels for Software Artifacts Custom actions affect build provenance and artifact integrity in the software supply chain.
Recommendation — Adopt provenance controls so compromised workflows cannot silently ship untrusted artifacts.

Practitioner Guidance

What to prioritise: Treat workflow permissions as an abuse boundary, not a convenience setting. The first question is whether the job truly needs repository write access, secret read access, or broad token scope to complete its task.

What to verify: Confirm that custom actions are pinned to immutable references, that default token permissions are reduced to the minimum required, and that jobs handling releases or deployment cannot silently inherit broader rights than build-only jobs.

Common mistake: Teams often secure the repository but leave the workflow token broad, which means the action layer becomes the easiest route to change code, alter CI behaviour, or extract sensitive material.

Practitioner takeaway: In GitHub Actions, the real control point is not just who can merge code, but what the workflow identity can do if an action is compromised; narrow that authority before you assume the pipeline is trustworthy.