Skip to content

feat(audit): INJ1 prompt-injection signature detector#49

Merged
ProtocolWarden merged 1 commit into
mainfrom
feat/inj1-detector
Jun 20, 2026
Merged

feat(audit): INJ1 prompt-injection signature detector#49
ProtocolWarden merged 1 commit into
mainfrom
feat/inj1-detector

Conversation

@ProtocolWarden

Copy link
Copy Markdown
Owner

Summary

The last Phase-1 item of OperationsCenter's Harness Trust-Hardening (§2.2.6) — the outer layer of the injection defense (the load-bearing control is OC's code-computed typed verdict, already merged in OC #349/#350).

detect_inj1 deterministically scans tracked text for invisible / bidirectional control characters — the unambiguous, near-zero-false-positive signal of injection / homoglyph smuggling (hidden instructions aimed at a model or human reviewer).

Safety (designed not to break the fleet-wide audit)

  • Mirrors the boundary-detector shape (detect_inj1(context) -> DetectorResult + build_injection_detectors()), wired into the runner.
  • deprecated=Trueskipped by the default gate (opt-in via --only INJ1 --include-deprecated). A repo's own injection-handling code can't red the audit.
  • Reports codepoint + position only, never the surrounding text (D-INJ-3).
  • Legitimate handlers/fixtures opt out via a custodian:allow-invisible-chars content marker.
  • \u escapes throughout → the detector never self-triggers.

Verification

7 INJ1 tests; full Custodian suite 1126 passed; self-audit clean; ruff clean.

…HARDENING §2.2.6)

Deterministic scan of tracked text for invisible / bidirectional control
characters — the near-zero-false-positive signal of injection / homoglyph
smuggling. Mirrors the boundary-detector shape (detect_inj1 +
build_injection_detectors), wired into the runner as deprecated=True so it is
skipped by the default gate (opt-in only) and cannot red the fleet-wide audit.
Reports codepoint+position only (D-INJ-3); content-marker opt-out; \u escapes
so it never self-triggers. 7 INJ1 tests; full suite 1126 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ProtocolWarden ProtocolWarden merged commit c4cb17b into main Jun 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant