Skip to content

feat(fleet-write): dependabot_list — a sealed read of the open Dependabot alerts - #39715

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-39686-dependabot-list
Dec 4, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/issue-39686-dependabot-list

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #39686

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:车队写入中继新增一个只读动作,安全席位从此能读到本仓库尚未处理的依赖漏洞告警列表(以前读不到),结果只有发起的那个席位能打开。
  • 为什么做:落实维护者「立卡派发处理 长期办法:让车队中继能读。」,安全巡检不再需要人手代查依赖告警。
  • 出错会怎样:只影响安全席位这一种读取;任何一步不对都整体失败,不写任何东西、日志里不出现任何告警内容,合入后可直接撤回。
  • 要你做什么:首次实跑前,在车队应用的权限设置里申请"依赖漏洞告警:只读",并在本组织的安装处接受。

What changes

A read-only relay row, dependabot_list, that returns the repository's open Dependabot alerts sealed to the asking seat. It mirrors advisory_list end to end:

  • Validator (validate.mjs): public_key alone (a state, severity, package, cursor, page or any other key is refused by name), alone in its stroke, senderGate: 'target-write' (the ruling 「同意改成对仓库有写权限,立卡派发修复」 kept as is).
  • Grant (ops.mjs + fleet-write.yml): vulnerability-alerts: read joins PERMISSIONS and STROKE_SCOPED_PERMISSIONS. The validator writes permission_vulnerability_alerts=read for this stroke alone and an EMPTY value for every other stroke. The workflow mints permission-vulnerability-alerts only from that output, never as a literal. That input is declared in actions/create-github-app-token's action.yml at v3, so there is no "Unexpected input" warning. Every other stroke keeps today's grants exactly.
  • Executor (dependabot.mjs, new; called from execute.mjs):
    • Gate: the row's sender gate is judged again before the first GET.
    • Walk: one walk of GET /repos/OWNER/NAME/dependabot/alerts?state=open&per_page=100 on the platform's cursor, under a 3-page cap.
    • Page fences: 200, a list, every item an open alert with a positive integer number, and every projected field of its declared shape. A refusal names the failing fields, never a value.
    • Cursor: taken from exactly one rel="next" link on this API's alerts collection and the open state, in its closed shape. A numeric /repositories/ID/... link is followed only when the id is the repository's own, read once. A refused link prints its shape only.
    • Projection and seal: each alert is projected to number, state, severity, ecosystem, package, manifest_path, scope, vulnerable_version_range, first_patched_version, ghsa_id. The listing is padded to the advisory listing's one sealed size, sealed under its own associated data (op=dependabot_list), and emitted as exactly ten notice parts.
    • Failures: a repeated alert, the page cap, the channel cap, a 403 (with an access remedy that never widens the token), an unreached page and a failed seal each FAIL with nothing emitted.
  • Seat (dispatch.mjs): the op joins the sealed-read path by derivation, because it requires a public_key. The seat makes the key pair, reads back and opens the parts, and --reveal alone prints the listing with its pad trimmed. The header, the read-back-locator note and the usage say so.
  • Refused paths (ops.mjs): a new REFUSED_PATH_FAMILIES entry catches every /dependabot path except the bare alerts collection and its one page shape. This covers one alert, its PATCH path, another state, a page number and the secrets endpoints.

