An extensive software supply chain compromise campaign has exposed how modern CI/CD infrastructure can be weaponized at scale. In a highly automated operation tracked under the codename megalodon, attackers silently injected malicious GitHub Actions workflows into thousands of repositories in only a few hours, transforming trusted development pipelines into credential-harvesting platforms.

According to research published by SafeDep on May 21, 2026, the operation targeted GitHub repositories by modifying automation workflows rather than directly altering application source code. The attackers focused specifically on GitHub Actions, the CI/CD framework widely used to build, test, package, and deploy software automatically.

Within an approximately six-hour timeframe between 11:36 UTC and 17:48 UTC on May 18, 2026, the attackers pushed 5,718 malicious commits across 5,561 repositories. The scale, speed, and consistency of the operation strongly suggest the use of fully automated tooling and previously compromised authentication credentials.

CI/CD Pipelines Became the Primary Attack Surface

Rather than tampering with application logic, the adversaries manipulated workflow configuration files stored inside the .github/workflows/ directory. These files define how repositories automatically execute tasks such as builds, testing, packaging, publishing, and deployment.

This approach was particularly effective because workflow definitions are often treated as low-risk infrastructure configuration rather than security-sensitive code. Many developers review them less carefully than application commits, especially when changes appear routine or administrative in nature.

The malicious workflows contained encoded payloads designed to execute automatically inside CI runners whenever developers triggered repository activity such as commits, pull requests, or deployment jobs. Once executed, the payloads harvested credentials, tokens, secrets, and infrastructure configuration data directly from the build environment.

Discovery of the Compromise

The campaign was uncovered after SafeDep’s automated malware analysis platform detected suspicious behavior inside a new version of the npm package @tiledesk/tiledesk-server, an open-source live chat platform package that had maintained a long-standing legitimate reputation since 2019.

Researchers compared version 2.18.12 against the previously trusted release 2.18.5 and discovered that the only modification involved a GitHub Actions workflow file. Legitimate Docker build logic had been removed and replaced with a concealed command designed to decode and execute a Base64-encoded Bash payload.

The actual application source code remained untouched, making the compromise extremely difficult to detect through traditional package auditing methods. The package maintainer unknowingly continued publishing infected releases directly from the compromised repository, unintentionally distributing the malicious workflow to downstream users.

This aspect of the attack is particularly important because the npm account itself was never compromised. Instead, the attacker poisoned the trusted source repository and relied on the normal software release process to propagate the malicious content.

Two Distinct Payload Variants

The attackers deployed two workflow variants depending on the value of the targeted repository.

The first variant, identified as SysDiag, was designed for broad deployment across large numbers of repositories. It created entirely new workflow files configured to execute automatically on every push and pull_request_target event, maximizing the probability of credential collection.

The second variant, named Optimize-Build, operated more selectively. Instead of adding a new workflow, it replaced an existing one and configured execution using workflow_dispatch, meaning it would remain dormant until manually triggered through the GitHub API. This stealthier approach was reserved for higher-value repositories such as Tiledesk.

Social Engineering Through Familiar CI Terminology

To avoid suspicion, the attackers disguised their commits using generic automation-themed identities such as build-bot, auto-ci, ci-bot, and pipeline-bot. The associated commit messages were intentionally crafted to resemble routine maintenance or optimization activity commonly seen in modern DevOps environments.

Examples included:

  • ci: add build optimization step
  • build: improve ci performance
  • chore: optimize pipeline runtime
  • ci: update build config

The GitHub accounts associated with these commits appeared to be disposable identities using randomized usernames and generic no-reply email addresses. Investigation suggested the pushes were executed using previously stolen Personal Access Tokens (PATs) or compromised deploy keys belonging to legitimate repository owners.

What the Malware Attempted to Steal

Once executed inside CI runners, the payload initiated an extensive credential harvesting operation targeting virtually every high-value secret commonly present in automated build environments.

