Repository security advisory lifecycle
A repository advisory moves triage → draft → published. At triage or draft it can instead become closed.
private report ──► triage ──accept──► draft ──publish──► published
│ │
└──────close───────┴──► closed| State | How it gets there | Visibility |
|---|---|---|
triage |
A private vulnerability report (POST /repos/{owner}/{repo}/security-advisories/reports) |
Private: maintainers, reporter, advisory collaborators |
draft |
A maintainer accepts a triage report ("Accept and open as draft"), or creates an advisory directly (POST /repos/{owner}/{repo}/security-advisories) |
Private |
published |
A maintainer publishes a draft | Public, and reviewed for the GitHub Advisory Database |
closed |
A maintainer closes a triage report or draft that is not a vulnerability or will not be pursued | Private; closed_at is set, published_at stays null |
withdrawn |
Set by GitHub, not by the maintainer | Read-only; withdrawn_at is set |
Reading the state
set -o pipefail
repo='OWNER/REPO'
ghsa='GHSA-xxxx-xxxx-xxxx'
base="repos/$repo/security-advisories/$ghsa"
headers=(-H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2022-11-28')
gh api "$base" "${headers[@]}" --jq '{state, created_at, published_at, closed_at, withdrawn_at}'
# Pending private reports. The list filter accepts triage, draft, published, closed (not withdrawn).
gh api "repos/$repo/security-advisories?state=triage&per_page=100" "${headers[@]}" --paginate \
--jq '.[] | {ghsa_id, summary, created_at}'Changing the state
PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} accepts only state values draft, closed, and published. triage and withdrawn cannot be set. It requires a repository admin, security manager, or advisory collaborator, with a repo or repository_advisories:write token.
# triage -> draft (accept the report). Only when the user asks to accept it.
gh api --method PATCH "$base" "${headers[@]}" -f state=draft
# triage or draft -> closed. Only when the user asks to close; comment why first.
gh api --method PATCH "$base" "${headers[@]}" -f state=closed- A
closedadvisory can be reopened withstate=draft(verified on an advisory created as a draft; reopening a closed triage report was not tested). - Setting
triageorwithdrawnreturns422. - Starting a temporary private fork does not move an advisory out of
triage(private fork workflow). - Before closing a report, add a comment explaining the decision (comments workflow).
- Read the advisory back after each change and report the new
state.
Publishing is public and one-way
Never publish unless the user explicitly asks to publish that advisory. Publishing:
- Discloses the advisory to everyone and submits it for the GitHub Advisory Database, which can trigger Dependabot alerts. Add the patched versions first.
- Deletes the advisory's temporary private fork. Merge fix PRs upstream from the advisory page before publishing.
- Is not reversible by the maintainer. There is no unpublish: an advisory published in error can only be deleted by GitHub Support.
Check the user's intent and the advisory's vulnerabilities[].patched_versions before running gh api --method PATCH "$base" "${headers[@]}" -f state=published.
Verification boundary
Verified on October 17, 2026 against the REST reference, the public OpenAPI description, and the GitHub Docs pages on managing private reports and publishing:
- The advisory schema's
stateenum ispublished,closed,withdrawn,draft,triage. The update schema's ispublished,closed,draft. The list filter's istriage,draft,published,closed. - Private reports start in
triage. Starting a private fork leaves them intriage. Accepting makes them adraft, and they can be closed fromtriage. - Publishing deletes the temporary private fork. A published advisory can be deleted only through Support.
Live runs on mcollina/skills (October 2 and 17, 2026) with gh and an OAuth token carrying repo, on synthetic advisories:
- Created advisories start in
draft; PATCHstate=closedsetclosed_atand leftpublished_at: null. - PATCH
state=drafton aclosedadvisory reopened it todraftand clearedclosed_at. - PATCH
state=triageandstate=withdrawnreturned422withInvalid property /state: `triage` is not a possible value. Must be one of the following: published, closed, draft. - A repository admin cannot submit a private report to their own repository:
POST .../security-advisories/reportsreturned403 You are not authorized to report advisories in this repository via private vulnerability reporting. Testingtriageneeds a report from a different account.
The triage → draft and triage → closed PATCHes and publishing were not live-tested. Never publish a test advisory.