{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Creates a new repository security advisory.\n\nIn order to create a draft repository security advisory, the authenticated user must be a security manager or administrator of that repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint.","properties":{"path":{"type":"object","properties":{"owner":{"type":"string","description":"The account owner of the repository. The name is not case sensitive."},"repo":{"type":"string","description":"The name of the repository without the `.git` extension. The name is not case sensitive."}},"required":["owner","repo"],"additionalProperties":false},"body":{"$ref":"#/definitions/repository-advisory-create","examples":[{"summary":"A new important advisory","description":"A more in-depth description of what the problem is.","severity":"high","vulnerabilities":[{"package":{"name":"a-package","ecosystem":"npm"},"vulnerable_version_range":"< 1.0.0","patched_versions":"1.0.0","vulnerable_functions":["important_function"]}],"cwe_ids":["CWE-1101","CWE-20"],"credits":[{"login":"monalisa","type":"reporter"},{"login":"octocat","type":"analyst"}]}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"repository-advisory-create":{"type":"object","properties":{"summary":{"type":"string","description":"A short summary of the advisory.","maxLength":1024},"description":{"type":"string","description":"A detailed description of what the advisory impacts.","maxLength":65535},"cve_id":{"type":["string","null"],"description":"The Common Vulnerabilities and Exposures (CVE) ID."},"vulnerabilities":{"type":"array","description":"A product affected by the vulnerability detailed in a repository security advisory.","items":{"type":"object","properties":{"package":{"description":"The name of the package affected by the vulnerability.","type":"object","properties":{"ecosystem":{"$ref":"#/definitions/security-advisory-ecosystems"},"name":{"type":["string","null"],"description":"The unique package name within its ecosystem."}},"required":["ecosystem"]},"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"],"additionalProperties":false}},"cwe_ids":{"type":["array","null"],"description":"A list of Common Weakness Enumeration (CWE) IDs.","items":{"type":"string"}},"credits":{"type":["array","null"],"description":"A list of users receiving credit for their participation in the security advisory.","items":{"type":"object","properties":{"login":{"type":"string","description":"The username of the user credited."},"type":{"$ref":"#/definitions/security-advisory-credit-types"}},"required":["login","type"],"additionalProperties":false}},"severity":{"type":["string","null"],"description":"The severity of the advisory. You must choose between setting this field or `cvss_vector_string`.","enum":["critical","high","medium","low"]},"cvss_vector_string":{"type":["string","null"],"description":"The CVSS vector that calculates the severity of the advisory. You must choose between setting this field or `severity`."},"start_private_fork":{"type":"boolean","description":"Whether to create a temporary private fork of the repository to collaborate on a fix.","default":false}},"required":["summary","description","vulnerabilities"],"additionalProperties":false},"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"]},"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"]}}},"name":"Create a repository security advisory","id":"github.security-advisories.create-repository-advisory","example":{"path":{"owner":"octocat","repo":"hello-world"},"body":{"summary":"example","description":"example","vulnerabilities":[]}},"maxRequests":1,"summary":false}}