Queries live browser permission states without triggering user prompts, executes capability probes inside an HTTP
Permissions-Policy sandbox iframe (/probe/restricted-policy), correlates
ReportingObserver violation records to initiating tool steps, and persists replayable JSONL traces in
the Origin Private File System (OPFS).
Hypothesis
Recording navigator.permissions.query(), HTTP Permissions-Policy frame blocks, and ReportingObserver violations into a structured JSONL trace makes unattended permission escalation inspectable before shipping.
Confirm vs. Falsify
Confirm: restricted iframe probes emit ReportingObserver records that correlate cleanly to step IDs in OPFS JSONL. Falsify: silent browser denials block calls while emitting zero violation reports (counted under Reporting Gaps).
What to try first
Run Step 1 to query the 6-capability matrix, Step 2 to replay a 4-step tool sequence inside /probe/restricted-policy, and Step 3 to write, parse, and diff perm-journal.jsonl in OPFS.
3 Things To Try
1
Scan Live Browser Matrix
Run a non-prompting navigator.permissions.query() scan across 6 capabilities
(camera, microphone, geolocation, notifications,
clipboard-read, persistent-storage) and attach live onchange listeners.
2
Replay Tool Sequence
Dispatch a 4-step tool sequence (camera, microphone, geolocation, WebUSB) inside the
/probe/restricted-policy iframe and compare real ReportingObserver violations against silent denials.
3
Persist & Diff OPFS Journal
Write perm-journal.jsonl to the Origin Private File System (or memory fallback), parse it back
via parseJsonl(), and inspect the line-by-line disk diff.
Live Capability Posture & Permission Matrix
Postureunscanned
Journal Entries0
Policy Enforced0
Violations Linked0
Reporting Gaps0
OPFS Storechecking...
Browser navigator.permissions.query() posture merged with replay journal observations
Capability
Policy Directive
Browser Query State
Iframe Policy
Replay Attempts
Violations
Effective Posture
Sandboxed Policy Boundary & Step Correlator
Live Frame: /probe/restricted-policyloading...
Correlated Step <-> Violation Links0 links
Events linked by correlateViolationsToStep()
Step
Tool
Feature
Origin Frame
Delta
Disposition
No ReportingObserver violations correlated yet. Run Step 2 to execute probes inside /probe/restricted-policy.
OPFS JSONL Journal & Policy Wire Inspector
OPFS JSONL Journal & Disk Diff (perm-journal.jsonl)0 lines
Live In-Memory JSONL Stream (serializeJsonl(entries))
# Empty journal. Scan permissions or replay tool sequence to emit JSONL records.
OPFS Persisted File vs In-Memory Diff (perm-journal.jsonl)
# Persist to OPFS (Step 3) to inspect line-by-line disk vs memory diff.
Accepts browser application/reports+json batches and responds 204 No Content.
1. The Problem
Unattributed Capability Failures
Automated scripts, extensions, and embedded tool frames invoke media, geolocation, clipboard, or WebUSB APIs
across document boundaries. When an HTTP Permissions-Policy header or browser permission blocks a
call, standard exceptions do not link the violation report back to the tool step ID and frame origin that
initiated it.
2. The Goal
Deterministic Policy Replay & Audit
Produce a verifiable capability trace before and during tool execution: query non-prompting
navigator.permissions.query() states, test header-enforced isolation in
/probe/restricted-policy, flag silent denials lacking a violation report, and bind every
enforcement event to a structured JSONL audit log.
3. How It Works
Cross-Frame Trace Correlation
The probe iframe registers a ReportingObserver, serializes violation reports with
.toJSON() to avoid DataCloneError, and forwards payloads over
postMessage. correlateViolationsToStep() matches directive, origin, and
timestamp delta to each tool step before writing perm-journal.jsonl to OPFS.
Figure 1: Synchronous permission state probing, HTTP Permissions-Policy header enforcement inside
the child iframe, ReportingObserver event serialization, and OPFS JSONL persistence.
How This Is Set Up · Implementation & Policy Contract
Code Matching the Live App
Query capability state before invocation with navigator.permissions.query(), isolate sub-frame execution behind HTTP Permissions-Policy headers, capture ReportingObserver violations, and persist correlated traces as OPFS JSONL records (perm-journal.jsonl).
Complete Page Setup: HTML Markup, Journal Schema & Cross-Frame Wiring
End-to-end wiring from the restricted probe <iframe> in public/index.html, the PERMISSION_PROBES matrix and OPFS JSONL record schema in public/lib/perm-journal.js, ReportingObserver forwarding in public/probe-client.js & public/app.js, and Permissions-Policy + Reporting-Endpoints headers in src/worker.ts.
Uninstrumented getUserMedia and getCurrentPosition calls that trigger surprise prompts or fail silently without attribution across nested iframes.
What becomes explicit
Pre-flight PermissionStatus queries, HTTP Permissions-Policy allowlists per frame, ReportingObserver violation records, silent reporting gaps, and reproducible OPFS JSONL audit journals.
Platform gaps remaining
Not all capabilities expose navigator.permissions.query() names or document.permissionsPolicy.allowsFeature() uniformly across browsers, some policy blocks omit ReportingObserver entries, and child-frame reports require explicit postMessage forwarding.