18 Commits
Author SHA1 Message Date
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 e30a5b8973 fix(run): closeout goal links Validated hypotheses to FIND files
Run 184313's agent canonized findings but never wrote the forward
'Linked findings' board field, so the scorer lost the confirmations.
The closeout goal now permits bookkeeping-only updates: link each
Validated hypothesis to its FIND-*.md via violin_record_hypothesis.
No new testing, findings, or evidence re-verification allowed.
2026-08-12 21:34:17 +01:00
Violin a82c1dfd86 fix(score): confirm findings via reverse hypothesis links
Run 20260812_184313 scored 0/20 formalized despite 7 FIND files and 8
Validated hypotheses: the agent canonized findings carrying 'Linked
Hypothesis: H-00N' but never wrote the forward 'Linked findings' board
field (it closed PT-102 by editing state/ptt.md directly, bypassing the
record_ptt handler gates). The scorer now:

- parse_findings extracts reverse 'Linked Hypothesis' references
- validated_challenge_ids falls back to reverse links / shared evidence
  when a Validated hypothesis has no forward links
- paper trail is unchanged: Validated hypothesis + substantive finding
  over real evidence, in either direction

Re-scoring 184313: formalized 0% -> 30% (6 confirmed). Regression test
test_validated_hypothesis_confirms_via_find_reverse_link added.
2026-08-12 21:32:56 +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 f593b359ae fix(score): count FIND-confirmed findings in technical proof union; cap formalization <=100% 2026-08-11 19:36:35 +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 e0b3cea379 fix(benchmark): curl-form endpoint matching + decisive discriminators
- _method_route_in_text now accepts '-X POST <url>' reproduction commands
  (quoted URLs no longer break the match) — recovers referral-abuse
- coupon-100-discount: decisive patterns (INTERNAL100 / 'discounted to $0')
  kill the false positive from a neg-qty finding whose checkout sent
  coupon_code:null
- weak-admin-creds: decisive patterns (DefaultCredentials / admin:password)
  stop mass-assign role-granted text from confirming it
- vuln-research playbook + hypothesis template: mandate 1:N Linked findings
  (an unlinked FIND file scores 0 even with perfect evidence)

Calibration still 20/20 + 0/0. Latest run re-scored: 6/20, now all true
positives (false coupon + false creds removed, referral recovered).
2026-08-11 13:03:47 +01:00
Violin 5c83ee3fdc fix(benchmark): closeout must finalize, not re-run; friction log benchmark-scoped
- _engagement_needs_closeout no longer fires on leftover unchecked PTT rows:
  a single '[ ]' task marker triggered a continuation pass that re-ran the
  entire assessment (255 msgs / 20m50s) instead of closing out. Closeout is
  now gated on the artifacts the scorer consumes (FIND files + report.md +
  retrospective.md) only.
- Closeout goal rewritten to be surgical: assessment is COMPLETE, evidence is
  final, no new tests/scans/verification, no evidence modification; only
  generate missing report/retrospective (prefer generate-closeout) and update
  PTT statuses.
- Friction-log instruction moved out of the general pentest SKILL.md (it is a
  benchmark-only artifact) into the benchmark goal prompt so the agent
  actually sees it.
- New pinned tests: leftover-PTT-row closeout detection, closeout-goal
  wording.
2026-08-10 21:23:54 +01:00
Violin ddffe9cccc fix(benchmark): engagement start stamp in local time, not UTC
datetime.now(UTC) made benchmark-run-<ts> dirs and started_at an hour
early on UTC+1 hosts. Use local wall-clock time for the run stamp.
2026-08-10 21:05:28 +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 48119a64cf feat(benchmark): implement proof verifier, AI judge refinements, and duck-store calibration evidence 2026-08-10 08:54:35 +01:00
Violin d41aec7457 fix(guard): stabilize engagement path resolution 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
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
0e6f0d854f fix: ruff format score.py (#46)
Co-authored-by: Violin <violin@local>
2026-07-19 16:57:35 +01:00
Violin 397ba907d7 feat: add Duck Store benchmark harness
4-file suite evaluating Violin against escape.tech's Duck Store:
- benchmark/score.py — evidence-gated scorer (8 fixes from first run)
- benchmark/targets/duck-store/challenges.json — 20 article-parity vulns
- benchmark/targets/duck-store/scope.yaml — pre-baked scope
- benchmark/targets/duck-store/engage.md + report.md — prompts

Also adds explicit model section to config.yaml.
2026-07-19 16:55:00 +01:00