Trivy · Schema

Trivy Vulnerability Report

Schema for a Trivy vulnerability scan report containing detected CVEs and package vulnerabilities

ContainersKubernetesSBOMSecurityVulnerability ScanningOpen-SourceDevSecOpsCloud Security

Properties

Name Type Description
SchemaVersion integer Schema version of the report
ArtifactName string Name of the scanned artifact (container image, file path, repo URL)
ArtifactType string Type of artifact scanned
Metadata object Metadata about the scan target
Results array Scan results per target layer or component
View JSON Schema on GitHub

JSON Schema

trivy-vulnerability-report-schema.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://api-evangelist.github.io/trivy/json-schema/trivy-vulnerability-report-schema.json",
  "title": "Trivy Vulnerability Report",
  "description": "Schema for a Trivy vulnerability scan report containing detected CVEs and package vulnerabilities",
  "type": "object",
  "properties": {
    "SchemaVersion": {
      "type": "integer",
      "description": "Schema version of the report",
      "example": 2
    },
    "ArtifactName": {
      "type": "string",
      "description": "Name of the scanned artifact (container image, file path, repo URL)"
    },
    "ArtifactType": {
      "type": "string",
      "description": "Type of artifact scanned",
      "enum": ["container_image", "filesystem", "repository", "virtual-machine", "sbom"]
    },
    "Metadata": {
      "type": "object",
      "description": "Metadata about the scan target",
      "properties": {
        "OS": {
          "type": "object",
          "properties": {
            "Family": { "type": "string", "description": "OS family (alpine, debian, ubuntu, etc.)" },
            "Name": { "type": "string", "description": "OS name and version" }
          }
        },
        "ImageID": { "type": "string", "description": "Container image ID" },
        "DiffIDs": {
          "type": "array",
          "items": { "type": "string" }
        },
        "RepoTags": {
          "type": "array",
          "items": { "type": "string" }
        },
        "RepoDigests": {
          "type": "array",
          "items": { "type": "string" }
        }
      }
    },
    "Results": {
      "type": "array",
      "description": "Scan results per target layer or component",
      "items": {
        "$ref": "#/definitions/Result"
      }
    }
  },
  "definitions": {
    "Result": {
      "type": "object",
      "properties": {
        "Target": {
          "type": "string",
          "description": "Name of the scanned target (layer, file, or package)"
        },
        "Class": {
          "type": "string",
          "description": "Result class",
          "enum": ["os-pkgs", "lang-pkgs", "config", "secret", "license"]
        },
        "Type": {
          "type": "string",
          "description": "Package manager or format type"
        },
        "Vulnerabilities": {
          "type": "array",
          "description": "List of detected vulnerabilities",
          "items": {
            "$ref": "#/definitions/Vulnerability"
          }
        },
        "Misconfigurations": {
          "type": "array",
          "description": "Detected misconfigurations",
          "items": {
            "$ref": "#/definitions/Misconfiguration"
          }
        },
        "Secrets": {
          "type": "array",
          "description": "Detected secrets",
          "items": {
            "$ref": "#/definitions/Secret"
          }
        }
      }
    },
    "Vulnerability": {
      "type": "object",
      "required": ["VulnerabilityID", "Severity"],
      "properties": {
        "VulnerabilityID": {
          "type": "string",
          "description": "CVE or vulnerability identifier",
          "example": "CVE-2021-44228"
        },
        "PkgName": {
          "type": "string",
          "description": "Affected package name"
        },
        "PkgVersion": {
          "type": "string",
          "description": "Current package version"
        },
        "FixedVersion": {
          "type": "string",
          "description": "Version that fixes the vulnerability"
        },
        "Severity": {
          "type": "string",
          "description": "Vulnerability severity",
          "enum": ["CRITICAL", "HIGH", "MEDIUM", "LOW", "UNKNOWN"]
        },
        "Title": {
          "type": "string",
          "description": "Short title of the vulnerability"
        },
        "Description": {
          "type": "string",
          "description": "Detailed vulnerability description"
        },
        "CVSS": {
          "type": "object",
          "description": "CVSS scores from various sources"
        },
        "References": {
          "type": "array",
          "description": "Reference URLs for the vulnerability",
          "items": { "type": "string", "format": "uri" }
        },
        "PublishedDate": {
          "type": "string",
          "format": "date-time"
        },
        "LastModifiedDate": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "Misconfiguration": {
      "type": "object",
      "properties": {
        "Type": { "type": "string", "description": "Misconfiguration type (e.g., Kubernetes, Dockerfile)" },
        "ID": { "type": "string", "description": "Rule identifier" },
        "Title": { "type": "string" },
        "Description": { "type": "string" },
        "Message": { "type": "string" },
        "Severity": {
          "type": "string",
          "enum": ["CRITICAL", "HIGH", "MEDIUM", "LOW", "UNKNOWN"]
        },
        "Status": {
          "type": "string",
          "enum": ["FAIL", "PASS", "WARN", "EXCEPTION"]
        }
      }
    },
    "Secret": {
      "type": "object",
      "properties": {
        "RuleID": { "type": "string", "description": "Secret detection rule ID" },
        "Category": { "type": "string", "description": "Secret category (e.g., aws-access-key)" },
        "Title": { "type": "string" },
        "Severity": {
          "type": "string",
          "enum": ["CRITICAL", "HIGH", "MEDIUM", "LOW", "UNKNOWN"]
        },
        "StartLine": { "type": "integer" },
        "EndLine": { "type": "integer" },
        "Code": {
          "type": "object",
          "description": "Code snippet context"
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/trivy-vulnerability-report"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.