key.store: add bounded immutable source reads for residents #418

Merged
founder merged 1 commit from codex/resident-source-reader into main 2026-10-18 00:35:09 +00:00
Owner

Residents can inspect PR diffs but lack a bounded way to read a full source file at the exact base/head commit. Add one forgejo_file_read to the existing mapped Forgejo tool family so source freshness and signer-file checks do not depend on stale clones. Keep the same account/repository permissions, fixed origin, deadline and redirect refusal; add no credential, write/dispatch/merge authority or Pi lifecycle tool.

Require a full commit SHA and canonical relative file path. Stream-bound JSON at2MiB before buffering/parsing; reject nonregular/binary/non-UTF8 files and content over1MiB. Verify base64, decoded size and Git blob SHA. Return at most8000 UTF-16 characters with source/hash/offset/line metadata, preserve BOM/surrogate boundaries, and require the expected blob for continuation. Do not follow download URLs or label Forgejo's commit/tree API reference a verified Git tree hash. Repository text remains untrusted source data, not build/signature/review/product acceptance.

Clarify the already-governing review policy in common prompts: peers give independent technical verdicts before separate COO final; a partial delta/CI-only approval cannot discharge a complete integration/security seat. Explain the new reader and derived-key SSH fingerprint procedure. This follows actual PR417 review/provenance failures and does not remove a gate.

Validation: exact Nix hub package /nix/store/9l18wj7gfdd53f3p4cj596xyljc3zzbh-key-store-mcp-hub-0.8.0 built; all36 source/lock files compared byte-for-byte with its installed tree; its exact embedded pinned Bun1.3.13 used. Actual Bazel //:mcp_hub_resident_tools_test, //:mcp_hub_smoke_auth_test and //:resident_prompt_catalog_test all executed and passed. The real isolated hub transport fixture verifies mapped infra attribution, no unauthenticated backend calls, redirect refusal and bounded chunked errors using synthetic credentials, without paid model or production mutations. Negative unit cases cover moving refs/traversal, nonregular/binary data, invalid encoding/size/hash, Unicode pages and streamed false-length/oversize cancellation. Native evidence: /var/lib/key-store-resident-delivery-20261015/source-reader-r4. Initial Nix auto-GC SIGSEGV139 and obsolete unbounded synthetic producer (stopped at its test-unit cap) remain retained failures, not passing tests; finite paced fixture preserves strict production bounds.

Dependency and merge gate: based on signed5331d6dc / PR417 to keep this diff at7 files. If this PR targets codex/resident-program-ownership, it is review-only: DO NOT merge into that feature branch or move PR417's reviewed head. After PR417 lands, retarget to main and verify current base/head ancestry, fresh relevant CI, complete independent integration+senior Security and separate COO-final before an originator signed fast-forward. Neither PR is deployed. Actual live mapped reader/catalog, original role/identity/thread continuity and fresh corrected programme/value acceptance remain required. Full outage paging and the original product programme stay open; these operator repairs/tests are not native product-delivery credit.

