101 Commits
Author SHA1 Message Date
Violin 4fc6e0c22b fix(guard): coverage-gate error teaches remediation per cell status
Run 20260813_101504 burned ~15 min and 19 close attempts on the
undispositioned-coverage gate: the error listed failures without naming
the fix, so the agent flailed (even reading guard source) and wrote
invalid reasons ('evidence: none else'). The error now spells out the
exact remediation per cell status (tested/not_applicable/blocked/missing).
2026-08-13 12:31:41 +01:00
Violin 625ca927c0 chore(guard): rename receipt key env var to drop benchmark reference
VIOLIN_BENCHMARK_RECEIPT_KEY -> VIOLIN_RECEIPT_KEY. The all-caps
'BENCHMARK' slipped past the original case-sensitive de-cheat grep in
plugins/violin_guard. No consumers hardcode the literal; all use the
RECEIPT_KEY_ENV constant.
2026-08-13 10:40:39 +01:00
Violin c38a5ea323 fix(guard): heartbeat message nudges context compaction
Run 20260812_204014 died at 27m with HTTP 402 prompt-token limit
(141557 > 99922): the agent executed 328 tool calls without ever
compacting, cutting exploitation short (12/20, 8 challenges never
probed). The heartbeat now reminds the agent to compact when the run
has executed many commands.
2026-08-12 22:11:12 +01:00
Violin 723e349291 fix(guard): scope online-research gate to the exploited hypothesis
- check_command now accepts hypothesis_id (schema + handler + args)
- Exploit-phase research gate checks only the named hypothesis when
  provided; otherwise all candidates (previous behavior)
- Error message names the remediation tool: violin_record_hypothesis
  id=H-00N cve_research=... exploit_research=...
- Fixes silent bypass: normalized id comparison (002 vs 2) so an
  unresearched hypothesis is actually blocked
- New test: named-hypothesis passes, unresearched H-002 blocked,
  all-candidates mode still enforces full rows
2026-08-12 18:52:42 +01:00
Violin 46bad5c1a8 refactor(guard): de-benchmark production code; route-level coverage obligations
- Remove challenge_ids seeding (vulnerability-name leak) from scope;
  seed engagement.coverage_obligations (client-style in-scope endpoints)
  + generic engagement.audit_mode flag instead
- plugins/violin_guard now contains zero benchmark/run-id references;
  gates are framework-owned and audit-mode-gated
- Cross-engagement guard blocks ANY foreign engagement dir, not just
  benchmark-run-*
- Anti-cheat regression test asserts no vuln names in generated scope
2026-08-12 07:09:51 +01:00
Violin 61e3ed8b61 fix(guard): coverage completeness — every scored challenge needs an evidence-backed matrix cell 2026-08-11 20:20:07 +01:00
Violin b84cd852f2 fix(guard): accept business-logic vuln classes; surface review_batch sync-credit recovery in denial 2026-08-11 20:16:08 +01:00
Violin 5355ff1b68 fix(guard): review-block curl -s without status capture so receipts are decisive 2026-08-11 19:43:26 +01:00
Violin 132e6f7c9a fix(guard): require Validated hypotheses to link canonical FIND files at VULN_RESEARCH close 2026-08-11 18:24:32 +01:00
Violin 9a40ec645c fix(guard): block rejections that never ran their cheapest discriminating test 2026-08-11 17:57:02 +01:00
Violin 6b2bc26af3 fix(benchmark): seed engage brief, close phase-skip loophole, evidence-backed coverage 2026-08-11 17:09:35 +01:00
Violin b8262d585d feat(guard): record-as-you-go recency gate — hard block on deferred bookkeeping
The advisory contract rule was not enough: flash-class agents defer
hypothesis/coverage/PTT writes to closeout, then reconstruct results from
conversation memory after compression — the false-positive factory.

check_hypothesis_freshness now hard-blocks further target commands when the
newest execution evidence is newer than the hypothesis board's last update
(15 min grace for burst timing). The agent MUST record the batch result via
violin_record_hypothesis before proceeding. Bursts preflight all commands
before any executes, so no mid-burst false blocks.

