Borehole · Project · free tier
aquasecurity/trivy
Free reading: not for reliance
0231990 · 4,305 commits · 3,429 files
Read 2026-10-22

aquasecurity/trivy: technical due diligence, read from its repository

What Borehole read in aquasecurity/trivy's code and history at 0231990: its licence, security advisories, releases, review practice, tests, dependencies and operations. Every finding cites the file and line it rests on. The full report also covers the team and asks the questions the code cannot answer.

DimensionRating
Architecture & Codebase — including AI provenancestrong
Engineering Process & SDLC Maturitystrong
Product & Engineering Maturityadequate
Security & Reliability Postureadequate
Observability & Operationsadequate
Fit with the Acquirernot assessable

What the repository says

  • Releases are cut from another branch than the one surveyed
  • LICENSE: Relicensed: MIT → AGPL-3.0 (2019-05-15) → Apache-2.0 (2020-03-13)

Architecture & Codebase — including AI provenance

strong
01.6

rpc/cache/service.twirp.go is 1,989 lines, 23× this codebase's median file

adequate

The median source file here is 83 lines. 9 files exceed 1,000 lines, the largest being 1,989. Size is not a defect on its own — some problems genuinely live in one place — but these are where merge conflicts, review fatigue and single-owner knowledge concentrate, and they are the first thing that slows an inheriting engineer down.

Evidence
rpc/cache/service.twirp.go:1 — 1,989 lines (23× median)
pkg/dependency/parser/nodejs/npm/parse_testcase.go:1 — 1,889 lines (22× median)
pkg/commands/app.go:1 — 1,523 lines (18× median)
pkg/rpc/convert.go:1 — 1,423 lines (17× median)
rpc/scanner/service.twirp.go:1 — 1,143 lines (13× median)

Engineering Process & SDLC Maturity

strong

No finding.

Product & Engineering Maturity

adequate
04.3

126 direct dependencies in a single manifest

adequate

go.mod declares 126 direct dependencies. Each one is a maintenance obligation, a supply-chain surface and a potential licence question that transfers with the asset. The count says nothing about whether any given dependency was a good choice; it says how many such choices a buyer inherits.

Evidence
go.mod — 126 declared
04.38

13 files still carry code deprecated more than two years ago

adequate

13 files were marked deprecated over two years ago and still are, the oldest since Jun 2021. A deprecation is a promise to remove. Ask what still depends on these, and whether removing them is scheduled.

Evidence
rpc/common/service.pb.go — deprecated since Jun 2021
rpc/scanner/service.pb.go — deprecated since Jun 2021
rpc/cache/service.pb.go — deprecated since Jun 2021
pkg/flag/db_flags.go — deprecated since Jul 2022
pkg/flag/misconf_flags.go — deprecated since Jul 2022
04.62

Releases are cut from another branch than the one surveyed

adequate

The newest release, v0.76.1, is not on the branch this survey read; the newest release on it is v0.76.0. The shipped product may differ from what this report describes. Survey the release branch too.

Evidence
tag v0.76.1

Security & Reliability Posture

adequate
05.1

20 credential-shaped strings in the tree sit in tests, examples, documentation or local development settings

adequate

Strings shaped like credentials appear only where fakes are usual: test fixtures, examples, documentation, placeholders and local stacks. They are almost always fakes. Ask someone to confirm that none of them works anywhere, because a real key in a development file is still a real key. 1 other match set aside: expired tokens, licence tokens a vendor verifies with a public key, or placeholder text where a key would go. None grants access to anything.

Evidence
5 cited: AWS access key, where fakes are usual
05.6

1 Dockerfile runs the application as root

adequate

No USER instruction switches away from root, so the process runs with full privileges inside the container. It is a one-line fix and an ordinary expectation, which is why its absence is worth asking about: it usually says more about whether anyone has reviewed the deployment than about this container specifically.

Evidence
Dockerfile — runs as root
05.27

The build runs third-party code it does not pin

adequate

2 steps pipe a download straight into a shell. Tags have been moved to malicious commits in real supply-chain attacks, and a piped script is whatever the server returns that minute. Pinning to a commit is the fix, and it is small.

Evidence
contrib/Trivy.gitlab-ci.yml:15 — download piped into a shell
05.13

2 outbound calls can wait forever

