{
  "name": "trivy-scan",
  "title": "Scan for vulnerabilities with Trivy",
  "category": "CI/CD",
  "tags": [
    "ci-cd",
    "trivy"
  ],
  "version": "1.0.3",
  "date": "2026-08-18",
  "notes": "Move trivy from 0.73.0 to 0.74.0. The image scans clean, so its exception record is deleted rather than rewritten: the go-git and oras-go advisories it was written for are gone, and so are the eight Go 1.26.6 stdlib ones that had landed on 0.73.0 since. Entrypoint, Cmd, User and WorkingDir are identical on both digests. This is a minor rather than a rebuild, so the CLI surface has not been re-run against a container.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/trivy-scan/1.0.3.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/trivy-scan/1.0.3/template.yaml",
  "entrypoint": "scan",
  "parameters": [
    {
      "name": "target",
      "title": "Target",
      "description": "An image reference or a filesystem path to scan.",
      "type": "string",
      "required": true,
      "example": "ghcr.io/org/app:1.2.3"
    },
    {
      "name": "exit-on-findings",
      "title": "Fail on findings",
      "description": "When \"true\", the step fails if any matching vulnerability is found; when \"false\", it always reports and succeeds.",
      "type": "string",
      "required": false,
      "default": "true",
      "enum": [
        "true",
        "false"
      ]
    },
    {
      "name": "severity",
      "title": "Severity",
      "description": "Comma-separated severities to report.",
      "type": "string",
      "required": false,
      "default": "CRITICAL,HIGH",
      "example": "CRITICAL,HIGH"
    }
  ],
  "images": [
    {
      "ref": "aquasec/trivy@sha256:790fd66d1697395d8693d1acaa1ea702406a20f109b6fc7bac8db623eca6c06c",
      "repository": "aquasec/trivy",
      "tag": "0.76.1",
      "digest": "sha256:790fd66d1697395d8693d1acaa1ea702406a20f109b6fc7bac8db623eca6c06c"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/trivy-scan/1.0.3/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/trivy-scan/1.0.3/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: trivy-scan\n  labels:\n    dagweave.io/catalog-item: trivy-scan\n  annotations:\n    # The catalog semver this manifest was authored at. The dagweave app records\n    # (catalog-item-id, semver) -\u003e content-hash -\u003e base-vN when it mints the tenant\n    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.\n    dagweave.io/catalog-version: \"1.0.3\"\n    dagweave.io/catalog-category: \"CI/CD\"\nspec:\n  entrypoint: scan\n  templates:\n    - name: scan\n      inputs:\n        parameters:\n          # What to scan: an image reference (e.g. alpine:3.21) or a filesystem path.\n          # If the target exists as a path in the container it is scanned as a\n          # filesystem, otherwise it is treated as an image reference.\n          - name: target\n          # Comma-separated severities to report.\n          - name: severity\n            default: \"CRITICAL,HIGH\"\n          # When \"true\", the step fails (exit 1) if any matching vulnerability is\n          # found; when \"false\", it always reports and succeeds.\n          - name: exit-on-findings\n            default: \"true\"\n      container:\n        # Pinned by digest per the catalog convention: an image rebuild can never\n        # silently change the behaviour of an already-released item version.\n        # aquasec/trivy:0.76.1\n        image: aquasec/trivy@sha256:790fd66d1697395d8693d1acaa1ea702406a20f109b6fc7bac8db623eca6c06c\n        command: [sh, -c]\n        # The target, severity and flag are passed as env vars (below), never\n        # interpolated from Argo into the shell, so values with quotes or shell\n        # metacharacters are safe. The scan mode (image vs fs) is inferred from whether\n        # the target resolves to a path in the container.\n        args:\n          - |\n            set -eu\n            EXIT_CODE=0\n            if [ \"$EXIT_ON_FINDINGS\" = \"true\" ]; then EXIT_CODE=1; fi\n            if [ -e \"$TARGET\" ]; then MODE=fs; else MODE=image; fi\n            trivy \"$MODE\" --severity \"$SEVERITY\" --exit-code \"$EXIT_CODE\" \"$TARGET\"\n        env:\n          - name: TARGET\n            value: \"{{inputs.parameters.target}}\"\n          - name: SEVERITY\n            value: \"{{inputs.parameters.severity}}\"\n          - name: EXIT_ON_FINDINGS\n            value: \"{{inputs.parameters.exit-on-findings}}\"\n",
  "templateSha256": "4c791b4cd136dfc7a7c34b1e83460f307a1b0a2191679734028e64a56bdb20be",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/trivy-scan",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
