Skip to content

v1.92.61.0 fix(ship): risk classes cover outbound clients, archives, child_process and metering (GST-850) - #3829

Merged
capy-ai[bot] merged 7 commits into
mainfrom
gst-850-allowlist-docs-paths
Nov 2, 2026
Merged

capy-ai[bot] merged 7 commits into
mainfrom
gst-850-allowlist-docs-paths

Conversation

@garrytan

@garrytan garrytan commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3829,
  "head": "1ec2f430d46b63691de0826118f46b1c19954bfd",
  "version": "1.92.47.0",
  "base": "main",
  "spend_usd": 251,
  "session_kind": "unattended",
  "run": "GSTA-167/37",
  "thread": "GSTA-167",
  "head_tree": "76acecd8c8b2cf1f2481f11ee7c939d4eba43700",
  "product_patch_id": "2bab90506115f1b5b3a28eb62532f29b2d24b5d1",
  "gstack_version": "1.92.47.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 96,
    "rules": "551486253e156572",
    "base": "a563f476793b61edbb064b853d52cb125a1996c4",
    "registry": "a563f476793b61edbb064b853d52cb125a1996c4",
    "gate_scan": {
      "tagged": 0,
      "head": "1ec2f430d46b63691de0826118f46b1c19954bfd"
    },
    "reasons": [
      "gate-class",
      "risk:money",
      "risk:security",
      "runtime=96"
    ],
    "risk": [
      "money",
      "security"
    ]
  },
  "pregate": "requires-remote cleared @76acecd8c8b2 (1 checks, current for 1ec2f430d46b)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41375585694",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/41375585725",
    "pregate.json/remote_gate: remote-gate tree=76acecd8c8b2 tests=8335"
  ],
  "docs": {
    "status": "updated",
    "scope": "docs/review-policy.md, changelog.d/gst-850-allowlist-docs-paths.md"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 13,
    "deferred": 1,
    "noted": 11,
    "fixed": 12,
    "scope": "in-diff",
    "fix_checks": 1,
    "rounds": 3
  },
  "review_loop_exception": {
    "accepted_by": "GStack Minder (GSTA-36)",
    "date": "2026-11-02",
    "via": "GSTA-36 message to GSTA-167",
    "reason": "Round 1 at e664d8f1, round 2 at c1eea4cd, scoped fix-check at 41f16128. The outside voice's findings from both rounds were real and were fixed. The round-2 ledger reads dirty only because the outside voice was refused for the wrong tree (GST-897), so the judged set could not be certified. Granted by GStack Minder (GSTA-36) 2026-11-02.",
    "fix_check": {
      "head": "41f16128b38f7a6c3673c465ad503457bfbb078f",
      "findings": 1
    }
  },
  "review_targeted": {
    "classes": [
      "money"
    ],
    "rules": "c82addff6fb60fa0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "2bab90506115f1b5b3a28eb62532f29b2d24b5d1",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}

GST-850: the security class now covers outbound HTTP clients, archive extraction, path traversal and every child_process import, and the money class covers metering and charge code (gbrain-evals #289). UI text and SVGs stay code: the allowlist docs paths were built and then dropped for review cost.

What changed

  • Security (lib/review-risk.ts): coarse rules that parse no import clause and no call arguments.
    • Any changed line that names child_process or node:child_process, in any spelling.
    • Any call to an outbound HTTP client (fetch, http(s).get or .request, axios, got, undici, requests, httpx, urllib). A literal URL gets no exemption.
    • new URL from input, redirect toggles, proxy settings and host allowlists.
    • tar, zip and unzip extraction, path.join or resolve on request or entry input, and '..' checks.
    • A bare exec( call.
  • Money: meter, metering, metered, charge, charged, billable, billed and credits in a path or on a line. Pairs also count: usage beside a token or cost word, proxy beside billing, and a client beside a cost or charge word. "costume", a CLI's usage text and a plain proxy don't count.
  • Write-ups: when a diff publishes numbers, the batched specialist's diff keeps the write-up's text files.
  • Collector: records the files a diff creates. Nothing reads this yet; the Captain asked to keep it.
  • RISK_RULES hashes every new pattern, and DEPTH_RULES folds it in. A temp-copy test proves the hash changes when a pattern does.
  • Pins in test/review-packets-removed.test.ts are repinned under the new GST-850 replay id.

Before / after

Fixture main (35a676f) this branch
New clean chart SVG; 9 locale value edits code, light code, light (unchanged; the allowlist was dropped)
34 SVG bypass rows and 23 text and locale bypass rows code code
child_process spellings (named, default, namespace, split-line, require, dynamic import, type-first) no class security, full
Outbound clients (literal URL included), redirects, proxies, allowlists, archives, traversal no class security, full
gbrain-evals #289 (metering proxy and particle billing clients) targeted none money
costume, CLI printUsage, a plain proxyTarget, docs/usage.md no class no class
A write-up that publishes numbers, plus code batched diff excludes the .md batched diff reads the .md

Proof

  • Failing first: at the first build, 53 of the new routing rows failed on origin/main 35a676f (failing-first.txt). The security and money rows still fail on main. The allowlist rows were later turned around to assert code.
  • Linear time: every rule GST-850 adds finishes in under 100 ms on 200,000-character hostile lines (test/review-risk-linear.test.ts), including its anchor followed by a long run of the characters it repeats, and the minified import a, { line.
  • No-loss replay (main's lib vs this branch's lib, same inputs, gate scan 0 in both arms):
    • On the 26 GSTA-167 no-loss units, read from GitHub compare diffs, no unit loses a reviewer role. Six change their plan, five of them by gaining a risk class.
    • Over the last 100 main commits, 3 move from light to full, and no commit with a gate or risk class drops depth.
  • Replay gap: the replay checked which reviewers get dispatched. It did not re-score R51's saved findings, whose data lives on another machine. No role is dropped, so no saved blocker can be lost by routing, but the findings themselves weren't re-scored.

Review

Full panel, at most 2 rounds plus one Captain-granted scoped fix-check.

  • Round 1 (e664d8f): batched, red-team, adversarial-native, gpt-6.1-sol outside voice and targeted. They found bypasses in both allowlists and a quadratic import scan, all fixed in round 1.
  • Captain choice A: drop the allowlist docs paths.
  • Round 2 (c1eea4c): a full pass on the range, a fresh outside voice and targeted. The outside voice found 3 blockers in the parsing rules.
  • Captain choice B+: replace them with the coarse rules above.
  • Scoped fix-check (41f1612): one CRITICAL in R51's existing rm rule, which predates this PR (see Known issues).
  • Captain choice B: leave the R51 rule alone and narrow the docs claim.
  • Targeted (money) was clean in both rounds.
  • In both rounds the outside voice's reply lacked REVIEWED_TREE, so collect refused it (COLLECT_WRONG_TREE). Its findings were verified and acted on. The tooling bug is filed separately.

Dropped for review cost

The allowlist docs paths (a new presentational SVG as docs, a locale value edit as docs) were built in lib/review-allowlist.ts and removed under Captain choice A. A future plan should start from these bypasses, all of which are test rows that class as code:

  • R51 rounds: string-concat HTML; i18n .ts; edits inside an existing <script>; multi-line SVG attributes; namespaced <s:script>; Vue and Alpine bindings (:title, v-bind:, x-bind:, @click); exponential backtracking in the resource regex.
  • GST-850 round 1:
    • A locale-allowlisted path skipped the risk scan (command: rm -rf under src/i18n/).
    • Any YAML or .properties file under a locale, lang or i18n directory was admitted (roles/locale/tasks/main.yml, resources/lang/app.properties, tools/lang/rules.json).
    • A plain <script>, an uppercase SCRIPT, an onclick handler and a multi-line onload in SVG.
    • HTML closes <!--> and <!---> early, so a script after them was live.
    • Escaped java\nscript:, protocol-relative //host, {{…}} in SVG attributes and numeric references spelling {{ all got through.
    • YAML null and false counted as string edits; gettext %(name)s wasn't checked as a placeholder.
    • A key moved between parents passed as a value edit.

Below-floor notes

  • An added exec, or exec as run, binding inside an existing multi-line child_process import is not flagged when the import's from line is unchanged. A changed exec( call line still is.
  • The client rules fail wide: requests.push(…) on a JS variable, or a comment that only names axios or undici, routes the diff to security. The cost is extra review; nothing is missed.

Known issues

  • GST-898: R51's rm rule /\brm\s+-(?:[a-z]*r[a-z]*f|[a-z]*f[a-z]*r)\b/ is quadratic on rm - followed by a run of rs (100k characters take 3.2 s). It is on main since v1.92.45.0 and isn't changed here. The linear-time claim in docs/review-policy.md covers only the rules GST-850 adds.

Rule 25

Trial merges at 1ec2f43 with --no-commit against #3698 (0003d49), #3826 (76ec425) and #3798 (38f1619) are all clean.

Security read

No network calls, environment reads, permission changes, workflow, setup or install edits, and no new dependencies. The #289 fixture holds changed lines from garrytan/gbrain-evals#289, read as text through gh pr diff. No gbrain-evals code was checked out or run.

Approvals

  • Captain (GSTA-36), 2026-11-01: ruled GST-850 a bug fix (no /autoplan); Rails config/locales stays code; chose A (drop the allowlist), then B+ (coarse rules) with one scoped fix-check, then B (leave R51's rule, file GST-898).
    Review-loop exception: accepted by GStack Minder (GSTA-36) 2026-11-02 via GSTA-36 message to GSTA-167: Round 1 at e664d8f, round 2 at c1eea4c, scoped fix-check at 41f1612. The outside voice's findings from both rounds were real and were fixed. The round-2 ledger reads dirty only because the outside voice was refused for the wrong tree (GST-897), so the judged set could not be certified. Granted by GStack Minder (GSTA-36) 2026-11-02. (fix-check at 41f1612, 1 finding)

garrytan and others added 6 commits November 2, 2026 00:28
…ot yet repinned; review pending)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…he GST-850 no-loss replay

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…erpolation, escapes, YAML types, linear import scan)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ay code); repin under GST-850

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…any outbound client call), drop stale docs paragraph; repin

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…hor-run inputs for every new pattern

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

trunk-io Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions github-actions Bot changed the title fix(ship): risk classes cover outbound clients, archives, child_process and metering (GST-850) v1.92.61.0 fix(ship): risk classes cover outbound clients, archives, child_process and metering (GST-850) Nov 2, 2026
@capy-ai
capy-ai Bot merged commit dd9834d into main Nov 2, 2026
55 checks passed
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