adequate

2 HTTP calls use a client with no timeout (Python `requests` without `timeout=`, or Go's default client). When a dependency slows down, each one holds a worker until the connection gives up, and enough of them take the service down with the dependency.

Evidence
pkg/fanal/analyzer/imgconf/apk/apk.go:111 — outbound call without a timeout
pkg/vex/sbomref.go:80 — outbound call without a timeout
05.26

2 locked dependencies have published vulnerabilities, 1 high or critical

adequate

2 of 470 locked dependencies match 3 published advisories in OSV, 1 of them rated high or critical. A lockfile says which version is installed, not whether the flawed code is reachable from this product, so each needs a look. Most are fixed by an upgrade, and the advisory names the version. This lockfile pins development tools alongside what ships and does not say which is which, so some of these may never reach a user.

Evidence
go.mod — github.com/docker/docker v28.5.2+incompatible: GO-2026-4887 (high)
go.mod — github.com/docker/distribution v2.8.3+incompatible: GHSA-685w-q87j-wqw3 (moderate)
05.9

1 vendored component with no licence

adequate

Third-party code is committed into this repository without any statement of the terms it arrived under. Unknown terms are harder to deal with than inconvenient ones: an awkward licence can be complied with, an absent one cannot. Each of these needs its origin established before the code changes hands.

Evidence
pkg/fanal/analyzer/language/dotnet/deps/deps.go — 1 tracked files, no licence file
05.60

Relicensed: MIT → AGPL-3.0 (2019-05-15) → Apache-2.0 (2020-03-13)

adequate

The root licence changed 2 time(s). Code taken under earlier terms stays under them; check which terms any fork or customer relied on.

Evidence
LICENSE — MIT from 2019-04-11
LICENSE — AGPL-3.0 from 2019-05-15
LICENSE — Apache-2.0 from 2020-03-13
05.65

7 advisories against this project in the last 24 months, 4 high or critical, 1 on CISA's known-exploited list

adequate

1 of them is on CISA's known-exploited list: check first whether the release you run has the fix. The newest was published on 2026-10-02. A project that publishes advisories is telling its users about its fixes, and the count and pace say how much security work it carries. Whether 3 of them are fixed in the code you ship could not be told from this history: its version is only known to be at least 0.76.0. Answer lives in: the release you run, set against each fixed version.

Evidence
2026-03-21: GO-2026-4919 (critical; on CISA's Known Exploited list): Trivy ecosystem supply chain was briefly compromised in github.com/aquasecurity/trivy
2026-10-02: CVE-2026-104994 (low): Trivy before 0.71.0 allows directory traversal in Terraform filesystem functions when they try to access pathnames above the scan root. The risk occurs when usi
2026-06-30: GHSA-8rc5-4fr6-64pw (moderate), fixed in 0.72.0: Trivy Plugin Manager has Path Traversal that Allows Arbitrary File Write
2026-06-15: GHSA-mcj4-mphf-j9ff (high), fixed in 0.71.1: Trivy has a path traversal via a crafted vulnerability database or other downloaded artifacts
2026-06-04: GHSA-q3fv-x8vg-qqm4 (high), fixed in 0.71.0: Trivy: Helm chart tar bomb causes OOM via unbounded io.ReadAll in parser

Observability & Operations

adequate
06.9

No error reporter is wired in

adequate

Nothing in the service initialises an error reporter (Sentry, Rollbar, Bugsnag, Honeybadger or an APM agent). An exception in production reaches a person only if someone is reading the logs, which usually means a customer reports it first.

Evidence
no error reporter initialised
06.14

Readiness and liveness probes are identical in 1 of 1 workloads

adequate

Both probes call the same endpoint. When a dependency slows down, the liveness probe fails with the readiness probe, so the platform restarts pods that only needed taking out of rotation, and a partial outage becomes a full one. Liveness should ask whether the process is alive; readiness whether it can serve.

Evidence
helm/trivy/templates/statefulset.yaml — same probe endpoint twice

Fit with the Acquirer

not assessable

Not rated: structurally not assessable from a repository.

Read more, or read your own

The full report on aquasecurity/trivy: every dimension, the questions for the room, and the audit log.

Survey a repository: free on public repositories. Private code is read on your own machine by a collector whose source you can read first.