Skip to content

Security findings no longer show their file, line or reason in PR bodies (GST-3076) - #4486

Merged
capy-ai[bot] merged 5 commits into
mainfrom
security-findings-stay-out-of-pr-bodies
Nov 18, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
security-findings-stay-out-of-pr-bodies

Conversation

@garrytan

@garrytan garrytan commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

A security finding that an owner ruled a note, dispositioned, or that review deferred now shows in a PR body only as an opaque id and "security finding, details recorded privately".
Why: on a public repository the old lines named the file, line and reason of a live exposure outside the PR's change.
Nothing to do: other findings print exactly as before, and the details stay in the private approval record.

What changed
  • Ruled note:, Gate disposition: and the deferred-findings and review-notes sections redact any finding whose category is security, auth, secret or red-team. The /ship record block in the PR body stores the same redacted form.
  • The full approvals table that a private repository's PR body carries redacts a security ruling's row too, so /ship's own body check no longer refuses that body.
  • /ship's final body check and gstack-post refuse text that names a raw path:line:security fingerprint, and both refusals link to docs/troubleshooting.md#security-finding-in-body.
  • Redaction applies on every repository, whatever its visibility. These lines are compared word for word when /ship finishes and when the PR merges, so they can't depend on a visibility lookup that can fail or change. A private repository can also go public with its PR history.
  • gstack-approvals list still shows the full ruling.
Why

A PR body is world-readable on a public repository, so a ruled or deferred security finding printed there pointed readers at a live exposure in code the PR did not change.

Blast radius

Only how security-class findings are printed in PR bodies, approvals tables and posts. Other findings, the private approval record and the review log are unchanged.

Pre-Landing Review

No issues found. The fix for the private-repository approvals table was read again by one reviewer, scoped to that change, who found nothing.

Eval Results

Paid evals were not run for this PR: CI's paid eval slices are skipped on pull requests, and the scheduled release gate on main covers the selected cases.

Issues

Refs p1/red-team#1
Refs p1/specialist-batched#1

Tests
  • Free suite: carried from CI run 44305297353 at this exact tree (1696 test files, 0 failed).
  • bun test test/security-finding-redaction.test.ts test/approval-record.test.ts test/approval-classes.test.ts: all green, none failed.
Agent notes

Agent notes

Documentation

Status: current. Release docs already match the change; no edits were needed.

Scope: 5 commits, 15 committed files (base 44170d6 to 952a4ee), no staged, unstaged or new files. Audited docs/ship-policy.md, docs/troubleshooting.md, ship/sections/pr-body.md.tmpl (and its generated pr-body.md) and the changelog.d fragment against lib/security-findings.ts, ruled-notes, gate-dispositions, review-scope, approval-record, gstack-post and gstack-ship-receipt.

Documentation health:

  • docs/ship-policy.md: current (new security-findings-stay-private section matches the code)
  • docs/troubleshooting.md: current (security-finding-in-body anchor matches the refusal messages)
  • ship/sections/pr-body.md.tmpl and pr-body.md: current (template and generated output agree)
  • changelog.d/security-findings-stay-out-of-pr-bodies.md: current
  • README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md: current (not affected)

Coverage debt: the redacted full approvals table (gstack-approvals render) is covered only by the general "every line gstack renders" wording, with no line of its own, and there is no how-to example of a redacted PR body. Reference and explanation coverage exists in ship-policy and troubleshooting. No architecture diagram drift.

The final body check is gstack-ship-receipt write --body; the receipt's ruled_notes and gate_dispositions hold the redacted form, so the lander's comparison in lib/gate-dispositions.ts still matches the store.

Failing-first: test/security-finding-redaction.test.ts, red on 44170d6, green on this branch. One fixture in test/review-scope.test.ts moved from an auth to a correctness category: that test checks the reviewer's stated Blocks text, and an auth finding now redacts by design.

Review: two full rounds at 94c75f2, then one scoped fix-check of 952a4ee under the round grant recorded in the approvals record, for the second-model trail read's blocker. Fix-check: no findings.

REVIEW_LOOP: passes=0 blocking_found=0 deferred=0 noted=0 fixed=0 scope=frozen unbound=1 ledgers_read=2 fix_checks=1
Gate edits: none detected (GATE_SCAN tagged=0 at 952a4ee)

Approvals

Approved: yes (record r-b8033337608f). The full approval record stays private.
Plan: exempt: bug fix
Plan check: exempt bug fix

{
  "schema_version": 1,
  "pr": 4486,
  "head": "952a4eebd79db0f7c9aa96be30207abf9b9ad413",
  "version": "1.100.0.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1696,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 44305297353,
      "attempt": 1,
      "tree": "498bc0f5a54ee4efccbee7073bc787b26c69b535"
    }
  ],
  "calls": 15,
  "session_kind": "unattended",
  "run": "ship-20261118T122720-952a4ee",
  "head_tree": "498bc0f5a54ee4efccbee7073bc787b26c69b535",
  "product_patch_id": "1f5cbf38efa0854eadbd0c6470b0dc9cdb236752",
  "gstack_version": "1.100.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 117,
    "rules": "1afa38a4be3b5eef",
    "base": "bbf48aa7ef195459afcf7d7840af7073cd050734",
    "registry": "bbf48aa7ef195459afcf7d7840af7073cd050734",
    "gate_scan": {
      "tagged": 0,
      "head": "952a4eebd79db0f7c9aa96be30207abf9b9ad413"
    },
    "reasons": [
      "gate-class",
      "runtime=117"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @498bc0f5a54e (8 checks, current for 952a4eebd79d)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44305297353/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44303750859/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=498bc0f5a54e tests=37817 skipped=104 runs=44305297353/1 profiles=ci-reuse/free-tests heads=952a4eebd79d verified=2026-11-18T12:48:13.173Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CONTRIBUTING.md, AGENTS.md, CLAUDE.md, ship/sections/pr-body.md(.tmpl), changelog.d fragment"
  },
  "review_loop": {
    "passes": 0,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 0,
    "fixed": 0,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 1,
    "ledgers_read": 2,
    "unbound": 1
  },
  "review_round_grants": [
    {
      "kind": "fix-check",
      "head": "94c75f2d609d443fdf166a9347ce0cfed1e9820d",
      "pr": 4486,
      "by": "Captain GStack Minder (GSTA-36)",
      "reason": "Cross-family trail read found that a private repo's full Approvals table prints a security ruling raw, so receipt write refuses the standard /ship body; fix redacts those rows",
      "at": "2026-11-18T12:23:44.952Z",
      "approval": "a-5e5038d0f969",
      "stop_run": "ship-20261118T115408-8fcd64",
      "findings": [
        "trail-read/gpt-6.2-sol#1"
      ]
    }
  ],
  "gate_dispositions": []
}
{"head":"94c75f2d609d443fdf166a9347ce0cfed1e9820d","run":"ship-4486-cc043ec","status":"started","review_loop":{"passes":2,"blocking_found":0,"deferred":0,"noted":1,"fixed":2,"scope":"frozen","rounds":2,"dispatches":{"specialist":6,"red-team":2}}}
{"head":"94c75f2d609d443fdf166a9347ce0cfed1e9820d","run":"ship-20261118T115408-8fcd64","mark":"stop","tree":"18f9b0b84c9e14bce946c63ac52f6d15ba8c25ff"}
{"head":"94c75f2d609d443fdf166a9347ce0cfed1e9820d","run":"ship-20261118T122720-952a4ee","mark":"grant","grant":"a-5e5038d0f969"}

…ies (GST-3076)

A security finding that an owner ruled a note, dispositioned, or that review deferred now shows in a PR body only as an opaque id and "security finding, details recorded privately". On a public repository the old lines named the file, line and reason of a live exposure outside the PR's change. Other findings print as before, and the details stay in the private approval record.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 4 commits November 18, 2026 11:42
…s cannot be spawned directly

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… the template keeps its marker order

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…rity reviewers

Review-Finding: p1/specialist-batched#1 reader=security
Review-Finding: p1/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…n too, so a private repository's /ship body passes its own check

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 0109703 into main Nov 18, 2026
82 checks passed
capy-ai Bot added a commit that referenced this pull request Nov 18, 2026
…#4495)

A policy-floor test assumed gstack's own version stays below the next
minor after the newest policy key. The v1.101 release (#4493) reaches
that number, so its CI fails; the test now checks a floor above both.

Why: this unblocks today's stable release, which carries a security fix
(#4486) and four blocker fixes.

Nothing to do as a reader.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@garrytan garrytan mentioned this pull request Nov 18, 2026
capy-ai Bot added a commit that referenced this pull request Nov 18, 2026
- A test, or a scratch repository in the temp directory, can no longer write approval rows into your real Capy Drive (GST-3027). (#4466)
- An unattended /autoplan run on Claude Code no longer says the publication guard is off while it is on. (#4481)
- A phase report written only in reasoning now gets a denial that says so and names the fix. (#4481)
- `gstack-autoplan revise` no longer refuses a plan that the first `next` accepted. (#4470)
- `revise --plan` with a different file now says the run follows that file. (#4470)
- A second-model plan review in `/autoplan` is no longer reported as unavailable when it actually ran (GST-3051). (#4471)
- The /ship conductor trial plan now lets case reverts that conflict with later code be resolved by hand in docs, tests and the planted file, so large pull requests can be cases (GST-3003). (#4460)
- A locked plan for a trial of /ship without its separate conductor subagent (GST-3003). (#4456)
- A driven /ship now runs each phase as one command, counts its calls, and stops itself at 100 minutes. (#4451)
- /ship stops asking owners to clear two kinds of bookkeeping noise: base-side merge text and a reviewer's confirmation prose. (#4458)
- A base merge that only touched base-side text no longer stops `/ship` finish for an owner's grant. (#4458)
- A reviewer's confirmation prose no longer becomes a Critical finding that only an owner can clear. (#4458)
- A CI run that passed only after its failed jobs were re-run is now marked wherever gstack reuses it. (#4473)
- /ship reuses CI's passing test run when merging the base changed no file, and stops instead of quietly starting hour-long test runs or reviewing an empty diff (GST-3019). (#4461)
- /ship on Codex no longer stops at the test coverage audit. (#4489)
- A cold first-use check before an app build reaches its owner (GST-3025). (#4465)
- `skill_prefix=true` now survives updates when gbrain is installed. (#4454)
- The OpenClaw docs no longer send you to ClawHub, which held only April 2026 builds of office-hours, ceo-review and retro and no longer has gstack skills (the docs also said four skills while listing three). (#4454)
- `gstack-issue-links` no longer reads other repositories' issues as gstack's. (#4454)
- /ship's pre-gate finds the tests of a monorepo app that imports through its own `@/` alias. (#4464)
- /office-hours explains why it recommends a mode. (#4450)
- /office-hours keeps its 34 founder videos and essays out of the skill file. (#4463)
- Two `gstack-owner-answers add` runs for the same answer no longer collide. (#4490)
- A Captain can check an ask against the owner's earlier answers before sending it. (#4467)
- `gstack-post` stops reading /ship's own receipt identifiers as phone numbers, so posting a /ship PR body no longer needs a confirm. (#4488)
- GitHub release notes now list every change in plain words, with a link to its pull request. (#4390)
- gstack's router no longer gives bug reports a special rule, so the model fixes a bug the way it would without gstack. (#4442)
- /ship's review plan now sorts Swift and Xcode files by risk instead of sending every iOS PR to the full review panel (GST-3041). (#4469)
- /ship's review plan now sends Swift code that touches private user data to the full review panel (GST-3052). (#4472)
- A round grant at /ship's review round cap now buys the fix round it names, in the same run or the next (GST-2968). (#4479)
- The secrets check stops flagging three kinds of ordinary code as a secret, and catches two misses. (#4457)
- A security finding's location and reason no longer go into a PR body. (#4486)
- The token-capped /ship child on Claude Code now starts its prompt with the typed `/ship` command, so the skill actually loads. (#4487)
- A /ship receipt now counts the second-model review's blocking findings, and refuses to be written while one is still open. (#4485)
- A `/ship` with a token cap on Claude Code no longer stops at its first handoff. (#4452)
- /ship's push step now always ends with one line that says whether it pushed (GST-3053). (#4474)
- A PR's review-round count can no longer be overwritten by the body `/ship` posts. (#4440)
- One queued record with a malformed path no longer stops artifacts sync for every project. (#4455)
- A failed artifacts push stays reported until a push succeeds. (#4455)
- The /sync-gbrain memory row no longer says OK when pages failed to import. (#4455)
- ### Tests (#4495)
- A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI. (#4495)
- CI now uploads free-suite test results to Trunk with analytics-uploader v2.1.8 and analytics-cli 0.17.0, up from v2.1.6 and 0.16.2. (#4453)
- Packing a checkout for a Ubicloud run no longer fails when git beside it is rewriting a ref. (#4447)
- The /plan-ceo-review HOLD SCOPE eval no longer fails a review because its follow-up question didn't repeat the mode name. (#4447)
- Unattended /autoplan now records the owner's relayed gate reply instead of refusing it. (#4484)
- Unattended /autoplan now runs the second-model review you turned on, and waits for it instead of ending the session. (#4459)
- Two /autoplan runs started in the same second no longer share a run id. (#4459)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant