Skip to content

Bench: blind held-out score of the secret gate and destructive guard against ported rivals - #1988

Merged
remigiusz-antczak merged 1 commit into
mainfrom
land/heldout-1024b
Oct 24, 2026
Merged

remigiusz-antczak merged 1 commit into
mainfrom
land/heldout-1024b

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Supersedes #1987, whose CI failed the bench-integrity gate because the bench had no ledger.jsonl. This version adds one: SHA256-frozen.txt keeps the four preregistered lines (commit ad168d8c6) and appends the two secret-leaks.txt marker amendments, and the ledger records the preregistration and each amendment with its time. The pins test checks the last line per file. docs/INDEX.md is regenerated.

Every security-gate number so far was in-sample: the rules were tuned after seeing the corpus misses. This adds a held-out corpus written blind to Perun's rules and the earlier corpus, with hashes committed before scoring. No rule changed after scoring.

Held-out results (docs/bench/security-gates-heldout-1024/):

Gate Perun Rivals (ported rules)
Secret leaks found (30) / decoys flagged (30) 21 / 2 gitleaks v8.30.1: 23 / 0
Dangerous commands blocked (40) / benign blocked (40) 26 / 3 claude-code-safety-net subset: 17 / 2; hooks-mastery: 9 / 6
  • Out of sample, Perun trails gitleaks on secrets (21 against 23). Gitleaks catches 7 that Perun misses (AWS secret, Twilio, JWT, Azure, Discord, Linear, Mailgun); Perun catches 5 of gitleaks' 7 misses. The in-sample 30 against 22 does not generalize.
  • Perun leads on destructive commands (26 against 17 and 9). All 14 Perun misses are cloud, orchestration, NoSQL, disk-tool or base64-eval rows. These are leads for the next rule wave, which will be scored on a fresh corpus.
  • One of Perun's 2 decoy flags is the public AWS documentation example key, and flagging it is arguably correct. Three benign-row flags (git stash drop, find -delete, rm -rf /tmp/...) are debatable labels, noted in the README.

Integrity: the preregistration commit was squashed away, but the README and SHA256-frozen.txt record its hash, and scripts/test_security_gates_heldout.py asserts that the @@-stripped content matches it. Marker-only edits came after preregistration: three rows flagged by the repo privacy gate before scoring, and three flagged by GitHub push protection after scoring. They don't change the stripped content or any score.

Caveat: the corpus author is from the same model family as the rule author, so the two may share blind spots. Rival numbers come from ported rules, not the binaries.

An independent review found 0 🔴 and 2 🟡 (the prereg-reachability wording and the AWS-doc-key label caveat), both folded in.

Local CI repro: pins test ok; privacy, diff --check, size, size-ratchet, fragments and mustload are clean. test-ci-gates.sh gives 293 passed and 11 failed with the same failure list as main.

🤖 Generated with Claude Code

https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z

…against ported rivals

Four synthetic corpora (30 leaks, 30 decoys, 40 dangerous, 40 benign) were written before the rules or the first corpus were read, and their hashes committed first (preregistration commit ad168d8c6; secret-leaks.txt d7aef600ac9ad7c9b511c7f467e066d12f5bf99d98197192b9ec6eadbcc9217c, decoys c5f82cec87517931a0fed914c2fa8ece8a096868b535260856686a4560329c12, dangerous b0962b37d1bab25264ce28b9ae09488412496a6afd622c86f44ddb4accee3a4f, benign 257f644fa288203f17f29545c5b30c8261b527f0a19ebed5201654280b4b3f32). Three leak rows later gained privacy markers only; content with markers removed is byte-identical.

Held-out result, no rule changed after scoring: Perun 21/30 leaks (2/30 decoys flagged), 26/40 dangerous blocked (3/40 benign); gitleaks port 23/30 (0 FP); hooks-mastery port 9/40 (6 FP); safety-net subset port 17/40 (2 FP). Misses are logged as leads in the README. score.py gains --corpus-dir; pins run in CI.

Tests: scripts/test_security_gates_heldout.py ok; test-mustload-split.sh 0 FAIL; size, size-ratchet, fragments, privacy, diff --check clean

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014QNFFPWVcPUbeuvwM5fk2Z
@remigiusz-antczak
remigiusz-antczak merged commit c3f1409 into main Oct 24, 2026
1 check passed
@remigiusz-antczak
remigiusz-antczak deleted the land/heldout-1024b branch October 24, 2026 21:22
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