Skip to content

fix(orchestration): harden PlanVerifier against misconfiguration and injection (#2238, #2239, #2240)#2264

Merged
bug-ops merged 1 commit intomainfrom
orchestration-verify-hardening
Mar 27, 2026
Merged

fix(orchestration): harden PlanVerifier against misconfiguration and injection (#2238, #2239, #2240)#2264
bug-ops merged 1 commit intomainfrom
orchestration-verify-hardening

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 27, 2026

Summary

Files changed

  • crates/zeph-orchestration/src/error.rs — new InvalidConfig(String) variant
  • crates/zeph-orchestration/src/verifier.rsContentSanitizer field, sanitization in build_verify_prompt(), MAX_GAP_DESCRIPTION_LEN constant, truncation in build_replan_prompt()
  • crates/zeph-orchestration/src/scheduler.rsvalidate_verify_config() method
  • crates/zeph-core/src/agent/mod.rs — call validate_verify_config with provider pool names at build_dag_scheduler()
  • CHANGELOG.md — updated [Unreleased] section

Test plan

  • cargo nextest run -p zeph-orchestration --lib — 252 passed (+16 new tests)
  • New tests cover: valid provider, missing provider, empty provider name, empty pool, whitespace trimming, output sanitization, gap truncation at boundary (500/501 chars), multibyte UTF-8 truncation

Closes #2238
Closes #2239
Closes #2240

@github-actions github-actions bot added bug Something isn't working size/L Large PR (201-500 lines) documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate and removed size/L Large PR (201-500 lines) labels Mar 27, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 27, 2026 12:26
…injection (#2238, #2239, #2240)

- Validate verify_provider at DagScheduler construction time via
  validate_verify_config(&[&str]); returns InvalidConfig error naming
  the missing provider and listing available ones (#2238)
- Sanitize task output through ContentSanitizer (spotlight_untrusted=false)
  before inclusion in PlanVerifier prompt to prevent information disclosure
  to third-party verify endpoints (#2239)
- Cap gap descriptions at 500 Unicode scalar values before replan prompt
  assembly to close second-order prompt injection surface (#2240)

Closes #2238, #2239, #2240
@bug-ops bug-ops force-pushed the orchestration-verify-hardening branch from f5608c6 to c92d027 Compare March 27, 2026 12:31
@github-actions github-actions bot added the size/L Large PR (201-500 lines) label Mar 27, 2026
@bug-ops bug-ops merged commit 1f2b0ca into main Mar 27, 2026
25 checks passed
@bug-ops bug-ops deleted the orchestration-verify-hardening branch March 27, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

1 participant