A single scan can catch vulnerabilities and leaked secrets before the customer's security team does; the March tag hijacking changed how it is used in customer CI.

Key takeaways

  • When scanning container images, Trivy checks for vulnerabilities and secrets by default; you can adjust the scanner combination with --scanners.
  • A clean report only reflects the security advisory sources Trivy uses; it does not prove the image is secure.
  • After the March 2026 incident, pin trivy-action to a commit SHA rather than a version tag.

In March 2026, malware appeared in a security scanner. Aqua Security said that 76 of the 77 version tags of trivy-action were force-pushed to malicious commits, and a malicious Trivy v0.69.4 binary was also published.

Trivy should still be in the Forward Deployed Engineer (FDE) toolbox, but this incident changed how it is used. The tool's value is simple: it tells you in advance what the customer's security team is likely to find.

Suppose a bank's security team scans the image you just delivered and finds an API key in it. You lose not just a few days of fix time but also credibility, and it happens exactly when the customer is deciding whether the system can go to production. Scanning it yourself before delivery costs far less.

One command, two questions

Trivy is an open-source project maintained by Aqua Security under the Apache-2.0 license. It has broad coverage: vulnerabilities, misconfigurations, secrets, and SBOMs, scanning container images, file systems, remote git repositories, virtual machine images, and Kubernetes.

When scanning container images, two scanners are enabled by default: vulnerability scanning and secret scanning. They answer two questions respectively: do the software components in the image have known vulnerabilities? Is any sensitive information exposed?

Vulnerability scanning covers both OS packages and programming language packages. So the same report reflects both the base image and the application dependencies, which are usually owned by two different people.

When does an FDE need Trivy?

The most typical moment is right before delivery: the image is built but hasn't left your hands. The second moment is when the customer sends a list of issues and you need to check it against the actually running image item by item.

A third moment comes even earlier: right after you get the customer's code repository. Secret scanning also works on file systems and git repositories, so you can find out what's in the repo before packaging anything.

One scan before delivery day

Take a hypothetical example: you are about to deliver the image

acme/api:1.4.2

to a customer. The first run needs no arguments, because the two scanners you need are already enabled by default.

trivy image acme/api:1.4.2

Suppose the results show 180 vulnerabilities and 1 secret. Don't look at the 180 vulnerabilities first. The secret is the problem you can act on immediately, and the one least likely to be discovered after the fact. Once an image has been pushed to a registry, treat the secret as leaked: revoke and reissue it first, then rebuild the image.

Scan again after rebuilding, this time excluding vulnerabilities that have no fix available, since those entries can't be resolved by upgrading.

trivy image --ignore-unfixed acme/api:1.4.3

Suppose 120 entries disappear, leaving 60. Now you have an actionable list: upgrade the base image, upgrade dependencies, and scan again. When you need to check a specific category of issues,

--scanners

run only the specified scanners:

trivy image --scanners secret acme/api:1.4.3

Filtering helps you focus, and it also makes it easy to fool yourself

Back to those 120 entries.

--ignore-unfixed

Filtering only removes them from the screen, not from the image. If you send only the filtered report while the customer's security team runs a full scan, they will see 120 issues you never mentioned.

The safer approach is to send both versions, with one sentence explaining what was filtered and why. The goal of the delivery email shouldn't be "zero," but to show the customer's security team that you know where your risks are.

Ignore files require the same discipline. Trivy supports ignoring vulnerabilities, misconfigurations, and secrets with

.trivyignore

and

.trivyignore.yaml

, so a casually added line can hide a real secret. A reasonable rule: every ignore entry must go through code review, with a stated reason and an assigned owner.

The bigger limitation is the data itself. Trivy's documentation states that the tool only uses security advisories from the sources it lists; vulnerabilities not yet in those sources won't appear in the report.

So don't write "the image is secure" in the delivery email. Be more precise: which Trivy version was used, on what date it was scanned, and what was found.

In the customer's CI, tags are not promises

Aqua's official GitHub Action for running Trivy on Docker images is

aquasecurity/trivy-action

. It was this component whose 76 of 77 tags were force-pushed, so workflows pointing to tags could run malicious code without any changes to the repository.

Aqua recommends pinning the action to the full commit SHA rather than a version tag, because SHAs are immutable while tags are mutable. To find which commit a tag points to, query the repository directly, replacing

TAG

with the tag you plan to use:

git ls-remote https://github.com/aquasecurity/trivy-action "refs/tags/TAG" "refs/tags/TAG^{}"

The output starts with a 40-character SHA. If there are two lines, the one ending with

^{}

is the commit to pin.

Don't stop there. This command only tells you where the tag points at this moment; it doesn't prove that commit is clean. Open the commit on GitHub, read the changes, verify against Aqua's published security advisory, and only then put the SHA into your workflow.

Using the example image above, a minimal workflow looks roughly like this:

name: scan-image
on: pull_request
permissions:
  contents: read
jobs:
  trivy:
    runs-on: ubuntu-latest
    steps:
      - uses: aquasecurity/trivy-action@FULL_COMMIT_SHA # 标签名
        with:
          image-ref: acme/api:1.4.3

This file only demonstrates SHA pinning; it's not yet a real quality gate in CI: the image name is hardcoded, and there's no definition of when the job passes or fails.

The tag name is in a comment so reviewers know which version you intend to use; what actually runs is the SHA. Note that this job declares no secrets. If the image is in a private registry, the job needs credentials, so weigh that carefully before adding them.

Don't underestimate SHA pinning, because the cost of a swapped action is high. Aqua requires treating all secrets accessible to the affected runner as exposed and rotating all of them.

In the customer's CI, that runner may hold the customer's credentials, not yours. Before adding any action, ask: which secrets can this job access? Then check whether any machines or runners are still on v0.69.4.

If you find that version on a runner, treat all secrets accessible to that runner as exposed and rotate them, even with no signs of abuse.

What to learn first, and how to present it

A sensible order: first scan one of your own images with

trivy image

, understand every part of the report, then practice

--ignore-unfixed

、

.trivyignore

and

--scanners

. Once proficient, integrate it into your workflow with an action pinned to a SHA. Other scan targets like Kubernetes and virtual machine images can wait.

For career development, knowing one command is the least valuable part. Put results on your resume: scanning images before delivery, handling secrets, compressing an issue list to a size the customer's security team can review, and pinning CI to a SHA.

When reading job descriptions, watch for terms like container security, SBOM, or customer security review. If they appear, prepare a hands-on image scanning case you've personally done, and be ready to explain clearly in the interview how you decided which findings to ignore and how you communicated that to the customer.

The next time the security team asks "Has this image been scanned?", a credible answer isn't a zero—it's being able to explain what you scanned with, what you filtered out, and why that scanner is worth running in their systems.

Was this article helpful?

Thanks for your feedback!

Next on the roadmap · Stage 5: Deployment and launch — What the Snowflake FDE role reveals: the real work is in the semantic model. Cortex Analyst handles tables, Cortex Search handles documents, and the FDE's job is to make the meaning of customer data accurate.