feat(core): separate Chrome permissions from Agent authority - #175
feat(core): separate Chrome permissions from Agent authority#175cursor[bot] wants to merge 15 commits into
Conversation
A Chrome downloads permission is compatibility evidence only. Adapters must fail closed before treating it as Capability::Download. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
There was a problem hiding this comment.
Stale comment
Review — exact head
f6c089b8faae015c5b8845296af7cdc3ddcd0c65
chrome_permission_authorizes_agent_actionis fail-closed: a Chromedownloadstoken, and every other reviewed compatibility permission, cannot authorize AgentDownloador any otherActionKind. Case, empty, and control-bearing tokens stayUnrecognizedPermission. That is the correct adapter check for ADR 0013 rule 4.Next action: keep this primitive independent of MV3 runner PRs #43/#176. Do not treat a passing Chrome fixture as Agent filesystem authority. Wire adapters to call this boundary before policy, and add
commandsandwindowsto the reviewed-token list when those protected-main surfaces should be classified asCompatibilitySurfaceOnlyinstead ofUnrecognizedPermission. Both paths already refuse the action.Rust contracts, production coverage, and the pinned Chrome MV3 fixture succeeded on this head at review time. Remaining SAST/security/Strix/review workflows were still queued and are not promoted. This review is not an approval.
Sent by Cursor Automation: Fix Issues
There was a problem hiding this comment.
Review — exact head f6c089b8faae015c5b8845296af7cdc3ddcd0c65
The isolation primitive is sound and independent of the #43/#176 downloads runner. chrome_permission_authorizes_agent_action never returns Ok. Reviewed Chrome tokens including downloads become CompatibilitySurfaceOnly. Empty, case-shifted, newline-injected, and unrecognized tokens become UnrecognizedPermission. The ActionKind argument is intentionally unused so a Chrome permission cannot mint Download or any other Agent action.
is_exact_chrome_permission_token correctly admits mixed-case Chrome names such as sidePanel and declarativeNetRequest while rejecting DOWNLOADS and host-permission punctuation.
Residual, non-blocking
Protected-main MV3 evidence also exercises windows and commands. Those names are not in REVIEWED_CHROME_COMPATIBILITY_PERMISSIONS, so they currently classify as UnrecognizedPermission rather than CompatibilitySurfaceOnly. Both arms still refuse Agent authority. Add them only if an adapter needs the clearer diagnostic; do not treat the omission as a capability leak.
Stay draft until exact-head required checks are green. Do not fold this into the downloads runner, HTTP #37, or reserved MV3 drafts #49/#56/#59/#60/#61.
Sent by Cursor Automation: Fix Issues
|
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. |
seonghobae
left a comment
There was a problem hiding this comment.
Exact-head review found one current documentation-truth defect that must be fixed before approval. docs/traceability/extension-authority-security.md adds chrome_permission_authorizes_agent_action under the heading “Protected main already provides:”, but protected main is still 0c376acf059be9ddddddfbde1d0189e4f39ef014 and does not contain this PR-only function. That promotes active-PR behavior to shipped truth and violates the repository’s protected-main-vs-active-PR documentation contract. Keep the existing protected-main bullets unchanged and move/label this function as active/non-shipped PR #175 evidence (and make the docs/traceability/README.md wording equally explicit if needed). The Rust fail-closed implementation itself looks coherent on this head; exact-head CI, MV3, SAST, and Security are green. Please repair the truth-status wording without widening scope, then re-run exact-head evidence.
…rome permission guard
Superseded by current exact head db724d4. The current-main reconstruction removed the stale traceability-document changes entirely; fresh compare against protected main 0841d2a contains only CHANGELOG plus the bounded core module/Cargo/test slice. This dismissal is stale review-state cleanup only, not approval; current-head required checks and independent/latest-push approval remain required.
|
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. |
|
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. |
|
Fresh current-source review found one additional issue-#27 compatibility taxonomy gap at exact head Owner action on this same canonical branch: add Primary references: https://developer.chrome.com/docs/extensions/reference/api/management and https://developer.chrome.com/docs/extensions/reference/permissions-list . The attempted ref mutation for this test-first repair was blocked before the branch changed, so the exact PR head remains unchanged and no passing evidence is claimed for this gap. |
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 head7fc96f8bbffe80dc6eabe9efcabfa4362e2c81ac. -
Head SHA:
7fc96f8bbffe80dc6eabe9efcabfa4362e2c81ac -
Workflow run: 32185290142
-
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"]
|


