feat(extension): bound native messaging host authority - #82
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughNative-messaging 호스트 이름 검증 타입과 명시적 접근 grant 평가 API를 추가했습니다. 확장 ID와 호스트 이름이 모두 일치할 때만 접근을 허용합니다. 호스트 이름 경계와 확장 에이전트 capability 분리를 테스트합니다. ChangesNative messaging 권한 경계
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The PR adds a bounded native-messaging host identity and exact extension-to-host grant policy without launching processes or expanding agent capabilities; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current headc639cd78e3acad235be4cbbfdef67b84ce7ddbfa. -
Head SHA:
c639cd78e3acad235be4cbbfdef67b84ce7ddbfa -
Workflow run: 32132787181
-
Workflow attempt: 1
Coverage evidence
Coverage Decision
- Result: FAIL
- Test evidence: not proven passing
- Docstring evidence: not proven passing when configured
- Failure count: 1
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (5 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (5 files)"]
R1 --> V1["required checks"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage Decision
Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (5 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (5 files)"]
R1 --> V1["required checks"]
|
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current headc639cd78e3acad235be4cbbfdef67b84ce7ddbfa. -
Head SHA:
c639cd78e3acad235be4cbbfdef67b84ce7ddbfa -
Workflow run: 32139252038
-
Workflow attempt: 1
Coverage evidence
Coverage Decision
- Result: FAIL
- Test evidence: not proven passing
- Docstring evidence: not proven passing when configured
- Failure count: 1
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (5 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (5 files)"]
R1 --> V1["required checks"]
Partial implementation of #27.
Buyer/security gap
Issue #27 requires native messaging only behind an explicit host-managed allow-list and process boundary. Protected main separates Chromium extension permission from OriginWeave Agent capability, but a future native-messaging adapter must not treat the manifest
nativeMessagingpermission or an arbitrary host-name string as OriginWeave authority.Implemented production boundary
This PR provides a typed, deterministic Rust authority primitive for native-messaging host identity and exact extension-to-host grants:
The implementation deliberately does not launch a process, parse a host manifest, read registry/filesystem registration, communicate over stdio, parse JSON, expose secrets, grant Agent actions, or treat extension content as trusted instruction.
Primary platform contract
The boundary follows Chrome native-messaging semantics: registered host names are constrained identities,
allowed_originsis an explicit extension allow-list without wildcards, and Chrome launches each native messaging host in a separate process. Process/stdio integration remains a separately reviewed boundary; this PR establishes only the Rust-side exact authority primitive.Live protected-main alignment
Protected main is exact SHA
0841d2ab3d8b5e60a03c0a8e818cf438e2716829. Current exact branch head isc639cd78e3acad235be4cbbfdef67b84ce7ddbfa.Fresh exact comparison reports this head 14 commits ahead and 0 behind protected main, with merge base exactly
0841d2ab3d8b5e60a03c0a8e818cf438e2716829. No predecessor-head evidence is transferred.Test-first / current exact-head verification
The feature began from test-only head
afea70bee5f479fc0b925be154fe79279fc34ae4. The current exact head additionally covers the public identity getters and standard error integration consumed by downstream native-messaging stacks.On unchanged exact head
c639cd78e3acad235be4cbbfdef67b84ce7ddbfaagainst exact protected main0841d2ab3d8b5e60a03c0a8e818cf438e2716829:32025752923: success;95374690146: repository contracts, canonical formatting, locked workspace/all-target check, tests, strict Clippy, and rustdoc success;95374690171: exact owned production function/line/region/branch enforcement success;32025752925: success;32025752960: success;32025752970: success;CodeRabbit: success, which is status-only evidence and not independent approval;A later CodeRabbit review attempt was rate-limited and generated no actionable comment; it is not promoted as approval or current-head proof. Central OpenCode/Noema/Strix evidence not returned for this exact head is absent rather than inferred from predecessor, comments, or status-only evidence. Skipped queue/cancel/manual-status helper jobs are not represented as passing evidence.
GitHub reports the PR open, mergeable, and Ready for review. Integration remains gated by the repository's counted independent approval and latest-push approval requirements; this scheduled actor does not merge or self-approve.
Truth boundary
This PR establishes only bounded Rust policy for native-messaging host identity and explicit extension-to-host authority. It does not validate installed host manifests, authenticate operating-system registration ownership, spawn/sandbox/supervise a native process, bound native-messaging framing/stdio, authorize arbitrary Agent actions, persist authority, handle credentials, or prove complete Chromium native-messaging integration. Those remain separately reviewed runtime boundaries under #27.