On March 19, 2026, Trivy, Aqua Security’s widely used open-source vulnerability scanner, was reported to have been compromised in a sophisticated CI/CD-focused supply chain attack. Threat actors leveraged access from a prior incident that was not fully remediated to inject credential-stealing malware into official releases of Aqua Security’s widely adopted open-source vulnerability scanner, Trivy. The attack simultaneously compromised the core scanner binary, the trivy-action GitHub Action, and the setup-trivy GitHub Action, weaponizing trusted security tooling against the organizations relying on it.
The campaign, attributed to the threat actor identifying as TeamPCP, introduces several concerning techniques. This blog walks through the Trivy supply chain attack and explains how Microsoft Defender helps organizations detect, investigate, and respond to this incident.
This activity has since expanded to additional frameworks, including Checkmarx KICS and LiteLLM, with further details to be shared as the investigation continues.
The activity on March 19 represents the execution phase of the campaign, where previously established access was used to weaponize trusted Trivy distribution channels:
This attack exploited two aspects of how Git and GitHub operate by design: mutable tags and self-declared commit identity, turning expected platform behavior into an advantage for the attacker.
In Git, a tag is a label that maps to a specific commit in the repository’s history. By default, these references are not immutable – anyone with push access can reassign an existing tag to point to an entirely different commit. The attacker did exactly that, replacing the target commit behind 76 of 77 tags in trivy-action and all 7 in setup-trivy with commits containing malicious payloads. Every CI/CD pipeline that referenced these actions by tag name began running the attacker’s code on its next execution, with no visible change on GitHub to alert maintainers or consumers.
In addition, the threat actor spoofed the identity of the commit, similar to the persona impersonation tactics seen in the Shai-Hulud 2.0 campaign.
Microsoft Defender for Cloud observed the full attack chain in compromised self-hosted GitHub Actions runners.
Upon execution, the entry point performed process discovery to locate runner processes (Runner.Worker, Runner.Listener), then inspected them to identify processes carrying secrets. A base64-encoded Python payload was then decoded and executed to handle the credential harvesting phase.
The Python stealer first fingerprinted the host (“hostname”, “whoami”, “uname -a”, “ip addr”) and dumped all environment variables (via “printenv”). It then conducted broad-spectrum credential harvesting that reveals the attacker’s interest in maximizing the value of each compromised runner:
grep AWS_”), then queried both the ECS task metadata endpoint (169.254.170.2) and the EC2 instance metadata service (169.254.169.254) for IAM credentials.grep -i google”, “grep -i gcloud”) and attempted to read the service account key file via $GOOGLE_APPLICATION_CREDENTIALS.grep -i azure”).The stolen data was then encrypted using a hybrid AES-256-CBC + RSA scheme and bundled into a tpcp.tar.gz archive, then exfiltrated via HTTP POST to the typosquatted domain scan.aquasecurtiy[.]org.
After exfiltration, the malware cleaned up all temporary files and launched the legitimate Trivy scan. The workflow completed successfully with expected output, masking the compromise from pipeline operators.
Microsoft Defender XDR customers can refer to the list of applicable detections below. Microsoft Defender XDR coordinates detection, prevention, investigation, and response across endpoints, identities, email, and apps to provide integrated protection against attacks like the threat discussed in this blog.
Customers with provisioned access can also use Microsoft Security Copilot in Microsoft Defender to investigate and respond to incidents, hunt for threats, and protect their organization with relevant threat intelligence.
| Tactic | Observed activity | Microsoft Defender coverage |
| Credential access | Access to the IMDS endpoint in cloud resources to steal cloud tokens | Microsoft Defender for Cloud: – Access to cloud metadata service detected |
| Credential access | Secret Reconnaissance on containers served as CI\CD runners | Microsoft Defender for Cloud: – Possible Secret Reconnaissance Detected Microsoft Defender for Endpoint: – Kubernetes Secrets Enumeration Indicative of Credential Access |
| Command and Control | DNS query to a domain name which is identified as suspicious by Microsoft Threat Intelligence – including the scan[.]aquasecurtiy[.]org domain (and others) | Microsoft Defender for Identity: – Suspicious DNS query from a device in the organization Microsoft Defender for Endpoint: – Suspicious connection blocked by network protection – Suspicious activity linked to an emerging threat actor has been detected – Connection to a custom network indicator |
| Exfiltration | Malicious exfiltration activity performed by infected Trivy version | Microsoft Defender for Cloud: – Malicious commands from TeamPCP supply chain attack detected Microsoft Defender for Endpoint: |
The recent compromise affecting Trivy and related GitHub Actions highlights how attackers increasingly target CI/CD pipelines, trusted developer tooling and software supply chains. In this campaign, adversaries exploited insecure workflow configurations, abused trusted version tags and leveraged stolen credentials to distribute malicious artifacts and exfiltrate secrets.
Microsoft Defender recommends organizations to adopt the following preventative measures to reduce exposure to similar attacks.
Immediately update to safe versions: Ensure all workflows are running verified safe versions:
| Component | Safe Version |
| Trivy binary | v0.69.2 – v0.69.3 |
| trivy-action | v0.35.0 |
| setup-trivy | v0.2.6 |
Harden CI/CD pipelines against supply chain attacks
Pin all third-party actions to immutable references:
Restrict action usage through policy controls:
Enforce least privilege and strong identity controls
Minimize token and permission scope:
Protect secrets and sensitive data in pipelines
Eliminate implicit secret exposure:
Disable credential persistence on runners:
Reduce lateral movement risk through Attack Path analysis
Organizations can reduce the risk of credential-driven lateral movement by leveraging attack path analysis in Microsoft Defender. This capability provides visibility into how identities, secrets, misconfigurations and resources are interconnected across the environment. By continuously analyzing these relationships, Defender identifies attack paths involving leaked or overprivileged secrets, including those used in CI/CD pipelines.
Security teams can use these insights to proactively remediate risk by removing excessive permissions, rotating credentials, and segmenting access, effectively limiting how far an attacker could move if a pipeline or token is compromised.
Assess blast radius using Advanced Hunting
The Exposure Management graph provides a unified representation of organizational assets and their relationships, including identities, endpoints, cloud resources and secrets. This graph is also exposed to customers through Advanced Hunting in Microsoft Defender, enabling programmatic exploration of these connections.
Using Advanced Hunting, security teams can query this graph to assess the potential blast radius of any given node, such as a leaked CI/CD secret or compromised identity. By understanding which assets are reachable through existing permissions and trust relationships, organizations can prioritize remediation of the most critical exposure paths.
Additional examples and query patterns are available here as well as in the following Advanced Hunting Queries section below.
CloudProcessEvents query to identify malicious commands originating from the recent TeamPCP supply-chain attacks.
CloudProcessEvents
| where ProcessCommandLine has_any ('scan.aquasecurtiy.org','45.148.10.212','plug-tab-protective-relay.trycloudflare.com','tdtqy-oyaaa-aaaae-af2dq-cai.raw.icp0.io','checkmarx.zone','/tmp/runner_collected_','tpcp.tar.gz')
or (ParentProcessName == 'entrypoint.sh' and ProcessCommandLine has 'grep -qiE (env|ssh)')
Kubernetes secrets enumeration
DeviceProcessEvents
| where FileName == "bash"
| where InitiatingProcessFileName != "claude"
| where InitiatingProcessParentFileName != "claude"
| where ProcessCommandLine !contains "claude"
| where ProcessCommandLine has_all ("kubectl get secrets ", " --all-namespaces ", " -o json ", " || true")
Google Cloud credential enumeration
DeviceProcessEvents
| where FileName == 'dash'
| where InitiatingProcessCommandLine == 'python3'
| where ProcessCommandLine has_all ('$GOOGLE_APPLICATION_CREDENTIALS', ‘cat’, '2>/dev/null')
Exfiltration via curl from a Trivy process
DeviceProcessEvents | where FileName == "curl" | where InitiatingProcessCommandLine contains "trivy-action" | where ProcessCommandLine contains " POST " | where ProcessCommandLine contains " --data-binary"
Typosquatted C2 Domain in Command Line
CloudProcessEvents
| where ProcessCommandLine has_any (
// Typosquatted C2 domain
"scan.aquasecurtiy.org", "aquasecurtiy.org",
// C2 IP
"45.148.10.212”)
| project Timestamp, KubernetesPodName, KubernetesNamespace, AzureResourceId, ContainerName, ContainerId, ContainerImageName, ProcessName, ProcessCommandLine, ParentProcessName, FileName
OpenSSL-based encryption operations
CloudProcessEvents
| where ProcessName == "openssl"
and ProcessCommandLine has_any ( "enc -aes-256-cbc", "enc -aes-256",)
and and ProcessCommandLine has "-pass file:"
| project Timestamp, KubernetesPodName, KubernetesNamespace, AzureResourceId, ContainerName, ContainerId, ContainerImageName, ProcessName, ProcessCommandLine, ParentProcessName, FileName
DeviceProcessEvents
| where ProcessCommandLine has_all ('/dev/null', '--data-binary', '-X POST', 'scan.aquasecurtiy.org ')
or ProcessCommandLine has_any ('pgrep -f Runner.Listener', 'pgrep -f Runner.Worker')
or ProcessCommandLine has_any ('tmp/runner_collected_', 'tpcp.tar.gz') and ProcessCommandLine has_any ('curl', 'tar', 'rm', 'openssl enc') and ProcessCommandLine !has 'find'
or InitiatingProcessCommandLine contains '/entrypoint.sh’ and ProcessCommandLine has ‘grep -qiE (env|ssh)’
| join kind=leftouter (DeviceNetworkEvents | where RemoteIP == '45.148.10.122') on DeviceId
| project Timestamp, FileName, ProcessCommandLine, InitiatingProcessCommandLine, InitiatingProcessFolderPath, RemoteIP
Compromised installations of Trivy
DeviceTvmSoftwareInventory
| where SoftwareName has "trivy"
| where SoftwareVersion has_any ("0.69.4", "0.69.5", "0.69.6")
Update: Ongoing Investigation and Additional Activity (Aqua)
This research is provided by Microsoft Defender Security Research with contributions from Yossi Weizman, Tushar Mudi, Kajhon Soyini, Mohan Bojjireddy, Gourav Khandelwal, Sai Chakri Kandalai, Mathieu Letourneau, Ram Pliskin, and Ivan Macalintal.
Review our documentation to learn more about our real-time protection capabilities and see how to enable them within your organization.
Learn more about Protect your agents in real-time during runtime (Preview) – Microsoft Defender for Cloud Apps
Explore how to build and customize agents with Copilot Studio Agent Builder
Microsoft 365 Copilot AI security documentation
How Microsoft discovers and mitigates evolving attacks against AI guardrails
Learn more about securing Copilot Studio agents with Microsoft Defender