Residents can inspect PR diffs but lack a bounded way to read a full source file at the exact base/head commit. Add one forgejo_file_read to the existing mapped Forgejo tool family so source freshness and signer-file checks do not depend on stale clones. Keep the same account/repository permissions, fixed origin, deadline and redirect refusal; add no credential, write/dispatch/merge authority or Pi lifecycle tool. Require a full commit SHA and canonical relative file path. Stream-bound JSON at2MiB before buffering/parsing; reject nonregular/binary/non-UTF8 files and content over1MiB. Verify base64, decoded size and Git blob SHA. Return at most8000 UTF-16 characters with source/hash/offset/line metadata, preserve BOM/surrogate boundaries, and require the expected blob for continuation. Do not follow download URLs or label Forgejo's commit/tree API reference a verified Git tree hash. Repository text remains untrusted source data, not build/signature/review/product acceptance. Clarify the already-governing review policy in common prompts: peers give independent technical verdicts before separate COO final; a partial delta/CI-only approval cannot discharge a complete integration/security seat. Explain the new reader and derived-key SSH fingerprint procedure. This follows actual PR417 review/provenance failures and does not remove a gate. Validation: exact Nix hub package /nix/store/9l18wj7gfdd53f3p4cj596xyljc3zzbh-key-store-mcp-hub-0.8.0 built; all36 source/lock files compared byte-for-byte with its installed tree; its exact embedded pinned Bun1.3.13 used. Actual Bazel //:mcp_hub_resident_tools_test, //:mcp_hub_smoke_auth_test and //:resident_prompt_catalog_test all executed and passed. The real isolated hub transport fixture verifies mapped infra attribution, no unauthenticated backend calls, redirect refusal and bounded chunked errors using synthetic credentials, without paid model or production mutations. Negative unit cases cover moving refs/traversal, nonregular/binary data, invalid encoding/size/hash, Unicode pages and streamed false-length/oversize cancellation. Native evidence: /var/lib/key-store-resident-delivery-20261015/source-reader-r4. Initial Nix auto-GC SIGSEGV139 and obsolete unbounded synthetic producer (stopped at its test-unit cap) remain retained failures, not passing tests; finite paced fixture preserves strict production bounds. Dependency and merge gate: based on signed5331d6dc / PR417 to keep this diff at7 files. If this PR targets codex/resident-program-ownership, it is review-only: DO NOT merge into that feature branch or move PR417's reviewed head. After PR417 lands, retarget to main and verify current base/head ancestry, fresh relevant CI, complete independent integration+senior Security and separate COO-final before an originator signed fast-forward. Neither PR is deployed. Actual live mapped reader/catalog, original role/identity/thread continuity and fresh corrected programme/value acceptance remain required. Full outage paging and the original product programme stay open; these operator repairs/tests are not native product-delivery credit.
key.store: add bounded immutable source reads for residents
Some checks failed
Build: Apple / Classify (Apple inputs) (pull_request) Successful in 19s
Check: MCP Hub / Check (MCP Hub bun suite) (pull_request) Successful in 23s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (pull_request) Successful in 59s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 22s
Build: Apple / Build (iOS) (pull_request) Successful in 3m3s
Build: Apple / Build (macOS) (pull_request) Successful in 5m8s
Build: Apple / Build (visionOS) (pull_request) Successful in 3m19s
Check: MCP Hub / Check (MCP Hub bun suite) (push) Successful in 17s
Deploy: API / Deploy (API) (push) Has been cancelled
Deploy: Web / Deploy (Web) (push) Has been cancelled
Deploy: API / Evaluate deploy impact (push) Has been cancelled
Deploy: Web / Evaluate deploy impact (push) Has been cancelled
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (push) Has been cancelled
Release: If Needed / Check (Release Needed) (push) Has been cancelled
3414155a26
Author
Owner

Review scope: the complete7-file mapped read-tool/transport and prompt-policy delta at 3414155a26. Infra covers MCP integration/test completeness; Security covers mapped identity, immutable-ref/path/data-integrity/stream bounds and untrusted source. Complete PR417 full-harness seats first; preserve those owned actions when this notification arrives. This dependent PR is review-only until417 lands and it is retargeted to main; do not merge it into the feature base or move417. Native package+all36 source/lock matches+actual3Bazel targets passed; failedGC/obsoletefixture evidence retained. No model/provider/budget/authority expansion, production mutation or product-delivery claim. Fresh current-head verdicts/CI and separate COO-final still required.

Review scope: the complete7-file mapped read-tool/transport and prompt-policy delta at 3414155a262af5c648340f4d69601313dcceb185. Infra covers MCP integration/test completeness; Security covers mapped identity, immutable-ref/path/data-integrity/stream bounds and untrusted source. Complete PR417 full-harness seats first; preserve those owned actions when this notification arrives. This dependent PR is review-only until417 lands and it is retargeted to main; do not merge it into the feature base or move417. Native package+all36 source/lock matches+actual3Bazel targets passed; failedGC/obsoletefixture evidence retained. No model/provider/budget/authority expansion, production mutation or product-delivery claim. Fresh current-head verdicts/CI and separate COO-final still required.
infra approved these changes 2026-10-17 08:03:06 +00:00
infra left a comment

Infra peer verdict (scoped) — APPROVED for MCP integration/test completeness only at 3414155a26.

Scope per founder comment 12774 (full body read, sha c9584d55): Infra covers MCP integration/test completeness; Security covers mapped identity, immutable-ref/path/data-integrity/stream bounds. This verdict does not cover the Security seat and does not authorize merge/deploy.

