You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8e3a18a
Browse filesBrowse the repository at this point in the historyBrowse files
docs(skills): close the advisory fork's PR before publishing; keep follow-up write-ups on the card
GitHub refuses to publish an advisory while its private fork has an open
PR, and publishing deletes the fork. The security-advisory skill now
closes the fork's PR once its head is on v2/main, adds both checks to the
pre-publish list, and keeps a follow-up card's write-up on the card so
step 6 can still read it after publication.
Closesmodelcontextprotocol#5251
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
if git merge-base --is-ancestor "$sha" origin/v2/main;then
356
+
gh api -X PATCH "repos/$FORK/pulls/$n" -f state=closed --jq '"closed \(.html_url)"'
357
+
else
358
+
echo"$FORK#$n: head $sha is NOT on v2/main; left open">&2
359
+
fi
360
+
sleep 1
361
+
done
362
+
```
363
+
364
+
- ⚠️ **A PR whose head is not on `v2/main` stays open.** Its fix has not
365
+
shipped, so the advisory is not ready to publish; find out what is missing
366
+
rather than closing the PR to unblock the button.
367
+
-**Close it without a comment.** The forks have issues disabled, so a PR
368
+
comment (the issue-comments endpoint) returns `404`.
369
+
370
+
#### Before publishing, check what publishing will show
371
+
372
+
A published advisory is what users and advisory tooling (Dependabot,
373
+
`npm audit`, `pip-audit`) remediate from, and publishing deletes the private
374
+
fork, so check each of these first:
375
+
376
+
-**No open PR in the private fork.** Run the close recipe above. Found now,
377
+
it is a recipe; found at the button, it is a disabled button and no reason
378
+
given beyond "outstanding pull requests".
379
+
-**Nothing that matters lives only in the fork.** Publishing deletes it.
380
+
Review findings worth keeping, a residual-exposure note, a follow-up's
381
+
write-up: copy each onto the advisory (if it belongs in what is published) or
382
+
onto the advisory's draft card (if it is tracking), before the button is
383
+
pressed.
331
384
332
385
-**The affected product**: ecosystem (`npm` or `pip`) and package name, as
333
386
published (`@modelcontextprotocol/server-filesystem`, `mcp-server-git`).
@@ -345,9 +398,6 @@ advisory is what users and advisory tooling (Dependabot, `npm audit`,
345
398
-**What the fix leaves open**, if the advisory has a follow-up card. Say which
346
399
platforms or cases are still exposed, so a user who upgrades does not believe
347
400
they are fully covered.
348
-
-**The follow-up's write-up, copied out of the fork** before publishing. Once
349
-
the advisory is published, don't count on the temporary fork, or on access to
350
-
it, surviving.
351
401
352
402
### 6. After publication, convert the card into public tracking
353
403
@@ -379,8 +429,9 @@ work has not shipped:
379
429
380
430
1. Retitle it `[GHSA-xxxx-yyyy-zzzz follow-up] - <summary>`.
381
431
2. Convert it.
382
-
3. Replace the body's triage lines with the write-up copied out of the fork
383
-
(step 5), linking the now-public advisory.
432
+
3. Replace the body's triage lines with the card's own `## Write-up` section
433
+
(step 4), linking the now-public advisory. The fork is gone by now, so the
434
+
card is the only copy.
384
435
4. Apply `/issue-create`'s labels. A card already past `Incoming` also takes
385
436
the milestone the follow-up is planned for, not the one the fix shipped in.
386
437
A card still in `Incoming` stays unmilestoned: once it is an issue the
@@ -397,7 +448,8 @@ work has not shipped:
397
448
| Listing |`GET repos/{owner}/{repo}/security-advisories`, 30 per page, so always `--paginate`|
398
449
| Private fork |`POST …/security-advisories/{ghsa_id}/forks` → `202`, a private repo `servers-ghsa-xxxx-yyyy-zzzz` (lowercase) in the org; exact name in `.private_fork.full_name`|
399
450
| Fork idempotency | Read `.private_fork` first; the POST creates, it does not probe |
400
-
| Fork deletion | Needs the `delete_repo` OAuth scope, which a default `gh` token lacks |
451
+
| Fork deletion | Needs the `delete_repo` OAuth scope, which a default `gh` token lacks. **Publishing deletes the fork** on its own: the repo returns `404` and `.private_fork` reads `null`|
452
+
| Publishing blocked | An open PR in the private fork disables **Publish advisory**; close it once its head is on `v2/main` (step 5) |
401
453
| Comments |**No API at all**, REST or GraphQL; UI-only |
402
454
| Fork PR comments | Issue comments (`gh pr comment`, `issues/N/comments`) are refused and `…/comments/{id}/replies` returns `404`; reply in a thread with `POST pulls/N/comments -F in_reply_to=<id>`, and post a PR-level summary as a `COMMENT` review |
403
455
| Credits |`credits_detailed` on the advisory; a private report carries the reporter's credit (`type``reporter`, `state``pending` or `accepted`) from submission |
0 commit comments