The malware searched for:

  • AWS access keys and session tokens
  • Google Cloud OAuth credentials
  • Azure cloud authentication data
  • GitHub Actions OIDC tokens
  • SSH private keys
  • Docker authentication files
  • .npmrc and .netrc credentials
  • Kubernetes configuration files
  • Terraform secrets
  • HashiCorp Vault tokens
  • Embedded API keys and JWT tokens
  • Database connection strings
  • Service account files and .env data

In addition to known credential locations, the payload performed direct source code scanning using dozens of regular-expression patterns to identify secrets embedded anywhere within repositories.

All collected information was exfiltrated to a remote command-and-control server located at 216.126.225.129:8443.

One particularly dangerous target was the GitHub Actions OpenID Connect (OIDC) token. These short-lived authentication tokens allow CI pipelines to access cloud infrastructure without storing permanent credentials. Stealing them could temporarily grant attackers legitimate cloud access even in environments following modern secret-management practices.

Why This Supply Chain Attack Is Significant

The Megalodon campaign demonstrates how CI/CD systems have evolved into high-value infrastructure targets. Modern pipelines frequently possess elevated privileges, deployment capabilities, production secrets, and trusted cloud identities. A single compromised workflow can therefore expose an organization’s entire operational environment.

The incident also highlights an increasingly dangerous characteristic of software supply chain attacks: adversaries no longer need to compromise package repositories directly. By targeting source repositories and trusted developer workflows, attackers can abuse legitimate release pipelines to distribute malicious content downstream at scale.

In practical terms, this means CI/CD configuration files must now be treated as critical security assets rather than simple automation scripts. Workflow modifications deserve the same level of scrutiny, auditing, and approval controls traditionally reserved for production application code.

Indicators of Compromise

SafeDep identified several key indicators associated with the campaign:

  • Command-and-control server: 216.126.225.129:8443
  • Workflow names: SysDiag and Optimize-Build
  • Commit author aliases:
    • build-bot
    • auto-ci
    • ci-bot
    • pipeline-bot
  • Suspicious workflow permissions:
    • id-token: write
    • actions: read
  • Compromised npm package versions:
    • @tiledesk/tiledesk-server 2.18.6 – 2.18.12

Defensive Recommendations

Organizations operating GitHub repositories or CI/CD infrastructure should immediately audit workflow directories for unauthorized changes, especially newly introduced or recently modified automation files. Particular attention should be given to workflows that request elevated permissions such as id-token: write.

Security teams should also:

  • Rotate all CI/CD secrets and cloud credentials if compromised workflows may have executed
  • Review GitHub Personal Access Tokens and deploy keys
  • Restrict outbound network access from CI runners
  • Monitor unusual traffic to external IP addresses and non-standard ports
  • Require peer review and signing for workflow changes
  • Implement secret-scanning and workflow integrity monitoring

The Role of FileDNA in Defending Against Supply Chain Attacks

Attacks such as Megalodon reinforce the importance of deep file and content inspection within modern development ecosystems. Traditional malware detection often focuses on executable payloads, but supply chain attacks increasingly rely on trusted infrastructure files, scripts, YAML workflows, archives, and configuration data that appear operationally legitimate.

Technologies such as CyberQuay’s FileDNA approach this problem by treating every incoming file or content object as potentially untrusted. Instead of relying solely on signature-based detection, FileDNA CADR performs deep structural analysis, recursive content inspection, script discovery, and active content decomposition to identify embedded malicious behaviors hidden inside archives, workflows, scripts, documents, and nested containers.

In CI/CD environments specifically, this type of analysis can help identify suspicious encoded commands, hidden execution chains, credential-harvesting logic, malicious automation payloads, and obfuscated scripts before they reach developers or production systems. By reconstructing or sanitizing content while preserving operational usability, file-focused inspection technologies can reduce the attack surface exploited by modern software supply chain campaigns such as Megalodon.

References