Deviations from the dispatch, both deliberate:

  • A sixth file. The action lives in a new sibling module, scripts/pm/fleet-write/dependabot.mjs, and is added to RELAY_FILES. The dispatch named four .mjs files, but execute.mjs and ops.mjs are far over 1,000 lines, and the fleet rule puts a new concern (a new op's action) in a sibling module with only the call left in the original.
  • No changeset. skip-changeset is set instead. Nothing published changes: scripts/pm/** and .github/** are not in any package's files[], and pr-automation.yml rejects an empty changeset, so the .changeset/39686-dependabot-list.md the dispatch named would red Check Changeset.

Maintainer action owed before the first live run: the fleet App must request the repository permission "Dependabot alerts: Read", and the organization's installation must accept it. Without it, this stroke's mint fails with zero writes. Every other stroke is unaffected, because none of them requests the grant. No live run was attempted.

Tests

Self-tests at 5020068b957:

  • node scripts/pm/fleet-write/validate.mjs --self-test: 520 cases, 25 batteries. This adds a new battery (23 cases, floor 24 → 25) and updates the nine sibling pins that enumerate rows, grants, GETs and outputs.
  • node scripts/pm/fleet-write/execute.mjs --self-test: 500 cases, 33 batteries. This adds a new battery (21 cases, floor 32 → 33).
  • node scripts/pm/fleet-write/dispatch.mjs --self-test: 448 cases, 35 batteries. This adds a new seat end-to-end battery (8 cases, floor 34 → 35).

The two pins the dispatch asked for:

  • No other stroke's mint gains the new permission. For every op but dependabot_list, the validator battery checks two things, each alone in its stroke and in the shared stroke of them all: the output line is permission_vulnerability_alerts= (empty), and the token map lacks vulnerability-alerts. The workflow is checked to mint the input once, from the output, never as a literal.
  • No alert field reaches any log line. The executor battery's marker sweep covers all 34 runs: landed, paged, exact, numeric link, short page with a next link, empty, capped, off-link, repeated, over-cap, fenced, unreached, gated, unsealed and refused. For each run it checks every log line, row, step summary, annotation message and pace-log line for the marker, every alert number, package, manifest path, GHSA id and patched version, and the cursor. There is a positive control. The seat battery checks the same across the relay job log, the seat's lines, --json, stdout and stderr.

Reverse verification (on committed HEAD, restored with git checkout HEAD --; git diff HEAD was empty after each leg):

Mutation Result
Workflow mints permission-vulnerability-alerts: read as a literal validate red, 3 cases, including the literal-mint pin
vulnerability-alerts dropped from STROKE_SCOPED_PERMISSIONS validate red, including "NO OTHER STROKE'S MINT GAINS IT"
The repeated-alert refusal prints the alert number and package execute red, including THE MARKER TEST
The projection lets html_url cross execute red, 5 projection and pad cases

Acceptance notes

  • Capacity: about 100 to 120 open alerts. The sealed channel is the advisory listing's own (ten notices, 29,939 plaintext bytes). A typical projected alert is about 250 bytes, so the channel holds about 103 to 117 alerts. A repository with more open alerts gets the over-cap failure with nothing emitted, never a cut list. If that bites, the reading goes to the maintainer, per the ruling's ten-part channel.

  • NOT MEASURED until the first live stroke:

    • whether the narrowed App token reads the list, once the App requests the permission and the installation accepts it;
    • the exact Link header shape this endpoint answers with.

    Both fail closed: a refused page, or a link off the declared shape, is a FAILED action with nothing emitted.

  • Out of scope: the security lane's patrol doc (.claude/skills/pm-dispatch/references/lanes/security.md) names an advisory_list patrol and could add a dependabot_list one. It is governed and not touched here; carrier: the security seat.

Verification

Read first, by risk:

  1. scripts/pm/fleet-write/ops.mjs: the new REFUSED_PATH_FAMILIES entry (the negative lookahead that admits only the alerts page shape), and STROKE_SCOPED_PERMISSIONS / PERMISSIONS.
  2. .github/workflows/fleet-write.yml: the one new permission-vulnerability-alerts input, read from the validator's output.
  3. scripts/pm/fleet-write/dependabot.mjs: dependabotListAction, which covers the gate, the walk, the fences and the seal.

Two-minute check: run node scripts/pm/fleet-write/validate.mjs --self-test && node scripts/pm/fleet-write/execute.mjs --self-test && node scripts/pm/fleet-write/dispatch.mjs --self-test. You should see three ✓ lines: 520 / 500 / 448 cases across 25 / 33 / 35 batteries.

Local gate subset (derived by dispatch-gates --commands)

At 5020068b957, from node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, 75 commands were derived for this diff and all 75 were run locally, each exit code captured before any pipe.

  • 74 exited 0. These include pnpm check:pm-fleet-write-validate, pnpm check:pm-fleet-write-execute, pnpm check:pm-fleet-write-dispatch, pnpm check:nul-bytes, pnpm check:declared-population-live and pnpm check:pm-dispatch-gates.
  • 1 is NOT MEASURED. pnpm check:i18n-coverage exited 3, PREREQUISITE NOT MET: no package dist/ is built in this worktree, so nothing was linted. The diff touches no i18n surface; CI runs it.

The reconciliation with --ran printed ✓ dispatch-gates --ran: 75 derived famil(ies) accounted for — 74 run, 1 NOT-MEASURED.

Families CI runs over a whole root, the artifact rosters and the type-check lanes are CI's to report on this PR's check-runs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4

…bot alerts

A read-only relay row mirroring advisory_list end to end: the validator
row (public_key alone, alone in its stroke, target-write sender gate),
vulnerability-alerts READ minted for that stroke alone through a new
stroke-scoped workflow input, the executor's walk of the open alerts on
the platform's cursor under a page cap, each alert projected to ten
fields, padded and sealed to the seat's one-time key as ten notice
parts, and the seat's open and --reveal display. The action lives in
its own module, scripts/pm/fleet-write/dependabot.mjs.

Claude-Session: https://claude.ai/code/session_01ASNY8XNef4ywkQio6S9ju4
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Dec 4, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4

Contract-review-claim: session_01ASNY8XNef4ywkQio6S9ju4 · head 5020068 · 2026-12-04T14:15Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 5020068b9578d610f1dcbe84169c881a96d5dadb
Local-runs: probe — the seat's brief asked for the three relay self-tests at this head (exit 0 each) and for measured probes of the per-stroke token set, the path family and the public channels; no derived gate family was re-run
Scope: .github/workflows/fleet-write.yml + scripts/pm/fleet-write/ops.mjs, scripts/pm/fleet-write/validate.mjs, scripts/pm/fleet-write/execute.mjs, scripts/pm/fleet-write/dispatch.mjs, scripts/pm/fleet-write/dependabot.mjs
Security-touching: yes
Rule-change-verified: yes

Face: governed rules text (.github/workflows/fleet-write.yml, Tier H). Card #39686, PR #39715, one commit on main at fcdb79d. Read: the card body and its four comments, the PR body, the whole diff of the six files, and the cited code outside the diff (read, not reviewed). PR author is objectstack-fleet[bot].

① Derived judgments

Each line is a measurement taken at this head, not a reading of a comment.

  1. No other stroke's token gains anything. I computed the validator's grant set and its permission_* output lines for all 34 ops at the head and for the 33 ops of the parent commit. All 33 earlier ops have a byte-identical grant map at head and parent, and each writes an EMPTY permission_vulnerability_alerts. No pair of the 19 ops that may share a stroke carries the grant. Exactly one op spends it. A dependabot_list stroke mints the five literal grants plus vulnerability-alerts: read, never write, for one repository.
  2. The mint input is real, and an empty value is a no-op. The tag v3 of actions/create-github-app-token resolves to f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc today (the same commit as v3.4.0). Its action.yml declares permission-vulnerability-alerts. Its permission reader, in lib/ and in the bundled dist/main.cjs the action runs, returns the set unchanged for an empty INPUT_PERMISSION-* value. v3 is a moving tag (an earlier choice, outside this diff), so the claim is true of the tag as it resolves today.
  3. The grant is the narrowest that reads the list. GitHub's permission ledger (github/docs at 721ef837, the server-to-server file) lists the repository listing under vulnerability_alerts at read with no additional permission. The same level also covers one alert's GET and the organization listing; no row spells either, and the path pins refuse both.
  4. The row is read-only and travels alone. The module sends two request shapes, both GET. In 36 probe runs through the real executor every request was a GET on the relay's own API origin: the sender's permission read, the listing page, and at most one read of the repository. The validator refuses the row beside a comment, beside advisory_list in either order, and beside a second listing.
  5. The sender gate. The row names target-write; the executor judges it again before the first GET and refuses any other value with nothing read. The stroke's own gate (write, maintain or admin on the target) runs first.
  6. No alert field reaches a public channel. I read every return path of dependabotListAction: each sentence is fixed, or names an HTTP status, or names failing field NAMES. A thrown transport error's message is never printed, and a platform message is printed only from a closed list. My own probe served alerts carrying a marker in every field, projected ones included, across 36 cases: non-2xx bodies quoting an alert, off-shape items, a repeated alert, the channel cap, the page cap, a next link hostile in its host, path, query names, state and cursor, a numeric id that is another repository's, an unreached page and an unread repository. No marker, alert number, package, manifest path, GHSA id or cursor appeared in any log line, row, step summary or notice outside the ciphertext, and nothing threw. At the seat, --json carries the op, the state, the padded byte count, the part count and the two top-level field names; --reveal alone prints the listing.
  7. The caller cannot steer the request. The validator refuses every key but public_key by name (state, cursor, page, page size, severity, package, id, repository). The next page's path is the relay's own spelling; only the cursor is taken from a next link, in a closed alphabet and re-encoded. 20,000 random in-shape cursors all produced a path inside the one page shape. A link on another origin, with user-info tricks, on another repository, another numeric id, another state, or on one alert's path is refused.
  8. Seal separation. The three sealed reads have three distinct associated-data spellings; the listing's binds the request id, the action index and its own op. AES-GCM binds it, and the self-tests of all three files show a listing sealed under the advisory listing's data does not open.
  9. Self-tests at this head: validate.mjs --self-test exit 0 (520 cases, 25 batteries); execute.mjs --self-test exit 0 (500 cases, 33 batteries); dispatch.mjs --self-test exit 0 (448 cases, 35 batteries).
  10. CI at read time (check-runs on this head): 23 success, 20 skipped, 7 still running, none failed. The all-green check before landing stays the seat's.

NOT MEASURED, and said so by the diff: that the narrowed App token reads the list, that the mint succeeds with the new grant, and the endpoint's real Link header shape. All three fail closed. The first live stroke is the measurement.

② Semver level

None. Nothing published changes: scripts/pm/** and .github/** are in no package's files. Clause-②: no holds, and skip-changeset is the right label.

③ Boundary flags

  • Dev open_questions: none. security_findings: none; I found none that needs the private channel.
  • Deviation, a sixth file (dependabot.mjs): accepted. It is in RELAY_FILES, pinned on disk by the validator's self-test, and it keeps the two oversized files from growing a new concern.
  • Deviation, no changeset: accepted, see ②.
  • Out-of-scope item, the security lane's patrol doc: carrier is the security seat, a governed file, rightly untouched here.
  • Out-of-scope item, the live measurements: recorded on the card; owed on the first live stroke.
  • SQL push-down check: not applicable, no data-layer code.
  • Read outside the diff, not graded: the workflow's older advisory comment counts six write consumers while the table now has more rows spending that grant. An earlier drift, for the lane.

④ Design judgment

.github/workflows/fleet-write.yml (the hit). One input and two comment edits. The input reads the validator's output and is never a literal; the validator's self-test pins exactly that. Against the card: the narrowest grant, minted for this stroke alone, every other stroke unchanged. Holds, by measurements 1 to 3. The comment's claims are each true or marked NOT MEASURED, with one loose phrase (N1).

ops.mjs. The row, the two table entries, the page shape and the refused family agree with the workflow and the card: read level, alone, target-write, public_key alone. Holds.

validate.mjs. No logic changed; the row is judged by the table. The new battery pins what the card asked for, including that no other stroke gains the grant. Holds.

execute.mjs and dependabot.mjs. A faithful mirror of the advisory listing: gate, one walk, fences, projection, pad, seal, ten parts. The projection carries exactly the fields the card listed. Holds.

dispatch.mjs. The row joins the sealed-read path by derivation from the table. Holds.

Findings. No must-fix. No should-fix. Seven nits, none touching correctness or the contract:

  • N1 (nit). The workflow comment says the row's path is spelled in ops.mjs alone. The page path and the numeric collection shape are spelled in dependabot.mjs. Wording only.
  • N2 (nit). ops.mjs says the gate is advisory_list's "by the same ruling". The quoted ruling is the advisory reads'. For this row the authority is the card's keep-line under the maintainer's dispatch word, and the maintainer's Tier H approval of this PR is what rules it. The comment should say that.
  • N3 (nit). The header says a count never crosses. A FAILED row for the channel cap or the page cap is a coarse lower bound on the listing's size. The sibling row has the same property; the header should name it.
  • N4 (nit, accepted deviation). The channel holds about 100 to 117 alerts, under the 300 the page cap allows. A repository above that fails closed on every stroke, with no paging across strokes. Fine for the card's scenario; a follow-up card when it bites.
  • N5 (nit). The refused path family is a build-time pin over the table's rows, not a check at send time, and its carve-out is by suffix, not anchored to the repository prefix. No row can spell another prefix. An assert of the page shape at send time would be optional hardening.
  • N6 (nit). Stale enumerations: the row-schema comment for grant, senderGate and alone, the grant function's doc comment, and the three self-tests' closing sentences do not name the new row. The seat's display picks the listing by op literal instead of a table property.
  • N7 (nit). A refused link's shape prints lower-case query parameter NAMES as they are, values never. Documented, and the sibling's behaviour.

Only nits, so this is the final round for this head. N4 goes to a follow-up card if it bites; the rest are accepted deviations or prose for a later touch of these files.

Implemented-by: claude/issue-39686-dependabot-list
Reviewed-by: session_01ASNY8XNef4ywkQio6S9ju4

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4

席位记录 · ACCEPT · head 5020068b9578d610f1dcbe84169c881a96d5dadb

维护者速读

  • 改了什么:车队中继新增一个只读操作 dependabot_list,读取本仓未关闭的 Dependabot 告警,结果加密后只回发起的席位;只有这一笔请求的 token 带「Dependabot alerts: Read」,其余每笔请求的权限与现在逐字节一致。
  • 为什么:席位会话的 token 读告警接口返回 403,告警只能由维护者手工转述;维护者原话「立卡派发处理 长期办法:让车队中继能读。」(fleet-write: a read-only relay row for the repository's Dependabot alerts #39686)。
  • 若出错:最坏是这一个读操作失败(发 token 或读列表失败即零写入退出);不写任何东西,可整体撤回。
  • 要你做什么:本 PR 改了 .github/workflows/fleet-write.yml(受管面,Tier H),需授权审批人批准当前 head 5020068b;L2 PASS 记录是 7414365435(Head-sha 即此 head)。

席位意见:ACCEPT。

席位核对

ACCEPT — head 5020068b9578d610f1dcbe84169c881a96d5dadb.

  1. Shape: draft PR on main, Fixes #39686, Clause-②: no, Metadata-protocol: none (no metadata author surface; no Skills-docs: line owed). Six files: the workflow (+12/-1) and the relay's five modules, one of them new (dependabot.mjs, 409 lines). skip-changeset: nothing published changes.
  2. Premise measured: a seat session token reads 403 on the alerts endpoint (card body). The maintainer reports the App permission granted (fleet-write: a read-only relay row for the repository's Dependabot alerts #39686, comment 7413468683); whether the narrowed mint reads the list is measured by the first live stroke after the merge, which fails closed with zero writes otherwise.
  3. Gates: this head, 53 check runs: 33 success, 20 skipped, 0 failed. The dev's local derivation: 75 families, 74 exit 0, 1 not measured locally (check:i18n-coverage, needs a build; CI ran it). The three relay self-tests exit 0 at this head, re-run independently by the L2 reviewer (520 / 500 / 448 cases).
  4. L2: governed rules text face, one complete round at CONTRACT_REVIEW_TIER, PASS on this head (7414365435): no must-fix, no should-fix, seven nits. Measured there: every other op's grant map is byte-identical to main; the mint action's action.yml at the pinned tag declares the new input and skips an empty value; 36 hostile executor cases leak no alert field outside the ciphertext.
  5. Accepted deviations: the new module (the 1,000-line rule for execute.mjs/ops.mjs); skip-changeset instead of an empty changeset; nits N1–N7 left for a follow-up, none blocking. N4 (the channel holds about 100–117 open alerts and fails closed above that) is noted; the repository has 2 open alerts today.
  6. Out of scope: the security lane text could name a dependabot_list patrol step (governed; a follow-up only if the maintainer wants it). The nits go to one review follow-ups of PR #39715 card.
  7. Landing: Tier H. Hand-off to the authorised approver now; on approval the seat runs the pre-landing checks, readies and enqueues. A head move needs a same-shape L2 PASS again. After the merge the seat runs the first live dependabot_list and records it on fleet-write: a read-only relay row for the repository's Dependabot alerts #39686.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4

Review requested · Tier H · 2026-12-04T14:35Z. os-zhuang: this PR changes .github/workflows/fleet-write.yml (governed) to add a read-only relay row for the repository's Dependabot alerts, on the maintainer's word 「立卡派发处理 长期办法:让车队中继能读。」 (#39686).

  • Head: 5020068b9578d610f1dcbe84169c881a96d5dadb.
  • Seat record (ACCEPT): 7414559198. Contract review PASS at this head: 7414365435.
  • CI at this head: 33 success, 20 skipped, 0 failed.
  • On approval the seat readies and enqueues it. A head move needs a fresh same-shape PASS.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 4, 2026
@objectstack-fleet
objectstack-fleet Bot requested a review from os-zhuang December 4, 2026 14:36
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security@os-mickey · os-mickey · session_01ASNY8XNef4ywkQio6S9ju4

Maintainer word · 2026-12-04T15:13Z. In the security seat's session, verbatim: 「同意 #39715 落地当前 head 5020068」. Head now: 5020068b9578d610f1dcbe84169c881a96d5dadb (unchanged). The seat lands it once the authorised approval is on record.

@os-zhuang
os-zhuang marked this pull request as ready for review December 4, 2026 23:00
@os-zhuang
os-zhuang added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit c977659 Dec 4, 2026
61 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-39686-dependabot-list branch December 4, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/xl skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fleet-write: a read-only relay row for the repository's Dependabot alerts

3 participants