Join our Newsletter — 33% off our NHI Course
Home› Glossary› Identity Beyond IAM› Malicious Workflow
Identity Beyond IAM

Malicious Workflow

← Back to Glossary
By NHI Mgmt Group Updated October 12, 2026 Domain: Identity Beyond IAM

A malicious workflow is an automation file in a CI/CD system that appears routine but is designed to execute attacker-controlled actions. In GitHub Actions, it can read secrets, contact external endpoints, and abuse the trust granted to repository automation.

What a malicious workflow is in CI/CD

A malicious workflow is still a workflow, but its purpose is no longer automation for the repository owner. It is crafted to look legitimate while quietly turning the pipeline into an execution path for attacker-controlled commands, data exfiltration, or post-compromise persistence.

The reason this term matters is that CI/CD automation is often granted broad runtime trust. A workflow file can run on protected branches, access build-time variables, and interact with deployment systems, so the malicious version weaponises ordinary delivery mechanics rather than breaking them outright.

In practice, the attacker is not inventing a new class of system, but abusing the normal trust placed in repository automation. That makes the workflow itself the payload, because the file can be committed, reviewed too quickly, or introduced through compromised access and then executed as part of the build.

How malicious workflows abuse repository automation

Most malicious workflows exploit the fact that automation is expected to run without constant human supervision. If a platform executes the workflow on push, pull request, dispatch, or scheduled triggers, the attacker may only need a single opportunity to get the file accepted or to influence the event that launches it.

A workflow can be malicious in several ways: it can print secrets, call out to external endpoints, download additional code, alter release artefacts, or misuse tokens that were intended only for build steps. The danger is not limited to one command, because the file can chain several steps and hide the harmful action among ordinary CI tasks.

This is why repository automation deserves the same scrutiny as any other privileged execution surface. A workflow definition is not just configuration, it is executable control logic, and when that logic is attacker-shaped it becomes a supply-chain issue as much as a pipeline issue.

Why malicious workflows are so effective

Malicious workflows work because they sit inside a trusted operational path. They inherit legitimacy from the repository, from the CI/CD platform, and sometimes from the social expectation that build files are technical rather than adversarial.

That trust boundary is especially sensitive when workflows can access Fake Dependabot commits 2023, because fake maintenance activity can be used to smuggle workflow changes into otherwise normal development traffic. Similar abuse patterns appear in GhostAction campaign 2025 and GhostAction returns 2026, where fake security workflows were used to exfiltrate CI/CD secrets at scale.

The broader lesson is that malicious workflows succeed when review and runtime trust are treated as the same thing. A file may look like routine automation in code review, yet still be designed to act as a secret-stealing or access-abuse mechanism once the runner executes it.

What a malicious workflow means for delivery security

A malicious workflow can undermine integrity, confidentiality, and release trust at the same time. It may alter build output, leak credentials, or create a hidden route into downstream systems that continue to trust the pipeline output after the initial compromise.

This makes workflow abuse a delivery-security problem, not just a repository hygiene problem. A compromised workflow can turn the CI/CD system into an attacker-operated staging point, especially when secret exposure or token misuse gives the attacker repeated access across multiple repositories and environments.

Once that happens, the impact is often larger than the single repository. The same automation account, signing path, or integration token may be reused across projects, which means one malicious workflow can become a mechanism for broader supply-chain compromise.

Risk and Threat Considerations

Malicious workflows are high-risk because they exploit a trusted execution channel that often has broad read and write privileges. When an attacker gains control of workflow logic, the pipeline can become a reliable way to steal secrets, tamper with artefacts, or establish persistence through repeated runs.

Failure mechanism: The workflow executes with the repository's normal automation trust, which lets attacker-controlled steps run inside a privileged CI/CD context and access secrets, tokens, or external network destinations.

Impact: Organisations can face credential theft, poisoned builds, repository compromise, and downstream supply-chain exposure across environments that trust the CI/CD output.

Standards & Framework Alignment

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

OWASP Non-Human Identity Top 10, OWASP API Security Top 10 and MITRE ATT&CK define the specific risk controls and attack patterns relevant to this term.

FrameworkControl / ReferenceRelevance
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageMalicious workflows commonly steal secrets from CI/CD runners.
NHI-05 — Overprivileged NHICI/CD automation often holds excessive runtime privilege.
NHI-06 — Insecure Cloud Deployment ConfigurationsCI/CD workflow abuse often reflects unsafe deployment and automation settings.
Recommendation — Restrict workflow access to secrets and remove unused secret exposure paths. Reduce workflow permissions to the minimum required for each job. Harden runner and workflow settings so untrusted changes cannot execute broadly.
OWASP API Security Top 10API2 — Broken AuthenticationWorkflow abuse often depends on stolen or misused automation credentials.
Recommendation — Validate and rotate automation credentials to prevent replay and misuse.
MITRE ATT&CKT1552 — Unsecured CredentialsMalicious workflows frequently target secrets and tokens stored in build contexts.
Recommendation — Hunt for credential exposure in pipeline logs, variables, and job outputs.

Practitioner Guidance

Why practitioners should care: Treat workflow files as executable security-relevant code, not as inert configuration. The important judgement is whether the file can change what the runner is allowed to read, call, or publish, because that is where malicious logic becomes operationally dangerous.

Common misunderstanding: A workflow that passes code review is not automatically safe, especially if the review only checked syntax or expected behaviour at a superficial level. The real question is whether the workflow can run trusted steps that are unnecessary for the intended build outcome.

Practitioner takeaway: Review automation with the same suspicion you apply to privileged scripts, because in CI/CD, the workflow definition itself is often the attack surface.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 12, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org