{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/github/json-schema/github-repository-advisory-schema.json",
  "title": "repository-advisory",
  "description": "A repository security advisory.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/github-security-advisories-api-openapi.yml#/components/schemas/repository-advisory",
  "type": "object",
  "properties": {
    "ghsa_id": {
      "type": "string",
      "description": "The GitHub Security Advisory ID.",
      "readOnly": true
    },
    "cve_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The Common Vulnerabilities and Exposures (CVE) ID."
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "The API URL for the advisory.",
      "readOnly": true
    },
    "html_url": {
      "type": "string",
      "format": "uri",
      "description": "The URL for the advisory.",
      "readOnly": true
    },
    "summary": {
      "type": "string",
      "description": "A short summary of the advisory.",
      "maxLength": 1024
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "A detailed description of what the advisory entails.",
      "maxLength": 65535
    },
    "severity": {
      "type": [
        "string",
        "null"
      ],
      "description": "The severity of the advisory.",
      "enum": [
        "critical",
        "high",
        "medium",
        "low",
        null
      ]
    },
    "author": {
      "readOnly": true,
      "description": "The author of the advisory.",
      "allOf": [
        {
          "$ref": "#/$defs/simple-user"
        }
      ]
    },
    "publisher": {
      "readOnly": true,
      "description": "The publisher of the advisory.",
      "allOf": [
        {
          "$ref": "#/$defs/simple-user"
        }
      ]
    },
    "identifiers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of identifier.",
            "enum": [
              "CVE",
              "GHSA"
            ]
          },
          "value": {
            "type": "string",
            "description": "The identifier value."
          }
        },
        "required": [
          "type",
          "value"
        ]
      },
      "readOnly": true
    },
    "state": {
      "type": "string",
      "description": "The state of the advisory.",
      "enum": [
        "published",
        "closed",
        "withdrawn",
        "draft",
        "triage"
      ]
    },
    "created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The date and time of when the advisory was created, in ISO 8601 format.",
      "readOnly": true
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The date and time of when the advisory was last updated, in ISO 8601 format.",
      "readOnly": true
    },
    "published_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The date and time of when the advisory was published, in ISO 8601 format.",
      "readOnly": true
    },
    "closed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The date and time of when the advisory was closed, in ISO 8601 format.",
      "readOnly": true
    },
    "withdrawn_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The date and time of when the advisory was withdrawn, in ISO 8601 format.",
      "readOnly": true
    },
    "submission": {
      "type": [
        "object",
        "null"
      ],
      "readOnly": true,
      "properties": {
        "accepted": {
          "type": "boolean",
          "description": "Whether a private vulnerability report was accepted by the repository's administrators.",
          "readOnly": true
        }
      },
      "required": [
        "accepted"
      ]
    },
    "vulnerabilities": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/repository-advisory-vulnerability"
      }
    },
    "cvss": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "vector_string": {
          "type": [
            "string",
            "null"
          ],
          "description": "The CVSS vector."
        },
        "score": {
          "type": [
            "number",
            "null"
          ],
          "description": "The CVSS score.",
          "minimum": 0,
          "maximum": 10,
          "readOnly": true
        }
      },
      "required": [
        "vector_string",
        "score"
      ]
    },
    "cvss_severities": {
      "$ref": "#/$defs/cvss-severities"
    },
    "cwes": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "cwe_id": {
            "type": "string",
            "description": "The Common Weakness Enumeration (CWE) identifier."
          },
          "name": {
            "type": "string",
            "description": "The name of the CWE.",
            "readOnly": true
          }
        },
        "required": [
          "cwe_id",
          "name"
        ]
      },
      "readOnly": true
    },
    "cwe_ids": {
      "type": [
        "array",
        "null"
      ],
      "description": "A list of only the CWE IDs.",
      "items": {
        "type": "string"
      }
    },
    "credits": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "login": {
            "type": "string",
            "description": "The username of the user credited."
          },
          "type": {
            "$ref": "#/$defs/security-advisory-credit-types"
          }
        }
      }
    },
    "credits_detailed": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/repository-advisory-credit"
      },
      "readOnly": true
    },
    "collaborating_users": {
      "type": [
        "array",
        "null"
      ],
      "description": "A list of users that collaborate on the advisory.",
      "items": {
        "$ref": "#/$defs/simple-user"
      }
    },
    "collaborating_teams": {
      "type": [
        "array",
        "null"
      ],
      "description": "A list of teams that collaborate on the advisory.",
      "items": {
        "$ref": "#/$defs/team"
      }
    },
    "private_fork": {
      "readOnly": true,
      "description": "A temporary private fork of the advisory's repository for collaborating on a fix.",
      "allOf": [
        {
          "$ref": "#/$defs/simple-repository"
        }
      ]
    }
  },
  "required": [
    "ghsa_id",
    "cve_id",
    "url",
    "html_url",
    "summary",
    "description",
    "severity",
    "author",
    "publisher",
    "identifiers",
    "state",
    "created_at",
    "updated_at",
    "published_at",
    "closed_at",
    "withdrawn_at",
    "submission",
    "vulnerabilities",
    "cvss",
    "cwes",
    "cwe_ids",
    "credits",
    "credits_detailed",
    "collaborating_users",
    "collaborating_teams",
    "private_fork"
  ],
  "additionalProperties": false,
  "x-github-breaking-changes": [
    {
      "changeset": "deprecate_cvss",
      "patch": {
        "properties": {
          "cvss": null
        },
        "required": [
          "ghsa_id",
          "cve_id",
          "url",
          "html_url",
          "summary",
          "description",
          "severity",
          "author",
          "publisher",
          "identifiers",
          "state",
          "created_at",
          "updated_at",
          "published_at",
          "closed_at",
          "withdrawn_at",
          "submission",
          "vulnerabilities",
          "cwes",
          "cwe_ids",
          "credits",
          "credits_detailed",
          "collaborating_users",
          "collaborating_teams",
          "private_fork"
        ]
      },
      "version": "2026-03-10"
    }
  ],
  "$defs": {
    "cvss-severities": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "cvss_v3": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "vector_string": {
              "type": [
                "string",
                "null"
              ],
              "description": "The CVSS 3 vector string."
            },
            "score": {
              "type": [
                "number",
                "null"
              ],
              "description": "The CVSS 3 score.",
              "minimum": 0,
              "maximum": 10,
              "readOnly": true
            }
          },
          "required": [
            "vector_string",
            "score"
          ]
        },
        "cvss_v4": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "vector_string": {
              "type": [
                "string",
                "null"
              ],
              "description": "The CVSS 4 vector string."
            },
            "score": {
              "type": [
                "number",
                "null"
              ],
              "description": "The CVSS 4 score.",
              "minimum": 0,
              "maximum": 10,
              "readOnly": true
            }
          },
          "required": [
            "vector_string",
            "score"
          ]
        }
      }
    },
    "nullable-team-simple": {
      "title": "Team Simple",
      "description": "Groups of organization members that gives permissions on specified repositories.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "description": "Unique identifier of the team",
          "type": "integer"
        },
        "node_id": {
          "type": "string"
        },
        "url": {
          "description": "URL for the team",
          "type": "string",
          "format": "uri"
        },
        "members_url": {
          "type": "string"
        },
        "name": {
          "description": "Name of the team",
          "type": "string"
        },
        "description": {
          "description": "Description of the team",
          "type": [
            "string",
            "null"
          ]
        },
        "permission": {
          "description": "Permission that the team will have for its repositories",
          "type": "string"
        },
        "privacy": {
          "description": "The level of privacy this team should have",
          "type": "string"
        },
        "notification_setting": {
          "description": "The notification setting the team has set",
          "type": "string"
        },
        "html_url": {
          "type": "string",
          "format": "uri"
        },
        "repositories_url": {
          "type": "string",
          "format": "uri"
        },
        "slug": {
          "type": "string"
        },
        "ldap_dn": {
          "description": "Distinguished Name (DN) that team maps to within LDAP environment",
          "type": "string"
        },
        "type": {
          "description": "The ownership type of the team",
          "type": "string",
          "enum": [
            "enterprise",
            "organization"
          ]
        },
        "organization_id": {
          "type": "integer",
          "description": "Unique identifier of the organization to which this team belongs"
        },
        "enterprise_id": {
          "type": "integer",
          "description": "Unique identifier of the enterprise to which this team belongs"
        }
      },
      "required": [
        "id",
        "node_id",
        "url",
        "members_url",
        "name",
        "description",
        "permission",
        "html_url",
        "repositories_url",
        "slug",
        "type"
      ]
    },
    "repository-advisory-credit": {
      "description": "A credit given to a user for a repository security advisory.",
      "type": "object",
      "properties": {
        "user": {
          "$ref": "#/$defs/simple-user"
        },
        "type": {
          "$ref": "#/$defs/security-advisory-credit-types"
        },
        "state": {
          "type": "string",
          "description": "The state of the user's acceptance of the credit.",
          "enum": [
            "accepted",
            "declined",
            "pending"
          ]
        }
      },
      "required": [
        "user",
        "type",
        "state"
      ],
      "additionalProperties": false
    },
    "repository-advisory-vulnerability": {
      "description": "A product affected by the vulnerability detailed in a repository security advisory.",
      "type": "object",
      "properties": {
        "package": {
          "description": "The name of the package affected by the vulnerability.",
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "ecosystem": {
              "$ref": "#/$defs/security-advisory-ecosystems"
            },
            "name": {
              "type": [
                "string",
                "null"
              ],
              "description": "The unique package name within its ecosystem."
            }
          },
          "required": [
            "ecosystem",
            "name"
          ]
        },
        "vulnerable_version_range": {
          "type": [
            "string",
            "null"
          ],
          "description": "The range of the package versions affected by the vulnerability."
        },
        "patched_versions": {
          "type": [
            "string",
            "null"
          ],
          "description": "The package version(s) that resolve the vulnerability."
        },
        "vulnerable_functions": {
          "type": [
            "array",
            "null"
          ],
          "description": "The functions in the package that are affected.",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "package",
        "vulnerable_version_range",
        "patched_versions",
        "vulnerable_functions"
      ],
      "additionalProperties": false
    },
    "security-advisory-credit-types": {
      "type": "string",
      "description": "The type of credit the user is receiving.",
      "enum": [
        "analyst",
        "finder",
        "reporter",
        "coordinator",
        "remediation_developer",
        "remediation_reviewer",
        "remediation_verifier",
        "tool",
        "sponsor",
        "other"
      ]
    },
    "security-advisory-ecosystems": {
      "type": "string",
      "description": "The package's language or package management ecosystem.",
      "enum": [
        "rubygems",
        "npm",
        "pip",
        "maven",
        "nuget",
        "composer",
        "go",
        "rust",
        "erlang",
        "actions",
        "pub",
        "other",
        "swift"
      ]
    },
    "simple-repository": {
      "title": "Simple Repository",
      "description": "A GitHub repository.",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64",
          "description": "A unique identifier of the repository."
        },
        "node_id": {
          "type": "string",
          "description": "The GraphQL identifier of the repository."
        },
        "name": {
          "type": "string",
          "description": "The name of the repository."
        },
        "full_name": {
          "type": "string",
          "description": "The full, globally unique, name of the repository."
        },
        "owner": {
          "$ref": "#/$defs/simple-user"
        },
        "private": {
          "type": "boolean",
          "description": "Whether the repository is private."
        },
        "html_url": {
          "type": "string",
          "format": "uri",
          "description": "The URL to view the repository on GitHub.com."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The repository description."
        },
        "fork": {
          "type": "boolean",
          "description": "Whether the repository is a fork."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The URL to get more information about the repository from the GitHub API."
        },
        "archive_url": {
          "type": "string",
          "description": "A template for the API URL to download the repository as an archive."
        },
        "assignees_url": {
          "type": "string",
          "description": "A template for the API URL to list the available assignees for issues in the repository."
        },
        "blobs_url": {
          "type": "string",
          "description": "A template for the API URL to create or retrieve a raw Git blob in the repository."
        },
        "branches_url": {
          "type": "string",
          "description": "A template for the API URL to get information about branches in the repository."
        },
        "collaborators_url": {
          "type": "string",
          "description": "A template for the API URL to get information about collaborators of the repository."
        },
        "comments_url": {
          "type": "string",
          "description": "A template for the API URL to get information about comments on the repository."
        },
        "commits_url": {
          "type": "string",
          "description": "A template for the API URL to get information about commits on the repository."
        },
        "compare_url": {
          "type": "string",
          "description": "A template for the API URL to compare two commits or refs."
        },
        "contents_url": {
          "type": "string",
          "description": "A template for the API URL to get the contents of the repository."
        },
        "contributors_url": {
          "type": "string",
          "format": "uri",
          "description": "A template for the API URL to list the contributors to the repository."
        },
        "deployments_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to list the deployments of the repository."
        },
        "downloads_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to list the downloads on the repository."
        },
        "events_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to list the events of the repository."
        },
        "forks_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to list the forks of the repository."
        },
        "git_commits_url": {
          "type": "string",
          "description": "A template for the API URL to get information about Git commits of the repository."
        },
        "git_refs_url": {
          "type": "string",
          "description": "A template for the API URL to get information about Git refs of the repository."
        },
        "git_tags_url": {
          "type": "string",
          "description": "A template for the API URL to get information about Git tags of the repository."
        },
        "issue_comment_url": {
          "type": "string",
          "description": "A template for the API URL to get information about issue comments on the repository."
        },
        "issue_events_url": {
          "type": "string",
          "description": "A template for the API URL to get information about issue events on the repository."
        },
        "issues_url": {
          "type": "string",
          "description": "A template for the API URL to get information about issues on the repository."
        },
        "keys_url": {
          "type": "string",
          "description": "A template for the API URL to get information about deploy keys on the repository."
        },
        "labels_url": {
          "type": "string",
          "description": "A template for the API URL to get information about labels of the repository."
        },
        "languages_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to get information about the languages of the repository."
        },
        "merges_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to merge branches in the repository."
        },
        "milestones_url": {
          "type": "string",
          "description": "A template for the API URL to get information about milestones of the repository."
        },
        "notifications_url": {
          "type": "string",
          "description": "A template for the API URL to get information about notifications on the repository."
        },
        "pulls_url": {
          "type": "string",
          "description": "A template for the API URL to get information about pull requests on the repository."
        },
        "releases_url": {
          "type": "string",
          "description": "A template for the API URL to get information about releases on the repository."
        },
        "stargazers_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to list the stargazers on the repository."
        },
        "statuses_url": {
          "type": "string",
          "description": "A template for the API URL to get information about statuses of a commit."
        },
        "subscribers_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to list the subscribers on the repository."
        },
        "subscription_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to subscribe to notifications for this repository."
        },
        "tags_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to get information about tags on the repository."
        },
        "teams_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to list the teams on the repository."
        },
        "trees_url": {
          "type": "string",
          "description": "A template for the API URL to create or retrieve a raw Git tree of the repository."
        },
        "hooks_url": {
          "type": "string",
          "format": "uri",
          "description": "The API URL to list the hooks on the repository."
        }
      },
      "required": [
        "archive_url",
        "assignees_url",
        "blobs_url",
        "branches_url",
        "collaborators_url",
        "comments_url",
        "commits_url",
        "compare_url",
        "contents_url",
        "contributors_url",
        "deployments_url",
        "description",
        "downloads_url",
        "events_url",
        "fork",
        "forks_url",
        "full_name",
        "git_commits_url",
        "git_refs_url",
        "git_tags_url",
        "hooks_url",
        "html_url",
        "id",
        "node_id",
        "issue_comment_url",
        "issue_events_url",
        "issues_url",
        "keys_url",
        "labels_url",
        "languages_url",
        "merges_url",
        "milestones_url",
        "name",
        "notifications_url",
        "owner",
        "private",
        "pulls_url",
        "releases_url",
        "stargazers_url",
        "statuses_url",
        "subscribers_url",
        "subscription_url",
        "tags_url",
        "teams_url",
        "trees_url",
        "url"
      ]
    },
    "simple-user": {
      "title": "Simple User",
      "description": "A GitHub user.",
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "login": {
          "type": "string"
        },
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "node_id": {
          "type": "string"
        },
        "avatar_url": {
          "type": "string",
          "format": "uri"
        },
        "gravatar_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "html_url": {
          "type": "string",
          "format": "uri"
        },
        "followers_url": {
          "type": "string",
          "format": "uri"
        },
        "following_url": {
          "type": "string"
        },
        "gists_url": {
          "type": "string"
        },
        "starred_url": {
          "type": "string"
        },
        "subscriptions_url": {
          "type": "string",
          "format": "uri"
        },
        "organizations_url": {
          "type": "string",
          "format": "uri"
        },
        "repos_url": {
          "type": "string",
          "format": "uri"
        },
        "events_url": {
          "type": "string"
        },
        "received_events_url": {
          "type": "string",
          "format": "uri"
        },
        "type": {
          "type": "string"
        },
        "site_admin": {
          "type": "boolean"
        },
        "starred_at": {
          "type": "string"
        },
        "user_view_type": {
          "type": "string"
        }
      },
      "required": [
        "avatar_url",
        "events_url",
        "followers_url",
        "following_url",
        "gists_url",
        "gravatar_id",
        "html_url",
        "id",
        "node_id",
        "login",
        "organizations_url",
        "received_events_url",
        "repos_url",
        "site_admin",
        "starred_url",
        "subscriptions_url",
        "type",
        "url"
      ]
    },
    "team": {
      "title": "Team",
      "description": "Groups of organization members that gives permissions on specified repositories.",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "node_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "privacy": {
          "type": "string"
        },
        "notification_setting": {
          "type": "string"
        },
        "permission": {
          "type": "string"
        },
        "permissions": {
          "type": "object",
          "properties": {
            "pull": {
              "type": "boolean"
            },
            "triage": {
              "type": "boolean"
            },
            "push": {
              "type": "boolean"
            },
            "maintain": {
              "type": "boolean"
            },
            "admin": {
              "type": "boolean"
            }
          },
          "required": [
            "pull",
            "triage",
            "push",
            "maintain",
            "admin"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "html_url": {
          "type": "string",
          "format": "uri"
        },
        "members_url": {
          "type": "string"
        },
        "repositories_url": {
          "type": "string",
          "format": "uri"
        },
        "type": {
          "description": "The ownership type of the team",
          "type": "string",
          "enum": [
            "enterprise",
            "organization"
          ]
        },
        "access_source": {
          "description": "How the team's access to the repository was granted. This property is only\npresent when the team is returned in a repository context, such as\n`GET /repos/{owner}/{repo}/teams`.",
          "type": "string",
          "enum": [
            "direct",
            "organization",
            "enterprise"
          ]
        },
        "organization_id": {
          "type": "integer",
          "description": "Unique identifier of the organization to which this team belongs"
        },
        "enterprise_id": {
          "type": "integer",
          "description": "Unique identifier of the enterprise to which this team belongs"
        },
        "parent": {
          "$ref": "#/$defs/nullable-team-simple"
        }
      },
      "required": [
        "id",
        "node_id",
        "url",
        "members_url",
        "name",
        "description",
        "permission",
        "html_url",
        "repositories_url",
        "slug",
        "parent",
        "type"
      ]
    }
  }
}