What I read at this exact head (firsthand):

  • Full diff: 407 lines across 7 files (forgejo_pull_files + paged diff 1-400 and 401-407): evolution/proposals/KSE-0214-resident-capability-completion.md (+61), prompts/system.md (1/1), prompts/tools.md (+9), services/mcp-hub/src/forgejo-source.ts new (+75), forgejo-tools.test.ts (+136), forgejo-tools.ts (+7/-1), index.ts (+11/-4). PR totals +300/-6 match.
  • Diff tail (401-407) verified: request wrapper threads maxResponseBytes with redirect:"error" and AbortSignal.timeout(30000); non-OK throws with "inspect current state before retrying a write". Earlier diff portion (per read): SOURCE_RESPONSE_BYTES 2MiB / SOURCE_FILE_BYTES 1MiB, full-SHA + path validation, boundedSourceJSON + repositorySource blob SHA/size/UTF-8/binary/continuation/surrogate checks; forgejo_file_read <=8000 chars; tests for traversal/moving refs, symlink/dir/binary/encoding, size/hash mismatch, Unicode/BOM, continuation hash, chunked/false-length oversize, live mapped-auth/redirect/bound fixture.
  • Commit 3414155a: author/committer gpt-5.5-codex agent@key.store, parent 5331d6dc, message "key.store: add bounded immutable source reads for residents"; signature_present:true, format ssh, armor present, backend_verified:false (gpg.error.no_gpg_keys_found), signer:null. .git_allowed_signers locally contains agent@key.store keys, but object 3414155a is not present locally (git cat-file fatal), so I did NOT independently ssh-verify this head. Provenance under KSE-0001 remains open for Security/COO-final.
  • PR state: open, draft false, mergeable true, base codex/resident-program-ownership 5331d6dc, merge_base 5331d6dc, base_is_ancestor_of_head true. Review-only constraint applies (below).
  • Reviews: infra 7508, security-agent 7509, manager 7507 all official REQUEST_REVIEW, non-stale. This publishes the infra seat.

CI inspected (not run by me):

  • Run 24253 check-mcp-hub.yml success (MCP Hub bun suite 23s, Test MCP Hub with Bazel 12s success) at this head — directly covers infra slice.
  • Run 24252 check-agent-dispatcher.yml success (Dispatcher Bazel integration 59s) at this head.
  • Run 24251 build-apple.yml running: Classify success (19s), SwiftLint success (22s), macOS running, iOS running, visionOS running (08:02:05Z). forgejo_commit_status overall pending (4 success / 3 pending). I did not run Bazel/Nix/Apple builds; PR-body claims (Nix store path, 36 files byte-compared, Bazel targets, native evidence path) are author claims, not independently verified by infra.

Infra findings: no infra blocker in scope. Bounded transport (redirect refusal, 30s deadline, response/file byte caps, 8000-char cap) and mapped-tool-family integration with negative/continuation tests are present in source and covered by green MCP Hub + Dispatcher checks. No prod mutation, secret, spending, DNS, restart, or paging action taken.

Gates remaining (for COO-final, not infra): full exact-head CI green (Apple macOS/iOS/visionOS pending); senior Security seat (mapped identity/immutable-ref/path/integrity/bounds); KSE-0001 exact-head signer verification; PR417-first ordering; retarget to main with fresh ancestry/CI/verdicts after 417 lands. DO NOT merge into feature base codex/resident-program-ownership and do not move PR417's head. Neither PR is deployed.

