Skip to content

test(policy): prove extension grants cannot widen Agent authority - #62

Open
seonghobae wants to merge 2 commits into
mainfrom
test/extension-policy-isolation
Open

test(policy): prove extension grants cannot widen Agent authority#62
seonghobae wants to merge 2 commits into
mainfrom
test/extension-policy-isolation

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #27.

Buyer/security gap

OriginWeave already has an explicit extension-to-Agent grant boundary and an independent typed action policy engine, but the repository lacked integration regressions proving that permission to propose a typed action cannot widen Agent origin/action/secret authority or turn untrusted extension-produced content into a trusted policy instruction.

Exact scope

Current exact head a57873b3688984711918be17aadd348ed9fb12a9 is based directly on protected main 67af7c87589edc2039545af335c95064d9b8391c and proves five boundaries:

  1. an exact ProposeTypedAction extension grant still cannot navigate to an origin outside the Agent Task read grant (OriginNotReadable);
  2. that extension grant cannot supply the missing core Navigate capability (MissingCapability(Navigate));
  3. extension-produced content classified as untrusted WebContent remains rejected by deterministic policy (UntrustedInstructionSource);
  4. even when the Agent context independently has FillSecret, an extension proposal cannot turn RawValue delivery into an allowed secret fill (SecretBrokerRequired); and
  5. secret material attached to a non-secret action remains rejected (UnexpectedSecretMaterial).

Every test first asserts that the exact extension/session/context grant genuinely allows ProposeTypedAction, then independently requires the ordinary Agent policy boundary to deny the attempted widening. This prevents vacuous tests that never crossed the extension grant boundary.

Exact-head evidence

On unchanged exact head a57873b3688984711918be17aadd348ed9fb12a9:

  • CI run 31436844685: success;
  • repository contracts, formatting, locked workspace check, all workspace tests, strict Clippy and rustdoc: success;
  • production coverage job 93612736291: success, including exact function/line/region/branch enforcement;
  • Security Scan run 31436844615: success;
  • SAST Semgrep run 31436844646: success;
  • CodeRabbit exact-head commit status: success;
  • no inline review threads are currently returned; and
  • GitHub reports the PR mergeable and Ready for review.

No predecessor-head result is transferred to this head. This scheduled actor does not self-approve or merge.

Architecture boundary

This PR adds no production API and no new authority. A Chrome permission or OriginWeave extension proposal grant remains distinct from Agent capability, origin grants, approval, business action classification, browser execution, secret resolution, trusted broker operation, and verified success. The test does not claim that a real Chromium extension adapter or trusted secret broker exists; it proves the reusable protected-main policy composition required before such adapters may safely expose extension proposals.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

브라우저 확장 프로그램 권한 격리를 검증하는 테스트를 추가했다. 명시적 grant가 출처 접근 권한이나 Navigate capability를 확대하지 않는지 확인한다. 신뢰할 수 없는 WebContent 지시문이 정책 승인으로 처리되지 않는지도 검증한다.

Changes

확장 프로그램 정책 격리

Layer / File(s) Summary
정책 격리 시나리오 검증
crates/originweave-policy/tests/extension_policy_isolation.rs
테스트 헬퍼와 세 가지 시나리오를 추가했다. ProposeTypedAction 권한만 가진 grant가 출처 읽기 권한과 Navigate capability를 제공하지 않는지 확인한다. WebContent 지시문이 신뢰된 정책 지시문으로 변환되지 않는지도 거부 사유와 함께 검증한다.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 확장 프로그램 권한이 Agent 권한을 확대하지 못함을 검증하는 회귀 테스트 추가라는 주요 변경 사항을 정확하게 설명합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/extension-policy-isolation

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as ready for review August 10, 2026 21:59
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