Repository navigation
feat(pm/fleet-write): advisory_create, a relay row that files a security finding as a draft repository advisory - #29436
Conversation
…draft repository advisory One POST to the bare security-advisories collection under the stroke-scoped repository-advisories grant, travelling alone; closed keys summary, description, packages (npm names, one vulnerabilities entry each, no version range), optional severity and cwe_ids; no state, credit, CVSS vector, CVE id or private fork. Lands on a 2xx carrying an id that reads state draft; the row and an advisory annotation name the id alone. REFUSED_PATH_FAMILIES opens the bare collection, and the self-test pins that only this row's POST reaches it. Claude-Session: https://claude.ai/code/session_01JQwxbZ5rVEB642GP9VD5Xj Co-Authored-By: Claude <noreply@anthropic.com>
… advisory_create first security-findings.md section 3: the seat files a finding through the relay's advisory_create, then names its account with advisory_collaborators_add; advisory_report stays for a repository where the App lacks the advisory grant, and the per-account daily cap on new private reports is recorded. Writes stay App-only and publishing stays the maintainer's. rest-channel.md points at that section instead of restating the rows. Net zero lines per file. Claude-Session: https://claude.ai/code/session_01JQwxbZ5rVEB642GP9VD5Xj Co-Authored-By: Claude <noreply@anthropic.com>
|
domain:devx#1 · os-warren · session_01JQwxbWBtYWqaV8NhvUrShB Contract-review-claim: session_01JQwxbWBtYWqaV8NhvUrShB · head f68850f · 2026-11-02T14:59Z The dispatching seat runs below Generated by Claude Code |
|
domain:devx#1 · os-warren · session_01JQwxbWBtYWqaV8NhvUrShB Contract reviewServed-tier: Inputs: card #29410 (body, the claim comment 6579488343, the os-dev report 6580325941), PR #29436 (body, file list, net diff against main at the head), the check-runs on the head. Card eval premise re-read at origin/main a644163: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentJudged against the live tree, trying to break three things the seat weighted: the no-leak rule, the path fence, and "published unreachable". No-leak, every channel the relay emits on, read in code — holds:
Path fence — holds: exactly one new POST path, see ①; the collection's list (GET) is spelled by no row and the whole-table verb pin reds if one appears. Noted, no fix asked: the family regex is anchored on Published unreachable — holds: the draft's body is built from Findings:
No must-fix. The change holds against the code it cites and the scenario it is accepted against: one op, one quiet field, one POST path, the same stroke-scoped grant, a stricter landing than the report row, and no new spelling of an advisory's text on any public surface. Check-runs on Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:devx#1 · os-warren · session_01JQwxbWBtYWqaV8NhvUrShB 维护者速读
席位意见:按 Warren 14:18 UTC「立一张 skills 卡,你自己派发,开发完成之后,然后你再试」落地;无 must-fix,三条 should-fix 已立 #29448。 席位核对ACCEPT · head
Generated by Claude Code |
Requested by Warren · project thread
Fixes #29410
Clause-②: no
Metadata-protocol: none
维护者速读
advisory_create,以 App 身份在仓上直接建一份 draft 安全公告;安全发现规则改为首选它,advisory_report私报只留给 App 无公告写权的仓。repository-advisories: write;只开放POST …/security-advisories这一条路径(列表 GET 不可达),published仍无任何操作可达;公告正文不进任何日志、结果行、步骤摘要或注解。回滚 = revert 本 PR(6 个文件,无数据变更)。scripts/pm/fleet-write/ops.mjs的advisory_create行与REFUSED_PATH_FAMILIES的 security-advisories 一行;execute.mjs的confirmAdvisory;.claude/skills/pm-dispatch/references/security-findings.md第 3 节。pnpm check:pm-fleet-write-validate && pnpm check:pm-fleet-write-execute,应看到两行 ✓,分别含 "four advisory rows"。.claude/**):契约复核 PASS 之后,以 GOVERNED_APPROVERS 账号批准一次;合并后席位做首跑实测(见 Acceptance notes)。What changes
scripts/pm/fleet-write/ops.mjs. A new row,advisory_create, shaped likeadvisory_report:POST /repos/{owner}/{repo}/security-advisories, which creates an advisory indraft. It travelsaloneand spendsrepository-advisories: write, the grant minted for its stroke only (STROKE_SCOPED_PERMISSIONS, unchanged: the workflow's mint step carries the row as is).summary,descriptionandpackages; optionalseverityandcwe_ids.packagesis a new quiet list field: 1 to 10 npm package names inNPM_PACKAGE_SHAPE, at most 214 characters each. Each name becomes onevulnerabilitiesentry carrying the ecosystemnpmand the name, and nothing else: no version range, patched versions or vulnerable functions.draftand takes none), and the table spells nocredits,cvss_vector_string,cve_idorstart_private_fork. A payload carrying any of them, or its ownvulnerabilities, is refused by name.ghsa_idand reads statedraft(advisoryCreateReadBack). A 2xx with no id is UNCONFIRMED and a 2xx in another state FAILED; neither is ever re-sent. The landed row (advisoryCreateLandedText) prints the id and the state alone.REFUSED_PATH_FAMILIESopens the bare collection path (ADVISORY_CREATE_PATH_SHAPE) beside one advisory's path and the reports endpoint. That path also answers the advisory list to aGET. No row sends that verb there, and the validator pins that the only request on it is this row's POST. A trailing slash, a query string or any other tail stays refused.scripts/pm/fleet-write/execute.mjs.confirmAdvisoryjudges the new row on its own answer; the landing reaches the row, the step summary and one notice annotation through the existing advisory paths. New cases in the advisory battery (22 → 27): the one POST and its exact body, the row and the annotation, UNCONFIRMED and wrong-state answers, a 403 and a 422, four more payloads refused before any request, and the marker sweep, now over 41 runs.scripts/pm/fleet-write/dispatch.mjs.ADVISORY_ANNOTATED_OPSgainsadvisory_create, so the seat reads the draft's id from the run's annotation and hands it on (--json:advisories) for theadvisory_collaborators_addstroke. The no-locator note aboveREAD_BACK_LOCATORSnames this row too. Seat battery 12 → 14 cases. This file was not on the claim's file surface; the id cannot reach the seat without it (see Deviations).scripts/pm/fleet-write/validate.mjs. Header and self-test: the row, thepackagesfield, the exact request and body, accepted payloads, quiet refusals that never echo the marker, by-name refusals, the stroke fence, the scoped grant, the path families, the read-back and the landed text. Advisory battery 44 → 51 cases..claude/skills/pm-dispatch/references/security-findings.mdsection 3. The seat files a finding as a draft advisory throughadvisory_createfirst, then names its account withadvisory_collaborators_add.advisory_reportstays for a repository where the App lacks the advisory grant, and the per-account daily cap on new private reports is recorded. "⛔ 席位永不以自身账号私报或写公告" stays, now ending "发布归维护者". Section 4's cross-repo line follows. 55 → 55 lines..claude/skills/pm-dispatch/references/rest-channel.md. The advisory line now namesadvisory_createas preferred and points atsecurity-findings.md, which already says it is the one home ("他处只指向本文"). 81 → 81 lines. The line's ✓ is dropped, because the row as a whole now includes an op no seat has called yet. The seat's live run puts it back.Line budget: both governed files net zero, every changed line at or under 120 bytes, no ratchet row moved.
Why
GitHub caps the new private vulnerability reports one account files per day (changelog 2026-10-01), and every relay report is filed as the one fleet App. So the whole fleet gets about one report a day: on 2026-11-02 the first
advisory_reportlanded and the next eight were refused 403 (#29402). A draft advisory is the repository's own act under the App's existing advisory grant. By GitHub's REST documentation it is not a report and not under that cap, and it lands indraftdirectly, the state a report reaches only once accepted.Tests
pnpm check:pm-fleet-write-validate: 275 cases pass across 15 batteries; advisory battery 51, pinned at 51 (a pin of 52 reds: "registered 51 case(s), below its pinned floor of 52").pnpm check:pm-fleet-write-execute: 237 cases pass across 21 batteries; advisory battery 27, pinned at 27.pnpm check:pm-fleet-write-dispatch: 298 cases pass across 26 batteries; advisory seat battery 14, pinned at 14.node scripts/pm/fleet-write/ops.mjs --self-test: exit 0.Ablation, one time, on the draft's landed row (committed first, restored with blob == HEAD): when the landed row also prints the answer's
summary, the execute self-test reds on 2 of 237 cases, the row case and THE MARKER TEST. Restored, the self-test exits 0.Local gate subset at f68850f: 46 derived, 46 run, all exit 0
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 46 commands. Each was run afterturbo run build --filter=@objectstack/formula --filter=@objectstack/lintunder the verify lock (exit 0).--ranreconciliation: "46 derived famil(ies) accounted for — 46 run, 0 NOT-MEASURED". Every family CI runs is read from this PR's check-runs, not re-run locally.node scripts/check-closing-keyword-parity.mjs:: exit 0node scripts/check-closing-keyword-parity.mjs --self-test:: exit 0node scripts/check-comment-mask-corpus.mjs:: exit 0node scripts/check-declaration-mirrors.mjs:: exit 0node scripts/check-declaration-mirrors.mjs --self-test:: exit 0node scripts/check-self-test-wired.mjs:: exit 0node scripts/check-self-test-wired.mjs --self-test:: exit 0node scripts/check-self-test-workflow-commands.mjs:: exit 0node scripts/check-self-test-workflow-commands.mjs --self-test:: exit 0node scripts/check-whole-set-label-write.mjs:: exit 0node scripts/check-whole-set-label-write.mjs --self-test:: exit 0node scripts/ci/plan-test-core-shards.mjs --self-test:: exit 0node scripts/pm/bare-root-worklist.mjs --self-test:: exit 0node scripts/pm/check-harness-current.mjs --self-test:: exit 0pnpm --filter @objectstack/lint run check:doc-formula-expressions:: exit 0pnpm check:agent-test-spelling:: exit 0pnpm check:bash32-floor:: exit 0pnpm check:ci-filter-parity:: exit 0pnpm check:cli-command-ids:: exit 0pnpm check:cross-package-test-inputs:: exit 0pnpm check:doc-authoring:: exit 0pnpm check:driver-memory-census:: exit 0pnpm check:entry-guard:: exit 0pnpm check:gitlink-declared:: exit 0pnpm check:nul-bytes:: exit 0pnpm check:parse-guard:: exit 0pnpm check:pm-close-cards:: exit 0pnpm check:pm-dispatch-gates:: exit 0pnpm check:pm-fleet-write-dispatch:: exit 0pnpm check:pm-fleet-write-execute:: exit 0pnpm check:pm-fleet-write-validate:: exit 0pnpm check:pm-governed-merges:: exit 0pnpm check:pm-issue-create:: exit 0pnpm check:pm-issue-transfer:: exit 0pnpm check:pm-label-write:: exit 0pnpm check:pm-post-stamped:: exit 0pnpm check:pm-record-recognisers:: exit 0pnpm check:pm-skill-id-lint:: exit 0pnpm check:pm-skill-ratchet:: exit 0pnpm check:pm-write-pace:: exit 0pnpm check:pnpm-filter-targets:: exit 0pnpm check:pnpm-flag-spellings:: exit 0pnpm check:refd-timer-probe:: exit 0pnpm check:scripts-symbol-anchors:: exit 0pnpm check:skill-frame-sync:: exit 0pnpm check:watch-hint-literal:: exit 0Acceptance notes
main; the seat runs it and reports on the card, as feat(pm/fleet-write): three security-advisory relay rows, payload read from the event file #29222's rows were. These are the readings no test here can take:vulnerabilitiesentry of an ecosystem and a name is the least the endpoint accepts (H3; the docs markvulnerabilitiesrequired and the name nullable; no version range is sent).advisory_collaborators_addlands on such a draft (its fence already admitsdraft).ADVISORY_ACCESS_REMEDY).permission-repository-advisoriesin.github/workflows/fleet-write.ymlstill says "THREE consumers". The mint step needed no change, and the claim keeps.github/workflows/**out of this diff. The comment is one row short until a workflow-touching PR corrects it.security-findings.mdline on private repositories ("私有仓无私密漏洞报告功能,那些操作上线后仍会话专递") is unchanged. Whether a private repository takes a draft advisory is not measured here.Verification
origin/main7f277a8:REFUSED_PATH_FAMILIESrefused the bare collection, andsecurity-findings.mdsection 3 said the relay had no draft-create op. Both hold, and this PR changes both.Deviations
scripts/pm/fleet-write/dispatch.mjsis edited although the claim's file surface did not name it. The executor's advisory annotation is read throughADVISORY_ANNOTATED_OPSthere, and without the entry a created draft's id could not reach the seat.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses (CI-owned).main, one pull request..claude/**andscripts/pm/**only):skip-changeset; both declaration lines are above.packages/specnot touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code