Buyer/security gap
Partial implementation of #27. Chrome extension compatibility evidence must never become OriginWeave Agent authority. A reviewed Manifest V3 permission may prove that stock Chromium exposes a compatibility surface, but it cannot mint an Agent capability, filesystem authority, browser action, secret authority, approval, or any other OriginWeave permission.
Current exact implementation
Protected main is exact
0841d2ab3d8b5e60a03c0a8e818cf438e2716829; current contributor head is exact7fc96f8bbffe80dc6eabe9efcabfa4362e2c81ac.originweave-core::chrome_permission_authorizes_agent_actionis intentionally fail-closed:bookmarks,commands,declarativeNetRequest,declarativeNetRequestWithHostAccess,downloads,history,nativeMessaging,scripting,sidePanel,storage,tabs, andwindows) returnCompatibilitySurfaceOnly;UnrecognizedPermission; andActionKindcan make Chrome permission text become OriginWeave Agent authority.The branch preserves protected-main extension-grant origin binding and exclusive trusted-time expiry. Chrome compatibility evidence remains separate from explicit OriginWeave extension grants and from Agent policy authority.
TDD / current repair
The branch had already advanced beyond the older body snapshot. The intervening exact-head delta, including standard credential-safe
Display/std::error::Errorbehavior and the earliercommands/windowsclassification repair, was inspected and preserved rather than overwritten.A fresh current-source audit found one remaining evidence-classification defect:
nativeMessagingis a reviewed Manifest V3 compatibility surface used by the active issue #27 native-messaging work, but this boundary still classified it as merely unrecognized. That did not grant authority, yet it made the reviewed compatibility taxonomy incomplete.1dc22225ac3be53569653f8d85b8f0af0ed415c9addednativeMessagingto the compatibility-only regression first. CI run32048716882, Rust-contracts job95442602341, passed repository contracts, formatting, and workspace check and then failed at Run tests. That is the observed RED boundary.cabe4df327075c1b4564989eb187470470d51d41added onlynativeMessagingtoREVIEWED_CHROME_COMPATIBILITY_PERMISSIONS; there is still no success/fallback path and no Agent authority is broadened.7fc96f8bbffe80dc6eabe9efcabfa4362e2c81acalso makes the Unreleased CHANGELOG code-current by explicitly recording that bothdownloadsandnativeMessagingremain compatibility-only authority surfaces.The earlier documentation-truth review finding is also no longer present:
docs/traceability/extension-authority-security.mdcontinues to label active-PR evidence separately and does not list this PR-only function under protected-main authority.Exact-current verification
On unchanged exact head
7fc96f8bbffe80dc6eabe9efcabfa4362e2c81ac:32049209706: success;95444247346: success for repository contracts, canonical formatting, locked workspace check, full tests, strict Clippy, and rustdoc;95444247142: success, including exact owned-production function, line, region, and branch coverage enforcement;32049209629: success on the pinned Chromium lane;32049209527: success;32049209595: success;No predecessor-head, queued, skipped, cancelled, absent, stale, status-only, model-only, or synthetic evidence is promoted to passing evidence.
Scope boundary
This is IMPLEMENTED_ON_ACTIVE_PR, not protected-main shipped truth. It does not implement native-messaging transport, native-host allow-listing, host-process isolation, extension installation, Chrome message parsing, browser launch/control, filesystem authority, secret brokerage, or the full #27 compatibility/runtime matrix. It changes no workflow, secret, merge rule, scanner policy, or foreign repository.
Standards
Chrome for Developers. (n.d.). chrome.downloads. Google. Retrieved August 16, 2026, from https://developer.chrome.com/docs/extensions/reference/api/downloads
Chrome for Developers. (n.d.). Native messaging. Google. Retrieved August 18, 2026, from https://developer.chrome.com/docs/extensions/develop/concepts/native-messaging
Protected-main
AGENTS.mdremains authoritative. This scheduled writer does not merge, self-approve, tag, publish, alter workflows, add secrets, or weaken checks.