Also fixes a silent test-suite gap: tests/__init__.py and the four
subpackage __init__.py files were missing, so 171 integration tests
(incl. test_plugin_guard.py which pins freshness behavior) NEVER ran.
Suite went from 248 passed / 7 collection errors to 419 passed, 0 errors.
2026-08-11 13:46:53 +01:00
Violin 119e0c1600 feat(guard): friction auto-logs at block time + record-as-you-go contract
Agent was deferring framework feedback and state writes to closeout, then
reconstructing what happened from conversation memory after compression —
the exact mechanism that fabricates false positives.

- Guard now self-logs: _check_command_internal appends a Guard Block/Review
  row to state/framework_feedback.md at the moment check_command rejects a
  command (only when the file exists, i.e. benchmark engagements; no-op
  otherwise). Friction is captured with zero agent bookkeeping.
- SKILL.md Operational Contract: 'Record as you go' — after EVERY
  violin_review_batch, immediately update hypothesis board + coverage matrix
  + PTT in the same turn; never batch state writes to closeout, never
  reconstruct tests from memory. State files are the only source of truth.
- 5 new tests: block-row append, no-op without file/errors, dedupe, pipe
  escaping.

243 tests pass, ruff clean.
2026-08-11 13:41:51 +01:00
Violin bbc2d93a63 feat(guard): generated closeout artifacts + framework-owned methodology
- generate-closeout CLI derives findings.yaml and report.md from canonical
  FIND-NNN.md files; agent closeout reduced to executive-summary narrative
- Per-finding recording cut from 4 surfaces to 2 (hypothesis + FIND)
- New skills/pentest/references/exhaustive-coverage.md mandated from SKILL.md;
  Operational Contract (SKILL.md S7) and Citation Discipline (evidence ref S8)
- Benchmark goal/closeout prompts reduced to task + integrity constraint

Tests: 233 passed (7 new); live-verified against real Aug 10 run (10/10
findings, ids+severities match hand-written original).
2026-08-10 20:52:10 +01:00
Violin 3807d22eaa fix(benchmark): evidence-gated scorer contract, false-positive discriminators, runner validity
- Confirm Validated hypotheses via canonical FIND-NNN.md matched in live-app
  terms (METHOD + endpoint route) alongside execution bundles
- require/require_any discriminators for shared-endpoint challenges;
  absence-type scoring for no-rate-limiting
- Runner: closeout timeout is a soft warning, not run invalidation
- ai_judge: whitelist legitimate closeout artifacts in schema-drift audit
- Align version surfaces to 3.1.0; move pyyaml to runtime deps