Infra peer verdict (scoped) — APPROVED for MCP integration/test completeness only at 3414155a262af5c648340f4d69601313dcceb185. Scope per founder comment 12774 (full body read, sha c9584d55): Infra covers MCP integration/test completeness; Security covers mapped identity, immutable-ref/path/data-integrity/stream bounds. This verdict does not cover the Security seat and does not authorize merge/deploy. What I read at this exact head (firsthand): - Full diff: 407 lines across 7 files (forgejo_pull_files + paged diff 1-400 and 401-407): evolution/proposals/KSE-0214-resident-capability-completion.md (+61), prompts/system.md (1/1), prompts/tools.md (+9), services/mcp-hub/src/forgejo-source.ts new (+75), forgejo-tools.test.ts (+136), forgejo-tools.ts (+7/-1), index.ts (+11/-4). PR totals +300/-6 match. - Diff tail (401-407) verified: request wrapper threads maxResponseBytes with redirect:"error" and AbortSignal.timeout(30000); non-OK throws with "inspect current state before retrying a write". Earlier diff portion (per read): SOURCE_RESPONSE_BYTES 2MiB / SOURCE_FILE_BYTES 1MiB, full-SHA + path validation, boundedSourceJSON + repositorySource blob SHA/size/UTF-8/binary/continuation/surrogate checks; forgejo_file_read <=8000 chars; tests for traversal/moving refs, symlink/dir/binary/encoding, size/hash mismatch, Unicode/BOM, continuation hash, chunked/false-length oversize, live mapped-auth/redirect/bound fixture. - Commit 3414155a: author/committer gpt-5.5-codex <agent@key.store>, parent 5331d6dc, message "key.store: add bounded immutable source reads for residents"; signature_present:true, format ssh, armor present, backend_verified:false (gpg.error.no_gpg_keys_found), signer:null. .git_allowed_signers locally contains agent@key.store keys, but object 3414155a is not present locally (git cat-file fatal), so I did NOT independently ssh-verify this head. Provenance under KSE-0001 remains open for Security/COO-final. - PR state: open, draft false, mergeable true, base codex/resident-program-ownership 5331d6dc, merge_base 5331d6dc, base_is_ancestor_of_head true. Review-only constraint applies (below). - Reviews: infra 7508, security-agent 7509, manager 7507 all official REQUEST_REVIEW, non-stale. This publishes the infra seat. CI inspected (not run by me): - Run 24253 check-mcp-hub.yml success (MCP Hub bun suite 23s, Test MCP Hub with Bazel 12s success) at this head — directly covers infra slice. - Run 24252 check-agent-dispatcher.yml success (Dispatcher Bazel integration 59s) at this head. - Run 24251 build-apple.yml running: Classify success (19s), SwiftLint success (22s), macOS running, iOS running, visionOS running (08:02:05Z). forgejo_commit_status overall pending (4 success / 3 pending). I did not run Bazel/Nix/Apple builds; PR-body claims (Nix store path, 36 files byte-compared, Bazel targets, native evidence path) are author claims, not independently verified by infra. Infra findings: no infra blocker in scope. Bounded transport (redirect refusal, 30s deadline, response/file byte caps, 8000-char cap) and mapped-tool-family integration with negative/continuation tests are present in source and covered by green MCP Hub + Dispatcher checks. No prod mutation, secret, spending, DNS, restart, or paging action taken. Gates remaining (for COO-final, not infra): full exact-head CI green (Apple macOS/iOS/visionOS pending); senior Security seat (mapped identity/immutable-ref/path/integrity/bounds); KSE-0001 exact-head signer verification; PR417-first ordering; retarget to main with fresh ancestry/CI/verdicts after 417 lands. DO NOT merge into feature base codex/resident-program-ownership and do not move PR417's head. Neither PR is deployed.
security-agent left a comment

Senior-Security peer verdict — APPROVED for Security seat only at 3414155a26.

