Security incidents

How the Trivy supply-chain compromise reached downstream AI software

Security-tool trust: A scanner inside the build. Conceptual security control diagram.

Public report: 19 March 2026. Updated: 17 November 2026.

The Trivy supply-chain compromise exposes a particularly uncomfortable trust problem: a tool introduced to improve security can execute inside an environment containing the credentials an attacker wants. Security tooling is still software, with maintainers, dependencies and release infrastructure. Its defensive purpose does not make its distribution path immune to compromise.

What happened

On 19 March 2026, malicious releases affected Trivy and related GitHub Actions. Aqua's account describes compromised publishing authority and changes to trusted action references. Later in March, LiteLLM identified two malicious PyPI releases and said it believed the compromise originated through a Trivy dependency in its security-scanning workflow.

The connection makes this a useful downstream case study, but the scope should remain precise. It does not establish that every Trivy installation or every LiteLLM deployment was compromised. Exposure depends on the artefact or action revision executed, the relevant time window and the authority available in that environment.

Why the sequence matters

The public incident reporting began with the March Trivy compromise, followed by the downstream LiteLLM disclosure. A developer investigating exposure needs the chronology of both releases and their own builds. The date a malicious package was removed is not the date every affected environment became safe.

The sources describe a suspected origin for the downstream compromise and confirmed malicious releases. The analysis below keeps that attribution with the maintainers rather than presenting an independent forensic reconstruction.

Why scanners often run near valuable authority

Security-scanner publishing trust can be overlooked because teams focus on what the scanner checks. A vulnerability or configuration scan may run during a release workflow, where cloud credentials, registry access or repository secrets are also available. Those privileges can turn execution of the scanner into access to unrelated systems.

The appropriate permission boundary depends on the task. A scanner reviewing an artefact may need to read the artefact and publish a result. It may not need authority to change source, modify cloud infrastructure or publish a production release. Putting all of those capabilities into one job makes the compromise of any executed component more consequential.

Downstream build secrets can also be exposed indirectly. A workflow may retrieve credentials for another step or leave them available in the job environment. A tool does not need to be designed to use a credential in order for malicious code running beside it to attempt access.

Action references add another integrity question. A familiar version label is a name pointing to code; its security depends on who can change the reference and what the consuming workflow verifies. Reproducible evidence should identify the revision actually executed, not just the label expected by the maintainer.

The customer investigation is broader than package replacement

A business first needs to identify affected executions. Its evidence may include workflow records, package caches, container image metadata and deployment history. The same vulnerable release can appear in several places because automated systems rebuild software independently.

Next, the team needs to map credentials available during those executions. The important population is not limited to secrets visibly used by the scanner. It includes authority the compromised job could obtain or exercise, subject to the environment's actual controls.

Finally, the investigation should examine subsequent activity. Replacing the malicious tool does not invalidate a copied credential or undo a release published using stolen authority. The response needs a reliable route from the exposed job to the systems and artefacts it could affect.

That can be difficult in short-lived infrastructure. A worker may be deleted normally after completing its job. Evidence about its identity and access should therefore be retained by the surrounding platform rather than depending entirely on the worker's local files.

How penetration testers assess comparable workflows

An authorised pipeline assessment should map each job's inputs, executed components, secrets and output permissions. Review the security-scanning stage with the same care as deployment. Its name does not establish that it is a low-risk part of the workflow.

Using a controlled test action or harmless instrumented dependency, testers can establish which synthetic credentials are accessible from the job. The exercise should avoid collecting real secrets and should run within an isolated or explicitly authorised environment.

Assess whether untrusted contributions can influence the code executed by a privileged job. That includes workflow changes, dependency updates and build artefacts passed between stages. A useful finding explains where trust changes and why the receiving stage treats the input as safe.

Detection tests can simulate an unexpected publishing event or controlled secret-access pattern. Measure whether the event is attributable to the correct job and revision, whether someone receives it promptly and whether the credential can be disabled independently of the compromised worker.

How to reduce the risk

Separate scanning, release approval and publication where practical. Give each stage the minimum authority needed for its task. Avoid making a read-only security check a convenient carrier for production administration credentials.

Use verifiable references for third-party workflow components and retain the resolved revisions in build evidence. Review updates deliberately, including the implications of any new permissions or dependencies. A pinned revision improves traceability but still needs assurance that the pinned code is appropriate.

Prefer short-lived workload identities with trust conditions tied to the intended job and repository. Verify the exact conditions and the people able to change them. Replacing a static secret with an equally broad dynamic identity does not resolve excessive authority.

Retain enough build and registry evidence to identify what ran and what was published. Protect important records from routine job deletion and from the identities whose behaviour they record. That makes later scope analysis more reliable.

When exposure is confirmed, rebuild affected execution environments before supplying new credentials. Revoke reachable authority from a trusted system and examine downstream systems for its use. Coordinate communication where the organisation's own published artefacts may have affected customers.

Distinguish the scanner's analysis permissions from the build system's publishing permissions. A tool used to assess source code rarely needs to inherit authority to release that code. Review the environment actually presented to the process, including variables and credentials supplied automatically by the worker. A restrictive configuration document is weak evidence if the running job receives broader access.

Prepare a record of completed builds during the suspected exposure period. For each important release, preserve the relevant worker, dependency and artefact information. This allows the organisation to investigate a defined set of outputs and related secrets. It is more useful than reinstalling the scanner and assuming that the earlier builds no longer require examination.

A focused exercise for a release team

Take one recent security scan and list every permission available to its job. Ask which permissions are essential to the scan itself and which exist only because several tasks were combined for convenience.

Then demonstrate that a replacement credential can be issued to a clean worker without reusing the suspect environment. Those two checks address the main architectural lesson: a security gate should help constrain a release, rather than become an unnecessarily privileged route through the entire delivery process.

References

<https://www.aquasec.com/blog/trivy-supply-chain-attack-what-you-need-to-know/>

<https://docs.litellm.ai/blog/security-update-march-2026>

Read about our methodology or contact pentested.com to discuss security testing for your organisation.

See your first test report this week.

Book a 30 minute demo. We will verify one of your targets with you and run a test against it, so you can judge the results on your own systems.

Book a demo