Calibration: known-good 20/20, known-bad 0/0. Latest run re-scored 4 -> 9.
2026-08-10 20:52:02 +01:00
Violin 48a4f214d6 feat(guard): add receipt integrity verifier, fail-closed state parsers, and guard runtime tests 2026-08-10 08:54:56 +01:00
Violin d41aec7457 fix(guard): stabilize engagement path resolution 2026-08-08 13:29:11 +01:00
Violin d7e139c486 feat: implement violin_guard plugin with secure execution adapters, terminal policies, and pentest skill frameworks 2026-08-08 13:29:11 +01:00
Violin 5e21f2257f fix(benchmark,guard): enhance benchmark profiling, guard UX, and findings integration 2026-08-08 13:29:11 +01:00
Violin 9ed494d439 feat: introduce benchmark runner with Docker support and automated vulnerability calibration evidence 2026-08-08 13:29:11 +01:00
Violin 4b21dce94a feat: harden benchmark evaluation and guard runtime 2026-08-08 13:29:11 +01:00
3b21e0a92a feat: Automated Benchmark Runner and Evaluation Framework (#68)
* fix: bump distribution version to 3.0.1

* feat(benchmark): introduce benchmark runner engine, Docker containerization, and calibration datasets

* Fix URL/path scope exclusions and update duck-store template

- Modified targets.py to ensure that excluding a specific URL or path does not result in the entire host being blocked. Implemented a strict command payload check for excluded endpoints.

- Updated duck-store benchmark scope template to explicitly block the /vulnerabilities endpoint (which leaks intentional challenges) while allowing access to endpoint documentation.

* fix: correct scope.yaml indentation and refine guard blocking messages

* fix: resolve ModuleNotFoundError when score.py is executed directly

---------

Co-authored-by: Dan <dan@strategicautomation.local>
2026-08-08 13:29:11 +01:00
DanandGitHub 5071b9689f docs(release): align workflow instructions, hypothesis discipline, and release v3.0.1 (#64)
Merge dev into master
2026-08-04 17:18:44 +01:00
DanandGitHub 2932bdf46c Make execution lifecycle recovery PID-safe (#56)
Record PID creation times and deadlines, make restart recovery identity-safe, and use UUID batch IDs.
2026-08-01 22:32:27 +01:00
DanandGitHub 7607bcb181 Make burst admission atomic (#61)
Closes #11
2026-08-01 22:20:47 +01:00
DanandGitHub e5e258fa0b Fix dotted target parsing and network bookkeeping (#60)
Closes #17
2026-08-01 22:09:33 +01:00
DanandGitHub f72f838933 Recover interrupted skill delivery (#59)
Closes #55
2026-08-01 22:02:44 +01:00
DanandGitHub 09d8e842e3 Stabilize v3.0.0 workflow contracts (#58)
Closes #54
2026-08-01 21:56:15 +01:00
Violin acd270c171 fix(guard): use TypeVar for Python 3.11 compatibility in schemas.py 2026-07-26 17:23:25 +01:00
Violin 6860f30876 style: format code with ruff 2026-07-26 17:11:10 +01:00
Violin 1e04f565b0 feat(guard): replace custom shell regexes with bashlex AST parsing 2026-07-26 17:11:05 +01:00
Violin 06a60afa47 feat(guard): upgrade IP/CIDR scope policy arithmetic to netaddr IPSet and yarl URL parsing 2026-07-26 17:10:27 +01:00
Violin 0b135660ee feat(guard): replace platform-specific process termination with psutil tree cleanup 2026-07-26 17:09:55 +01:00
Violin 58f487f19d feat(guard): migrate tool schemas and validation to Pydantic v2 2026-07-26 17:09:00 +01:00
Violin 7ee714a6ce fix(guard): resolve file path resolution and bootstrap issues 2026-07-26 16:03:02 +01:00
Violin 7979359855 feat: implement terminal_policy guard to restrict unsafe local command execution 2026-07-26 14:02:49 +01:00
Violin 19af0fcc52 feat: implement guard plugin PTT workflow automation and batch execution handlers with associated regression coverage 2026-07-26 11:06:27 +01:00
Violin e8c6a1c313 feat: implement terminal command guard policy to restrict target-touching actions 2026-07-26 11:04:05 +01:00
Violin 4fc7ffb4c6 feat: add terminal guard policy for filtering unsafe raw shell commands and include pentest playbook documentation. 2026-07-26 10:44:56 +01:00
Violin 728376fa0a perf(guard): pre-compile module-level regex constants in ptt.py 2026-07-25 14:28:35 +01:00
Violin af311a340e refactor(guard): flatten _has_target_literal nesting from depth 5 to 2 via token helper 2026-07-25 14:27:36 +01:00
Violin 58be36d628 refactor(guard): flatten resolve_target nesting from depth 5 to 2 via strategy helpers 2026-07-25 14:26:53 +01:00
Violin fb25a56c2e refactor(guard): decompose check_release into manifest, isolated import, snapshot, linter, and stale doc helpers 2026-07-25 14:26:02 +01:00
Violin fb27692e41 refactor(guard): decompose handle_status into status blockers, phase metadata, and skill summary helpers 2026-07-25 14:25:12 +01:00
Violin 3d93298150 refactor(guard): decompose handle_review_batch into skill reservation and core execution helpers 2026-07-25 14:24:24 +01:00
Violin 502b8673cd refactor(guard): decompose handle_record_ptt into focused helper functions 2026-07-25 14:23:35 +01:00
Violin 75de650f5e refactor(guard): decompose _validate_review_batch into focused sub-validators 2026-07-25 14:22:55 +01:00
Violin b274364118 feat: implement violin_guard plugin for secure pentest execution, target policy enforcement, and workflow orchestration 2026-07-25 14:13:38 +01:00
Violin db530964b4 Route PTT skill delivery from candidate source 2026-07-22 11:32:00 +01:00
Violin 827ca411a0 Record research receipts for semantic unlocks 2026-07-22 11:29:35 +01:00