feat(security): quarantined summarizer for high-risk content (Phase 3, #1195)#1243
Merged
feat(security): quarantined summarizer for high-risk content (Phase 3, #1195)#1243
Conversation
…#1195) Dual LLM pattern: high-risk external content (web scrape, A2A) passes through an isolated, tool-less LLM extraction call that returns only factual information before entering the main agent context. - QuarantinedSummarizer with extract_facts() async method - [security.content_isolation.quarantine] config (opt-in, disabled by default) - Re-sanitize quarantine output: detect_injections + escape_delimiter_tags - Guard quarantine behind sanitizer.is_enabled() - quarantine_invocations/failures metrics in MetricsSnapshot - Refactor sanitizer.rs to sanitizer/{mod,quarantine}.rs - 22 new tests (3795 -> 3817) Closes #1204
Update untrusted-content-isolation.md with Dual LLM pattern section, re-sanitization details, quarantine config, and metrics. Add [security.content_isolation.quarantine] to configuration.md.
Add QuarantinedSummarizer (Dual LLM pattern) to root README defense-in-depth row and zeph-core README sanitizer module description.
- Add `use crate::agent_setup` to daemon.rs and acp.rs (missing after Phase 3 wiring, only visible with --features full) - Box::pin run_acp_server/run_acp_http_server calls in runner.rs to satisfy clippy::large_futures (16 KiB+ future size)
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
sanitizer.rsintosanitizer/{mod,quarantine}.rsmodule structure[security.content_isolation.quarantine]config section (opt-in, disabled by default)detect_injections+escape_delimiter_tagsbefore spotlightingsanitizer.is_enabled()to prevent unnecessary LLM callsquarantine_invocations/quarantine_failurescounters toMetricsSnapshotPart of #1195 (Phase 3). Closes #1204.
Test plan
cargo +nightly fmt --checkcleancargo clippy --workspace -- -D warningszero warningscargo nextest run --workspace --lib --bins3817 passed, 11 skippedshould_quarantinerouting,extract_factssuccess/error/empty,from_str_opt, system prompt contentescape_delimiter_tagsbefore spotlight, no raw content paths