Documentation
¶
Overview ¶
Command ghadvisory creates, lists and publishes a repository's GitHub security advisories (GHSA).
It exists because the fleet rule is that every GitHub write goes through a fleet program and none did this one: `gh api repos/O/R/security-advisories` was the spelling left, and the body of an advisory is PROSE, which does not belong on a command line (see ghissue). Same transport as ghissue: the token comes from a 0600 file and travels only in the Authorization header, over https, redirects refused.
References (read 2026-11-19):
https://docs.github.com/en/rest/security-advisories/repository-advisories
POST /repos/{owner}/{repo}/security-advisories summary, description,
vulnerabilities[] {package{ecosystem,name}, vulnerable_version_range,
patched_versions, vulnerable_functions} are required; cve_id, cwe_ids,
credits[] {login,type}, severity (critical|high|medium|low) or
cvss_vector_string (not both) are optional; 201 with ghsa_id, html_url, state
PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} "state" is
published|closed|draft; 200
GET /repos/{owner}/{repo}/security-advisories 200, an array
POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks temporary
private fork; 202 (async, up to 5 minutes), a repository object with
full_name and clone_url; 400, 403, 404, 422 (read 2026-12-03)
PATCH vulnerabilities[] {package, vulnerable_version_range, patched_versions,
vulnerable_functions}: the docs say nothing on array replacement, only
"send the whole array" for credits, so the whole array is sent back
https://docs.github.com/en/code-security/security-advisories/working-with-repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability
https://docs.github.com/en/rest/git/refs GET /repos/{owner}/{repo}/git/ref/tags/{tag}: 200, or 404 when absent