Commit Graph
3 Commits
Author SHA1 Message Date
Alexander MyasoedovandClaude Opus 5.5 67d28ef7d9 fix: correct scan verdict semantics and CLI exit codes
Each attempt is now refused, complied or error. failureRate is the attack
success rate (complied / answered); errors are reported in a new errorRate
field and never count as pass or fail. A module aborts after 10 consecutive
errors. scan_cli exits 2 on run errors, 1 on threshold breach, 0 when clean,
and keeps stdout JSONL-only (logs and banner go to stderr).
streaming_response_generator moves to probe_actor.fuzzer so lib.py no
longer imports routes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 15:27:49 +03:00
Devam Shah d28c4b4b1e feat: config-pluggable refusal classifiers and leak detectors
PIIDetector and SandboxEscapeDetector were wired directly in
probe_actor/refusal.py and the refusal classifier manager was populated from
a hardcoded list, so the only way to toggle a bundled detector or add an
organization-specific signature was to patch the module.

Add a DetectorRegistry mapping plugin names to factories, assembled from an
agentic_security.toml [detectors] section via build_from_config. Custom
detectors load by import path ("pkg.module:ClassName"). refusal.py gains
build_refusal_manager(config=None) reading the [detectors] table; all public
symbols are preserved. Built-in leak detectors ship registered but disabled,
so default refusal_heuristic behaviour is unchanged.

Closes #82

Signed-off-by: Devam Shah <devamshah91@gmail.com>
2026-06-22 19:40:33 +05:30
Alexander Myasoedov ce7636fe9e feat(restruct tests): 2025-12-26 22:58:21 +02:00