Join our Newsletter — 33% off our NHI Course

What would it take for TeamPCP's Trivy attack to steal secrets?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 19717
Topic starter  

TL;DR: Mutable references, runner-level secret access, and weak runtime monitoring let attackers turn trusted GitHub Actions into credential-stealing infrastructure, StepSecurity reports from the Trivy and KICS compromises. Workflow governance needs pinned references, tighter token scope, and live runner visibility before compromise can turn into exfiltration.

Editorial analysis by NHI Mgmt Group, based on content published by StepSecurity: “10 Layers Deep: How StepSecurity Stops TeamPCP's Trivy Supply Chain Attack on GitHub Actions”.

By the numbers:

  • In March 2026, attackers injected a credential stealer into 76 of 77 version tags of aquasecurity/trivy-action.

Key questions

Q: Why do GitHub Actions workflows increase the risk of secret exposure?

A: Because workflows often run with access to repository tokens, cloud credentials, and runner state, a compromise can reveal more than code.

Q: How do you know whether a GitHub Actions workflow is actually secure?

A: A workflow is only as secure as its reference integrity, secret scope, and runtime monitoring.

Q: What breaks when GitHub Actions workflows use mutable dependencies and overprivileged tokens?

A: The reviewed workflow is no longer the executed workflow.

Practitioner guidance

  • Pin all third-party GitHub Actions to immutable SHAs Replace mutable tags with full commit references for any action that can reach secrets, deploy artifacts, or touch production paths.
  • Restrict secrets exposure in workflow jobs Review which jobs receive environment variables, cloud tokens, and deployment keys, then remove unnecessary secrets from jobs that do not need them.
  • Add runtime controls for runner containment Use egress allowlisting and process monitoring so a compromised action cannot freely call out or scrape process memory during execution.

Bottom line: GitHub Actions compromise becomes a secret governance problem when mutable references and privileged runners let attackers execute trusted workflows as credential-stealing infrastructure.

Glossary terms: GitHub Action Supply Chain Compromise, Mutable Tag, Runner Memory Scraping, Log Inventory

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →


This topic was modified 2 days ago by NHI Mgmt Group

   
Quote
(@mr-nhi)
Member Moderator
Joined: 6 months ago
Posts: 20207
 

Mutable action references create secret governance debt: when workflows rely on tags instead of immutable references, the organisation has delegated trust to a label that can move. That makes the control failure structural, not accidental, because the workflow can run unreviewed code under a legitimate repository path. For identity teams, this is a machine-identity governance problem as much as a software-supply-chain issue. Practitioners should treat tag pinning as a baseline control, not an advanced hardening step.

A few things that frame the scale:

A question worth separating out:

Q: When should teams cancel or quarantine a GitHub Actions run?

A: Teams should cancel a run when the workflow resolves to a known compromised action, a suspicious commit that is not on an expected branch, or an execution path that violates policy before any step completes. The goal is to stop secret-bearing execution before the job can establish network connections or read process memory.

👉 Read our full editorial: Trivy and KICS show GitHub Actions need tighter secret controls


This post was modified 2 days ago by NHI Mgmt Group

   
ReplyQuote
Share:

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.