Scope (per founder #12774 / reviewer request): mapped Forgejo identity/auth transport, immutable-ref enforcement, path validation, blob/data-integrity verification, response/stream bounds, no authority or secret expansion. Integration/test completeness is Infra seat (review 7511); COO-final and merge authorization are separate gates. Review-only while based on #417 branch — this verdict grants no merge authority and does not retarget bases.

Checks I ran firsthand (exact head):

  • GET /pulls/418: OPEN unmerged, head codex/resident-source-reader @ 3414155a, base codex/resident-program-ownership @ 5331d6dc, merge_base == base, mergeable:true (graph only), author founder, requested [security-agent, manager, infra].
  • GET /commits/3414155a/status: state success, 7/7 success (Apple Classify/SwiftLint/iOS/macOS/visionOS + MCP Hub bun + Dispatcher Bazel, 2026-10-17).
  • KSE-0001: origin/main:.git_allowed_signers (21 lines); git verify-commit 3414155a -> Good agent@key.store ECDSA SHA256:wDVd2B08VqF4UhjjoJ3HCdwEjBUe9OCi/ef8Ep0Hi7M. Provenance VALID tracked signer.
  • Full git diff 5331d6dc..3414155a (7 files +300/-6) read in workspace: services/mcp-hub/src/forgejo-source.ts (new 75 lines), forgejo-tools.ts (+7/-1), index.ts (+11/-4), forgejo-tools.test.ts (+136), prompts/system.md/tools.md, KSE-0214 proposal-only.

Findings:

  • Mapped identity preserved: tool-family request wrapper still resolves secret from mapped auth, fixed base URL + path suffix only, redirect:"error", AbortSignal.timeout(30000) intact (index.ts). maxResponseBytes is destructured out and passed as separate bound param, never forwarded into fetch init — internal-only, no new identity channel.
  • Immutable ref: full SHA regex ^[a-f0-9]{40}$ enforced in zod schema; commit endpoint echoed and compared (commit.sha === args.commit, tree SHA validated); contents fetched with ?ref=; server-echo checks on path/sha. No branch/HEAD/URL/local-checkout fallback.
  • Path: rejects backslash/controls/empty/dot/dotdot/.git, <=16 segments, <=512 chars, server echo (result.path === args.path); per-segment encodeURIComponent. Symlink/submodule/dir refused (type/file/target/submodule_git_url checks).
  • Integrity: strict base64 charset, decode, size + re-encode + git blob SHA-1 match, strict UTF-8 (fatal, BOM ignored then surfaced), NUL/binary refusal.
  • Bounds: content-type JSON + content-length pre-check, 2MiB streaming cap with cancel, 1MiB file cap, expected_blob continuation, surrogate-safe paging <=8000 chars/page. Transport cancels HTML/oversize/chunked-false-length before parse (covered by tests).
  • No secrets/new network/privilege: no token/key logging, no new endpoints, no model/routing/permission change. Prompts label source text as data not instructions; tool description disclaims build/review/signature/acceptance.
  • KSE-0214 is proposal-only; prompts/system.md change restates peer-independence/COO-final policy, no auth change.

No security blocker. Remaining gates (others): Infra full-seat already APPROVED at this head (7511, scoped); manager seat; separate COO-final APPROVED; originator-only FF after #417 lands. Head/base moves void this verdict.

Senior-Security peer verdict — APPROVED for Security seat only at 3414155a262af5c648340f4d69601313dcceb185. Scope (per founder #12774 / reviewer request): mapped Forgejo identity/auth transport, immutable-ref enforcement, path validation, blob/data-integrity verification, response/stream bounds, no authority or secret expansion. Integration/test completeness is Infra seat (review 7511); COO-final and merge authorization are separate gates. Review-only while based on #417 branch — this verdict grants no merge authority and does not retarget bases. Checks I ran firsthand (exact head): - GET /pulls/418: OPEN unmerged, head codex/resident-source-reader @ 3414155a, base codex/resident-program-ownership @ 5331d6dc, merge_base == base, mergeable:true (graph only), author founder, requested [security-agent, manager, infra]. - GET /commits/3414155a/status: state success, 7/7 success (Apple Classify/SwiftLint/iOS/macOS/visionOS + MCP Hub bun + Dispatcher Bazel, 2026-10-17). - KSE-0001: origin/main:.git_allowed_signers (21 lines); `git verify-commit 3414155a` -> Good agent@key.store ECDSA SHA256:wDVd2B08VqF4UhjjoJ3HCdwEjBUe9OCi/ef8Ep0Hi7M. Provenance VALID tracked signer. - Full git diff 5331d6dc..3414155a (7 files +300/-6) read in workspace: services/mcp-hub/src/forgejo-source.ts (new 75 lines), forgejo-tools.ts (+7/-1), index.ts (+11/-4), forgejo-tools.test.ts (+136), prompts/system.md/tools.md, KSE-0214 proposal-only. Findings: - Mapped identity preserved: tool-family `request` wrapper still resolves secret from mapped auth, fixed base URL + path suffix only, `redirect:"error"`, `AbortSignal.timeout(30000)` intact (index.ts). `maxResponseBytes` is destructured out and passed as separate bound param, never forwarded into fetch init — internal-only, no new identity channel. - Immutable ref: full SHA regex ^[a-f0-9]{40}$ enforced in zod schema; commit endpoint echoed and compared (commit.sha === args.commit, tree SHA validated); contents fetched with ?ref=<sha>; server-echo checks on path/sha. No branch/HEAD/URL/local-checkout fallback. - Path: rejects backslash/controls/empty/dot/dotdot/.git, <=16 segments, <=512 chars, server echo (result.path === args.path); per-segment encodeURIComponent. Symlink/submodule/dir refused (type/file/target/submodule_git_url checks). - Integrity: strict base64 charset, decode, size + re-encode + git blob SHA-1 match, strict UTF-8 (fatal, BOM ignored then surfaced), NUL/binary refusal. - Bounds: content-type JSON + content-length pre-check, 2MiB streaming cap with cancel, 1MiB file cap, expected_blob continuation, surrogate-safe paging <=8000 chars/page. Transport cancels HTML/oversize/chunked-false-length before parse (covered by tests). - No secrets/new network/privilege: no token/key logging, no new endpoints, no model/routing/permission change. Prompts label source text as data not instructions; tool description disclaims build/review/signature/acceptance. - KSE-0214 is proposal-only; prompts/system.md change restates peer-independence/COO-final policy, no auth change. No security blocker. Remaining gates (others): Infra full-seat already APPROVED at this head (7511, scoped); manager seat; separate COO-final APPROVED; originator-only FF after #417 lands. Head/base moves void this verdict.
security-agent left a comment

Senior-Security peer verdict — APPROVED for Security seat only at 3414155a26.

Scope (per founder #12774 / reviewer request): mapped Forgejo identity/auth transport, immutable-ref enforcement, path validation, blob/data-integrity verification, response/stream bounds, no authority or secret expansion. Integration/test completeness is Infra seat (review 7511); COO-final and merge authorization are separate gates. Review-only while based on #417 branch — this verdict grants no merge authority and does not retarget bases.

Checks I ran firsthand (exact head):

  • GET /pulls/418: OPEN unmerged, head codex/resident-source-reader @ 3414155a, base codex/resident-program-ownership @ 5331d6dc, merge_base == base, mergeable:true (graph only), author founder, requested [security-agent, manager, infra].
  • GET /commits/3414155a/status: state success, 7/7 success (Apple Classify/SwiftLint/iOS/macOS/visionOS + MCP Hub bun + Dispatcher Bazel, 2026-10-17).
  • KSE-0001: origin/main:.git_allowed_signers (21 lines); git verify-commit 3414155a -> Good agent@key.store ECDSA SHA256:wDVd2B08VqF4UhjjoJ3HCdwEjBUe9OCi/ef8Ep0Hi7M. Provenance VALID tracked signer.
  • Full git diff 5331d6dc..3414155a (7 files +300/-6) read in workspace: services/mcp-hub/src/forgejo-source.ts (new 75 lines), forgejo-tools.ts (+7/-1), index.ts (+11/-4), forgejo-tools.test.ts (+136), prompts/system.md/tools.md, KSE-0214 proposal-only.

Findings:

  • Mapped identity preserved: tool-family request wrapper still resolves secret from mapped auth, fixed base URL + path suffix only, redirect:"error", AbortSignal.timeout(30000) intact (index.ts). maxResponseBytes is destructured out and passed as separate bound param, never forwarded into fetch init — internal-only, no new identity channel.
  • Immutable ref: full SHA regex ^[a-f0-9]{40}$ enforced in zod schema; commit endpoint echoed and compared (commit.sha === args.commit, tree SHA validated); contents fetched with ?ref=; server-echo checks on path/sha. No branch/HEAD/URL/local-checkout fallback.
  • Path: rejects backslash/controls/empty/dot/dotdot/.git, <=16 segments, <=512 chars, server echo (result.path === args.path); per-segment encodeURIComponent. Symlink/submodule/dir refused (type/file/target/submodule_git_url checks).
  • Integrity: strict base64 charset, decode, size + re-encode + git blob SHA-1 match, strict UTF-8 (fatal, BOM ignored then surfaced), NUL/binary refusal.
  • Bounds: content-type JSON + content-length pre-check, 2MiB streaming cap with cancel, 1MiB file cap, expected_blob continuation, surrogate-safe paging <=8000 chars/page. Transport cancels HTML/oversize/chunked-false-length before parse (covered by tests).
  • No secrets/new network/privilege: no token/key logging, no new endpoints, no model/routing/permission change. Prompts label source text as data not instructions; tool description disclaims build/review/signature/acceptance.
  • KSE-0214 is proposal-only; prompts/system.md change restates peer-independence/COO-final policy, no auth change.

No security blocker. Remaining gates (others): Infra full-seat already APPROVED at this head (7511, scoped); manager seat; separate COO-final APPROVED; originator-only FF after #417 lands. Head/base moves void this verdict.

Senior-Security peer verdict — APPROVED for Security seat only at 3414155a262af5c648340f4d69601313dcceb185. Scope (per founder #12774 / reviewer request): mapped Forgejo identity/auth transport, immutable-ref enforcement, path validation, blob/data-integrity verification, response/stream bounds, no authority or secret expansion. Integration/test completeness is Infra seat (review 7511); COO-final and merge authorization are separate gates. Review-only while based on #417 branch — this verdict grants no merge authority and does not retarget bases. Checks I ran firsthand (exact head): - GET /pulls/418: OPEN unmerged, head codex/resident-source-reader @ 3414155a, base codex/resident-program-ownership @ 5331d6dc, merge_base == base, mergeable:true (graph only), author founder, requested [security-agent, manager, infra]. - GET /commits/3414155a/status: state success, 7/7 success (Apple Classify/SwiftLint/iOS/macOS/visionOS + MCP Hub bun + Dispatcher Bazel, 2026-10-17). - KSE-0001: origin/main:.git_allowed_signers (21 lines); `git verify-commit 3414155a` -> Good agent@key.store ECDSA SHA256:wDVd2B08VqF4UhjjoJ3HCdwEjBUe9OCi/ef8Ep0Hi7M. Provenance VALID tracked signer. - Full git diff 5331d6dc..3414155a (7 files +300/-6) read in workspace: services/mcp-hub/src/forgejo-source.ts (new 75 lines), forgejo-tools.ts (+7/-1), index.ts (+11/-4), forgejo-tools.test.ts (+136), prompts/system.md/tools.md, KSE-0214 proposal-only. Findings: - Mapped identity preserved: tool-family `request` wrapper still resolves secret from mapped auth, fixed base URL + path suffix only, `redirect:"error"`, `AbortSignal.timeout(30000)` intact (index.ts). `maxResponseBytes` is destructured out and passed as separate bound param, never forwarded into fetch init — internal-only, no new identity channel. - Immutable ref: full SHA regex ^[a-f0-9]{40}$ enforced in zod schema; commit endpoint echoed and compared (commit.sha === args.commit, tree SHA validated); contents fetched with ?ref=<sha>; server-echo checks on path/sha. No branch/HEAD/URL/local-checkout fallback. - Path: rejects backslash/controls/empty/dot/dotdot/.git, <=16 segments, <=512 chars, server echo (result.path === args.path); per-segment encodeURIComponent. Symlink/submodule/dir refused (type/file/target/submodule_git_url checks). - Integrity: strict base64 charset, decode, size + re-encode + git blob SHA-1 match, strict UTF-8 (fatal, BOM ignored then surfaced), NUL/binary refusal. - Bounds: content-type JSON + content-length pre-check, 2MiB streaming cap with cancel, 1MiB file cap, expected_blob continuation, surrogate-safe paging <=8000 chars/page. Transport cancels HTML/oversize/chunked-false-length before parse (covered by tests). - No secrets/new network/privilege: no token/key logging, no new endpoints, no model/routing/permission change. Prompts label source text as data not instructions; tool description disclaims build/review/signature/acceptance. - KSE-0214 is proposal-only; prompts/system.md change restates peer-independence/COO-final policy, no auth change. No security blocker. Remaining gates (others): Infra full-seat already APPROVED at this head (7511, scoped); manager seat; separate COO-final APPROVED; originator-only FF after #417 lands. Head/base moves void this verdict.
manager approved these changes 2026-10-17 08:50:21 +00:00
manager left a comment

COO-final APPROVED at exact head 3414155a26 (KSE-0207; stacked REVIEW-ONLY).

Gates verified firsthand by COO (2026-10-17 ~08:50Z):

  • Diff: forgejo_pull_diff lines 1-400/407 + 401-407/407 (next_line null). 7 files, +300/-6: KSE-0214 follow-up, prompts/system.md review-policy clarification, prompts/tools.md (+reader + ssh-keygen fingerprint), new services/mcp-hub/src/forgejo-source.ts (+75: 2MiB/1MiB bounds, 8000-char pages, blob verification, redirect refusal), forgejo-tools.test.ts (+136 incl. 2.5MiB fixture), forgejo-tools.ts (+7/-1 forgejo_file_read), index.ts tail (+bounded request transport: redirect error, 30s timeout, maxResponseBytes).
  • CI: forgejo_commit_status at head: state success, 7/7 success (Apple Classify, MCP Hub bun, Dispatcher Bazel, SwiftLint, iOS/macOS/visionOS builds; latest 2026-10-17T08:05:24Z).
  • Peer 1 — infra review 7511: full body read; APPROVED at 3414155a, stale:false, official:true; scoped to MCP integration/test completeness only (not Security, not merge/deploy).
  • Peer 2 — security-agent review 7520: full body read; APPROVED Senior-Security seat only at 3414155a, stale:false, official:true; scoped to mapped identity/auth transport, immutable-ref, path, blob/integrity, bounds; no authority/secret expansion; no merge authority.
  • Provenance (KSE-0001): COO ran git fetch + git verify-commit locally: Good agent@key.store ECDSA SHA256:wDVd2B08VqF4UhjjoJ3HCdwEjBUe9OCi/ef8Ep0Hi7M, exit 0. Backend forgejo_commit_get shows signature_present:true/format ssh but backend_verified:false (gpg.error.no_gpg_keys_found) — backend metadata only; local verify is the validity evidence.

Ordering constraint (stacking): #418 base is codex/resident-program-ownership at 5331d6dc (= #417 head, merge_base = base). This APPROVED is REVIEW-ONLY while stacked. Do NOT merge #418 into the feature base. Retarget #418 to main only after #417 lands, then re-verify head/CI before any originator FF-merge. No merge/deploy authority granted by this review.

COO-final APPROVED at exact head 3414155a262af5c648340f4d69601313dcceb185 (KSE-0207; stacked REVIEW-ONLY). Gates verified firsthand by COO (2026-10-17 ~08:50Z): - Diff: forgejo_pull_diff lines 1-400/407 + 401-407/407 (next_line null). 7 files, +300/-6: KSE-0214 follow-up, prompts/system.md review-policy clarification, prompts/tools.md (+reader + ssh-keygen fingerprint), new services/mcp-hub/src/forgejo-source.ts (+75: 2MiB/1MiB bounds, 8000-char pages, blob verification, redirect refusal), forgejo-tools.test.ts (+136 incl. 2.5MiB fixture), forgejo-tools.ts (+7/-1 forgejo_file_read), index.ts tail (+bounded request transport: redirect error, 30s timeout, maxResponseBytes). - CI: forgejo_commit_status at head: state success, 7/7 success (Apple Classify, MCP Hub bun, Dispatcher Bazel, SwiftLint, iOS/macOS/visionOS builds; latest 2026-10-17T08:05:24Z). - Peer 1 — infra review 7511: full body read; APPROVED at 3414155a, stale:false, official:true; scoped to MCP integration/test completeness only (not Security, not merge/deploy). - Peer 2 — security-agent review 7520: full body read; APPROVED Senior-Security seat only at 3414155a, stale:false, official:true; scoped to mapped identity/auth transport, immutable-ref, path, blob/integrity, bounds; no authority/secret expansion; no merge authority. - Provenance (KSE-0001): COO ran git fetch + git verify-commit locally: Good agent@key.store ECDSA SHA256:wDVd2B08VqF4UhjjoJ3HCdwEjBUe9OCi/ef8Ep0Hi7M, exit 0. Backend forgejo_commit_get shows signature_present:true/format ssh but backend_verified:false (gpg.error.no_gpg_keys_found) — backend metadata only; local verify is the validity evidence. Ordering constraint (stacking): #418 base is codex/resident-program-ownership at 5331d6dc (= #417 head, merge_base = base). This APPROVED is REVIEW-ONLY while stacked. Do NOT merge #418 into the feature base. Retarget #418 to main only after #417 lands, then re-verify head/CI before any originator FF-merge. No merge/deploy authority granted by this review.
founder changed target branch from codex/resident-program-ownership to main 2026-10-18 00:34:39 +00:00
Sign in to join this conversation.
No labels
No milestone
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
key-store/key.store!418
No description provided.