Integrate reviewed human-review improvements - #1
Merged
Conversation
Apply a per-response nonce-based Content Security Policy so only the trusted Human Review SDK executes in local HTML and Markdown reviews. Authored scripts and inline handlers remain unchanged on disk but stay inert in the review surface. Add regression coverage for nonce injection, source round-tripping, and hostile in-frame scripts.
Add explicit comment editing, order comments by latest activity, update stranded feedback batches in place, and represent post-delivery revisions as corrections that survive acknowledgment. Include regression coverage for ordering, pending revisions, and correction delivery.
Use state.page.filename (already computed by pageState()) to set document.title so browser tabs show which document is open instead of all showing 'human review'. Closes petergyang#24
The review iframe renders artifacts that are untrusted by definition, but its sandbox granted allow-popups and allow-downloads. Neither is needed: the SDK posts external links to the chrome over eh:external and the chrome opens them, and nothing downloads. Removing both narrows what a malicious artifact can do to the reviewer. The eh:external handler also called window.open on an unvalidated href. The origin check is the only thing in front of it, so a compromised frame or a misconfigured policy could land a javascript: URL there, executing on the chrome's origin alongside the session token. Route it through the existing normalizeHref, which already allowlists http/https/mailto/tel and is tested against javascript:, data:, vbscript: and tab-obfuscated variants, rather than adding a second URL-safety helper to diverge from. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a956be5a-b08a-4a18-8034-1911ba9f56ac
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a956be5a-b08a-4a18-8034-1911ba9f56ac
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a956be5a-b08a-4a18-8034-1911ba9f56ac
Resolve the import overlap with PR petergyang#32 while preserving both features. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a956be5a-b08a-4a18-8034-1911ba9f56ac
Add exact batch receipts, transactional state updates, single-writer locking, restart-safe corrections, and deterministic shutdown without forced test exit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a956be5a-b08a-4a18-8034-1911ba9f56ac
Add nonce-hidden render capabilities, stale-frame rejection, split sandbox policy, redirect and title coverage, Playwright exploit tests, and bounded CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a956be5a-b08a-4a18-8034-1911ba9f56ac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation