Skip to content

Commit 7676a8f

Browse files
cliffhallclaude
andcommitted
feat: security-advisory skill; rewrite SECURITY.md for private reporting
Add the security-advisory skill, adapted from the MCP Inspector's for a single release line: the [GHSA-...] draft card, the ownership check (this repo's server, an archived or third-party server, or the SDK underneath, routed privately), the reach classes for filesystem, git and fetch, the human-only accept / close / publish steps, the private fork, and conversion to public tracking after publication. Eval cases included. Add the two narrow advisory exceptions to AGENTS.md's board rules (a [GHSA-...] draft card is the one allowed non-issue card; accepting an advisory moves its unmilestoned draft from Incoming to Todo), the draft-card lookup, create and convert recipes to board-ops, and a pointer from issue-create's "never create a draft card". Rewrite SECURITY.md: it told reporters the repo was not eligible, while private vulnerability reporting is enabled and holds a backlog. Refs #4870 Signed-off-by: cliffhall <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 574cba8 commit 7676a8f

6 files changed

Lines changed: 481 additions & 14 deletions

File tree

‎.claude/skills/board-ops/SKILL.md‎

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ takes `--owner modelcontextprotocol`. The board is **private**: treat a dump of
3030
its items as private data (see the snapshot section below).
3131

3232
**Only issues go on the board, never PRs, never draft cards.** A PR is tracked
33-
through the card of the issue it closes.
33+
through the card of the issue it closes. The one exception is a security
34+
advisory's `[GHSA-…]` draft card; see
35+
[Advisory draft cards](#advisory-draft-cards).
3436

3537
## IDs
3638

@@ -243,6 +245,61 @@ gh api repos/modelcontextprotocol/servers/issues/<N> -X PATCH \
243245
(or "Mark as duplicate" in the web UI, which additionally records a
244246
duplicate-of link).
245247

248+
### Advisory draft cards
249+
250+
A private security advisory is tracked by a **draft card** titled
251+
`[GHSA-xxxx-yyyy-zzzz] - <summary>`, because a real issue would disclose it
252+
before a fix exists. What goes on the card, and when it moves, is the
253+
`/security-advisory` flow; these are only the mechanics.
254+
255+
⚠️ **A draft card has no repository and no issue number**, so the issue-side
256+
lookup above cannot find one. Look it up by its **bracketed GHSA id** in the
257+
full listing, checked for truncation, then feed that item id to `item-edit` or
258+
`item-delete` exactly as usual:
259+
260+
```sh
261+
GHSA=GHSA-xxxx-yyyy-zzzz # the advisory's real id
262+
ITEM_ID= # never let an earlier lookup's id survive a failed one
263+
BOARD=$(gh project item-list 43 --owner modelcontextprotocol --format json --limit 2000)
264+
if jq -e '(.items | length) == .totalCount' <<<"$BOARD" >/dev/null; then
265+
ITEM_ID=$(jq -r --arg p "[$GHSA]" '.items[] | select(.content.type=="DraftIssue")
266+
| select(.content.title | startswith($p)) | .id' <<<"$BOARD")
267+
[ -n "$ITEM_ID" ] || echo "no draft card titled [$GHSA] on #43" >&2
268+
else
269+
echo "item-list incomplete or failed — raise --limit; not concluding anything" >&2
270+
fi
271+
```
272+
273+
**Create** one only after that lookup finds none (a second card for the same
274+
advisory is a duplicate). It is the add-card recipe with `item-create` in place
275+
of `item-add`, Status `Incoming`, and the provisional Priority:
276+
277+
```sh
278+
STATUS_OPT=$(opt Status "Incoming")
279+
PRIORITY_OPT=$(opt Priority "<provisional level>")
280+
ITEM_ID=
281+
if [ -n "$STATUS_OPT" ] && [ -n "$PRIORITY_OPT" ]; then
282+
ITEM_ID=$(gh project item-create 43 --owner modelcontextprotocol \
283+
--title "[$GHSA] - <summary>" --body "<link and triage lines only>" \
284+
--format json --jq '.id') || ITEM_ID=
285+
fi
286+
# Then the two chained item-edit calls from "Add a card and set its fields".
287+
```
288+
289+
**Convert** it to an issue only after the advisory is **published**. The web UI
290+
has "Convert to issue" on the card; the API equivalent is:
291+
292+
```sh
293+
REPO_ID=$(gh api repos/modelcontextprotocol/servers --jq .node_id) || REPO_ID=
294+
[ -n "$ITEM_ID" ] && [ -n "$REPO_ID" ] && gh api graphql \
295+
-f item="$ITEM_ID" -f repo="$REPO_ID" -f query='mutation($item:ID!,$repo:ID!){
296+
convertProjectV2DraftIssueItemToIssue(input:{itemId:$item,repositoryId:$repo}){
297+
item{id content{... on Issue{number url}}}}}'
298+
```
299+
300+
The card keeps its place and its field values; the new issue takes the card's
301+
title and body.
302+
246303
## ⚠️ The option-deletion hazard
247304

248305
This section and its two subsections are copied verbatim from the MCP

‎.claude/skills/issue-create/SKILL.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ unlabeled issue appears in no `v2`-filtered query, and an unmilestoned one drops
3131
out of release planning silently.
3232

3333
**Never create a duplicate.** **Never create a draft card** (a board card with
34-
no issue number): every board item is a real GitHub issue.
34+
no issue number): every board item is a real GitHub issue. The one exception, a
35+
private security advisory's `[GHSA-…]` card, is the `security-advisory` skill's.
3536

3637
## 0. Check for an existing issue first
3738

0 commit comments

Comments
 (0)