Skip to content

test(policy): prove extension grants cannot bypass secret authority - #63

Open
seonghobae wants to merge 5 commits into
mainfrom
test/extension-secret-isolation
Open

test(policy): prove extension grants cannot bypass secret authority#63
seonghobae wants to merge 5 commits into
mainfrom
test/extension-secret-isolation

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #27 and security evidence for #10.

Buyer/security gap

OriginWeave separates Chromium extension permission from Agent capability, and protected main requires brokered secret delivery plus ordinary risk approval for FillSecret. PR #62 independently covers extension proposal isolation for origin, capability, untrusted instruction, raw-secret delivery, and unexpected secret material. This PR remains deliberately narrowed to the non-duplicate approval-composition proof.

Current unique scope

Current protected main is exact SHA 0841d2ab3d8b5e60a03c0a8e818cf438e2716829. Current exact contributor head is b80963fb81bed1ac4a01c1118f498af9765e2b79.

GitHub currently reports the PR open, Ready and mergeable, directly based on current protected main. The only changed path is crates/originweave-policy/tests/extension_secret_isolation.rs.

The exact current regression proves:

  • the extension/session/context/origin/unexpired grant genuinely allows ProposeTypedAction;
  • trusted evaluation time precedes the grant's exclusive expiry;
  • the Agent context independently has FillSecret, exact readable/writable origin authority, and a broker-handle delivery request; but
  • extension proposal authority still cannot skip the ordinary high-risk boundary: policy returns RequireApproval(RiskClass::R3) rather than Allow.

The grant is asserted first so the result cannot pass vacuously because the extension lacked proposal authority.

Concurrent-movement reconciliation

The predecessor body described head a4595c393f459f57bfe2199ace44271f246751c4 against an older protected-main lineage. Before this scheduled writer attempted the expected compatibility repair, the branch had independently advanced to b80963fb81bed1ac4a01c1118f498af9765e2b79. The intervening delta was inspected rather than raced or overwritten.

That current head already applies the exact required compatibility adaptation from protected-main #179: ExtensionAgentGrant::new now carries the canonical extension origin plus exclusive expiry, and ExtensionAccessRequest::new carries the same origin plus trusted evaluation time. The other writer therefore already satisfied the intended repair; this lane adopts and verifies that implementation instead of duplicating it.

Duplicate-avoidance lineage

The original branch also tested raw-secret rejection and unexpected secret material. Those cases became owned by PR #62, so they were removed here to avoid parallel duplicate maintenance while preserving this PR's distinct approval-boundary proof. Historical predecessor heads are lineage only and are not promoted as current evidence.

Exact-current-head evidence

On unchanged exact head b80963fb81bed1ac4a01c1118f498af9765e2b79:

  • CI run 31976481133: success;
  • Security Scan run 31976481161: success;
  • SAST Semgrep run 31976481139: success;
  • Required OpenCode Review run 31976480255: success;
  • Required PR Review Merge Scheduler run 31976480232: success;
  • Strix run 31976480270: success;
  • Required Noema Review run 31976480260: success;
  • Close Empty PR run 31976480223: success;
  • Code Quality run 31976479561: success;
  • formal reviews currently returned: none; and
  • inline review threads currently returned: none.

Skipped diagnostic-only steps are not represented as passing evidence. No predecessor-head, synthetic-merge, queued, skipped, cancelled, absent, stale, status-only, or model-only evidence is promoted as current proof.

Integration gate

Active organization ruleset 18156473 requires the central required workflows, one approving review, dismissal of stale approvals after pushes, latest-push approval, and resolved review threads. Passing automation and author activity are not substitutes for the qualifying independent current-head approval.

Protected-main AGENTS.md independently forbids scheduled agents from merging, self-approving, altering workflows, adding secrets, weakening checks, tagging, or publishing. This scheduled actor therefore leaves the clean head unchanged while integration waits for qualifying independent approval; that wait blocks only integration.

Truth boundary

This PR adds no secret broker, protected value, browser adapter, extension API, new capability, production API, persistence, workflow mutation, model call, approval evidence, or release claim. It proves only that extension proposal permission cannot manufacture the separate R3 approval required by protected-main Agent policy. Issue #10's trusted broker and issue #27's real extension/runtime boundaries remain open.

Summary by CodeRabbit

  • 테스트
    • 확장 프로그램의 비밀 입력 작업이 필수 브로커 승인 절차를 우회하지 못하는지 검증하는 테스트를 추가했습니다.
    • 비밀 정보 입력 작업에 높은 위험 수준의 승인이 요구되는지 확인합니다.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 626d08e3-db24-439d-a321-e803a8d4fb0e

📥 Commits

Reviewing files that changed from the base of the PR and between 85a1669 and b80963f.

📒 Files selected for processing (1)
  • crates/originweave-policy/tests/extension_secret_isolation.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/originweave-policy/tests/extension_secret_isolation.rs

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

확장 프로그램의 ProposeTypedAction 권한이 FillSecret 작업의 RiskClass::R3 브로커 승인 절차를 우회하지 않는지 검증하는 테스트를 추가했습니다.

Changes

확장 프로그램 비밀 격리

Layer / File(s) Summary
비밀 입력 승인 검증
crates/originweave-policy/tests/extension_secret_isolation.rs
유효한 확장 프로그램, 세션, 브라우징 컨텍스트, 의도 다이제스트를 구성합니다. ProposeTypedAction 권한을 확인합니다. FillSecret 평가 결과가 RiskClass::R3 승인을 요구하는지 검증합니다.

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

Merge Risk: ⚪ Minimal · up to b8096

This localized regression test verifies that extension proposal permission cannot bypass the required R3 approval boundary. No actionable merge-blocking risk remains after normal checks and review.

🚥 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 제목은 확장 권한이 FillSecret의 비밀 권한 경계를 우회하지 못함을 검증하는 회귀 테스트라는 주요 변경 사항을 정확히 설명합니다.
✨ 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-secret-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 draft August 10, 2026 22:22
@seonghobae
seonghobae marked this pull request as ready for review August 10, 2026 22:25
@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown

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.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before 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 head b80963fb81bed1ac4a01c1118f498af9765e2b79.

  • Head SHA: b80963fb81bed1ac4a01c1118f498af9765e2b79

  • Workflow run: 32132762660

  • 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: extension_secret_isolation.rs"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: extension_secret_isolation.rs"]
  R1 --> V1["required checks"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: b80963fb81bed1ac4a01c1118f498af9765e2b79
  • Workflow run: 32139218511
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

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 success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before 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 head b80963fb81bed1ac4a01c1118f498af9765e2b79.

  • Head SHA: b80963fb81bed1ac4a01c1118f498af9765e2b79

  • Workflow run: 32139218511

  • 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: extension_secret_isolation.rs"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: extension_secret_isolation.rs"]
  R1 --> V1["required checks"]
Loading

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before 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 head b80963fb81bed1ac4a01c1118f498af9765e2b79.

  • Head SHA: b80963fb81bed1ac4a01c1118f498af9765e2b79

  • Workflow run: 32139218511

  • 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: extension_secret_isolation.rs"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: extension_secret_isolation.rs"]
  R1 --> V1["required checks"]
Loading

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