aquasecurity/trivy
Tooling
This page lists the build, lint, release, and codegen tools the project relies on, and where their configuration lives.
Build
- Go toolchain. Pinned in
go.mod(go 1.25.8). The CI matrix (.github/workflows/test.yaml) installs the matching version withactions/setup-go. - Mage. Task runner used as the project's "make". Tasks defined in
magefiles/(magefile.go,helm.go,vex.go,terraformplan.go,spdx.go,config_schema.go,docs.go,fixture.go,schema.go). Common targets:mage build— build thetrivybinary.mage test:unit— run unit tests.mage test:integration— run integration tests.mage docs— regenerate the flag-table portion of the docs.mage helm— package the Helm chart.
goreleaser. Drives binary, archive, container image, and Homebrew tap publication. Config ingoreleaser.yml. Canary builds usegoreleaser-canary.yml. Releases are triggered by.github/workflows/release.yamland the reusable workflowreusable-release.yaml.
Lint
golangci-lint. Config in.golangci.yaml. Notable choices:errcheckwithcheck-type-assertions: trueandcheck-blank: true.depguardbansgolang.org/x/exp/slices,golang.org/x/exp/maps, andio/ioutil.duplthreshold 100,goconstmin-len 3 / min-occurrences 3.gocriticwith thediagnostictag enabled.
zizmor. GitHub Actions security linter. Config inzizmor.yml; runs as part of supply-chain hygiene.
Code generation
buf. Generates Twirp/protobuf stubs. Config inbuf.gen.yamlandbuf.yaml. The generated*.pb.goand*.twirp.gofiles are committed underrpc/.- Rego embedding. The IaC engine pulls Rego policies from the trivy-checks repository and embeds them via
pkg/iac/rego/embed.go.
Release
release-please. GeneratesCHANGELOG.mdand version bumps from Conventional Commit titles. Config inrelease-please-config.jsonand.release-please-manifest.json. Workflow:.github/workflows/release-please.yaml. The bot opens a release PR; merging it tags a release.release-pr-check. Validates the structure of release PRs. Workflow:.github/workflows/release-pr-check.yaml.- Backports.
.github/workflows/backport.yamlopens a backport PR when a merged PR is labeledbackport-to-*. - Container publication.
goreleaserpushes images to Docker Hub (aquasec/trivy), GHCR (ghcr.io/aquasecurity/trivy), and ECR Public (gallery.ecr.aws/aquasecurity/trivy). - Helm chart publication.
.github/workflows/publish-chart.yamlpackages and pushes the chart inhelm/trivy/to the Aqua Helm repo.
Docs
- MkDocs. Config in
mkdocs.yml. Source indocs/. Two workflows publish the site:.github/workflows/mkdocs-latest.yaml— on push tomain..github/workflows/mkdocs-dev.yaml— fordevpreviews.
test-docs.yamlvalidates docs build before merge.
Issue and PR automation
.github/workflows/auto-close-issue.yaml— closes the linked issue when a PR is merged..github/workflows/auto-ready-for-review.yaml— flips draft PRs to ready when checks pass..github/workflows/auto-update-labels.yaml— applies labels based on title/body..github/workflows/semantic-pr.yaml— enforces Conventional Commit titles..github/workflows/stale-issues.yaml— closes inactive issues..github/workflows/triage.yaml— runs triage automation..github/workflows/auto-close-issue.yaml— closes auto-handled issues on merge.
Schema and SBOM helpers
- VEX schema.
magefiles/vex.goandpkg/vex/keep the VEX schemas in sync with upstream specs (CSAF, OpenVEX). - CycloneDX/SPDX.
magefiles/spdx.goregenerates SPDX license lists. - Terraform plan schema.
magefiles/terraformplan.gokeeps the JSON schema synced with Terraform's CLI output. - Config schema.
magefiles/config_schema.goregeneratespkg/misconf/config_schema.go.
VEX policies for Trivy itself
The .vex/ directory contains VEX statements about vulnerabilities reported against Trivy itself (e.g., false positives in indirect dependencies). This is a small but useful example of dogfooding the VEX subsystem.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.