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
https://docs.github.com/en/rest/git/refs GET /repos/{owner}/{repo}/git/ref/tags/{tag}: 200, or 404 when absent