Repository navigation
feat(scripts): release:notes --advisory lists GHSA fixes and credits their reporters - #2788
Conversation
…their reporters (#2766) A GHSA fix lands as a merge from the advisory's private fork, so generate-notes never lists it, and its reporter filed no issue, so the Thanks section never credited them. Each --advisory "<GHSA-id>: <markdown>" adds a bullet under ### Security fixes (PRs move under ### Other changes) and merges the advisory's reporter/finder credits, in every credit state, into the Thanks list. An advisory whose patched versions do not name the release, or whose lookup fails, aborts the run; a draft only warns. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
CRLF note bodies produce duplicate What's Changed headings and omit the required Other changes section.
1 open issue
What changed in this PR
Adds advisory support to the release-notes helper so security fixes and their reporters appear alongside generated PR changes, addressing #2766.
Changes:
- Adds repeatable
--advisoryarguments, security-fix bullets, and merged reporter credits. - Validates patched versions, aborts failed lookups, and warns about draft advisories.
- Documents the option and adds focused regression coverage.
| File | Description |
|---|---|
scripts/release-notes.test.mjs |
Tests advisory parsing, formatting, credits, and failure paths. |
scripts/release-notes.mjs |
Implements advisory lookup, validation, security sections, and reporter merging. |
.claude/skills/release/SKILL.md |
Documents advisory options and remaining manual release-note edits. |
Review effort: Balanced
) Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
|
Copilot round 1: one finding (CRLF heading match), fixed in c04ea45 with a CRLF test. Requesting round 2. |
…2766) Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
|
Copilot round 2: one finding (patched-version guard ignored comparison operators), fixed in 741c7e8 with exclusive-bound regression cases. Requesting round 3. |
|
Copilot review loop closed: round 3 was clean (no inline comments, no open or suppressed findings). Both earlier findings — the CRLF heading match and the patched-range bounds — were fixed in this PR. |


Closes #2766
What changed
npm run release:notesgains a repeatable--advisory "<GHSA-id>: <markdown>"(scripts/release-notes.mjs). For each advisory it:### Security fixesat the top of What's Changed, ending in the advisory link (* <markdown> ([GHSA-…](…/security/advisories/GHSA-…))), and moves the generated PR list under### Other changes— the 1.0.3 / 2.12.0 shape. The markdown is used verbatim, so the maintainer bolds the lead clause as those releases do.credits_detailed—reporterandfindercredits onUseraccounts, in every credit state (pendingincluded), with the same maintainer-by-permission exclusion as issue reporters. They merge into the Thanks list one line per person,* @user (#123, GHSA-…). Issue reporters still sort by issue count then name; advisory-only reporters follow, by name. The section now appears when only advisory reporters exist, with a lead-in matching what it credits ("issues", "issues and vulnerabilities", or "vulnerabilities").vulnerabilities[].patched_versionsnames the release version, and on any failed advisory lookup (fail-fast, before generate-notes or any Release create).draft.The
releaseskill's step 3a documents the option.Acceptance check
Previewing
--version 2.12.0with its three advisories against the live API, then diffing against the published 2.12.0 body (CRLF stripped): the security bullets and the whole Thanks list match byte for byte. The only differences are the two hand-written blocks — the intro sentence under### Security fixesand the### New configurationsection — which this PR leaves to the maintainer.Not included
The optional generic
--section "<markdown>"from the issue (for "New configuration" and the security intro). The issue marked it as fine to split off, so it isn't in this PR.Tests
scripts/release-notes.test.mjs: argument parsing and validation (bad id, empty markdown, duplicates); credit filtering by type, user type and state; section insertion with and without a What's Changed heading; Thanks ordering and the three lead-ins; end-to-end merge of issue and advisory reporters with one permission lookup per person; patched-version mismatch aborts; draft warns; lookup failure aborts before any Release is created.npm run local:gateis green.🤖 Generated with Claude Code