Configure Trivy as the default vulnerability scanner in Harbor and trigger an image scan via the Harbor API, then retrieve the vulnerability report

domain: goharbor.io · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Confirm that the Trivy scanner adapter is registered; in Harbor 2.2 and later Trivy is the built-in default and its adapter is automatically available at the registration endpoint GET /api/v2.0/scanners
  2. If running a custom external Trivy adapter, register it via POST /api/v2.0/scanners with the adapter URL, name, and auth configuration, then set it as default with PATCH /api/v2.0/scanners/<id> setting is_default: true
  3. Trigger a scan of a specific artifact by POSTing to /api/v2.0/projects/<projectName>/repositories/<repoName>/artifacts/<reference>/scan (no body required)
  4. Poll GET /api/v2.0/projects/<projectName>/repositories/<repoName>/artifacts/<reference> and check the scan_overview field until the status transitions from Running to Success
  5. Retrieve the full vulnerability report by sending GET /api/v2.0/projects/<projectName>/repositories/<repoName>/artifacts/<reference>/additions/vulnerabilities and parse the report object keyed by scanner MIME type

Known gotchas

Related routes

Use Trivy to generate an SBOM and then apply a VEX file to filter vulnerability scan results
security/compliance · 5 steps · unrated
Scan a container image for vulnerabilities and gate CI on severity thresholds using Trivy
aquasecurity.github.io/trivy · 5 steps · unrated
Scan a container image for vulnerabilities and generate an SBOM simultaneously using Trivy, outputting results in CycloneDX format
aquasecurity.github.io/trivy · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans