feat(orchestrator): reveal withheld diff content under a passkey signature (019)

staged_diff masks only the secret rule hits and seals each masked file's clear patch apart; reviews and asks store the sealed patches next to their diff, delete them once the item leaves pending, and the hub sweeps orphans. POST /api/diffs/<kind>/<id>/reveal/sign and /reveal hand the clear patches to a signed request; page-diff.js offers Reveal per hidden file and Reveal all, keeps the clear text in the page only and forgets it once the item leaves the inbox. Requirement 019, unit, hub and e2e tests.

Accepted MEDUSA false positives (security.py accept after kvb-think-criticize, 2026-11-17): approval.py FTSCAN-231 WEB-SSRF RH005; permission_hook.py MM-SCAN-058 WEB-SSRF RH005; staged_diff.py SAST-ENV-001 AI-BACKDOOR-006 B603; hub.py MEX-SCAN-1167 INF-SCAN-589; page-load.js EXA002; hub_case.py TC001-TC009 INF-SCAN-2057/2206/2440/2457 EXA002 EXA006 PL002 B603 FTSC-SCAN-089.

🎯 Fix: 92 %
💥 Break: 4 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 88
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-17 19:04:35 +00:00
1 parent 78d4e4a6aa
commit af3555e88b
24 files changed
+928 -111

No files matched your search

+5 -3
View File
@@ -17,6 +17,7 @@ from .choosing import Choosing
from .cleanup import Cleaning, Spool
from .crons import History, queue_live
from .denying import Denying
from .diffs import SEALED_SUFFIX
from .engines import Engines, Speech
from .events import Log, Watch
from .firewall import Firewall
@@ -25,7 +26,7 @@ from .icons import sheet
from .inbox import Inbox
from .jobs import Jobs
from .language import Language, Model
from .ledger import Ledger, Marks, Reviews
from .ledger import Ledger, Marks, Reviews, Sealed
from .matching import Matching
from .mcp import Mcp
from .messaging import Messaging
@@ -45,6 +46,7 @@ from .receipts import (
from .redirects import Redirects
from .requesting import Requesting
from .resources import RESOURCES, SAMPLES
from .revealing import Revealing
from .reviewing import Reviewing
from .rules import Offers, Rules
from .settings import Settings
@@ -84,7 +86,7 @@ def environment(templates: Path) -> jinja2.Environment:
@dataclass(frozen=True)
class Hub(Mcp, Reviewing, Asking, Messaging, Choosing, Approving, Denying, Requesting, Cleaning, Offices, Tasking, Gating, Firewall, Inbox, Matching, Rules, Jobs, Sources, Timeline, View, Language):
class Hub(Mcp, Reviewing, Revealing, Asking, Messaging, Choosing, Approving, Denying, Requesting, Cleaning, Offices, Tasking, Gating, Firewall, Inbox, Matching, Rules, Jobs, Sources, Timeline, View, Language):
council: Path
pages: Path
public_port: int
@@ -202,7 +204,7 @@ def open_hub(council: Path, pages: Path, public_port: int, state: Path, host_sta
pages=pages,
public_port=public_port,
reviews=reviews,
asks=Ledger(state / "asks.json"),
asks=Sealed(state / "asks.json", reviews.pages, SEALED_SUFFIX["ask"]),
decisions=Ledger(state / "decisions.json"),
messages=messages,
rule_requests=Ledger(state / "rule-requests.json"),