46c4316966
Adversarial audit rounds 5+6 на v3.5 spec выявили 45 attack-векторов: - Round 5 (v3.5→v3.6 + v3.6→v3.7 maximum-closure): 15 + 7 acceptable residual closed - Round 6 (v3.7→v3.8): 30 attack-векторов в 18 классах вкл. 4 FATAL v3.6 — Round 5 closure (15 holes, +9 protected paths, Smoke 4-7, §5.1↔§4.5 sync, recovery-pattern hard-block в §4.7). v3.7 — Maximum closure pass (7 v3.6 residual + edge): LLM-judge на каждую AskUser-опцию (R-NEW-1), parent_random_id 256-bit sentinel (R-NEW-4), restricted/ subdir + journal-reader CLI (R-NEW-2), shell-quote tokenizer (R-NEW-3), TF-IDF + LLM-judge для off-topic (R12), smart batching multi-question AskUser (S6), git stash variants в conditional class (Edge). v3.8 — Round 6 closure (30 holes в 18 classes): - F1 PowerShell tool gate (был полностью вне scope §5.1 — обнуляло архитектуру на Windows) - F2 Workflow internal agent() enumeration (nested агенты вне gate-visibility — unlimited bypass) - F3 node_modules whole-dir hard-deny + dep-checksums verification через SHA-256 ключевых deps - F4 LLM-judge anti-injection (delimiter tokens + pre-filter + multi-judge consensus Sonnet+Haiku) §3.1 protected paths расширен +30 entries (memory/CLAUDE.md/Pravila/ PSR/Tooling с Skill exemption для claude-md-management, CI/CD configs, lint/build configs, plugin cache, shell init, npm configs, node_modules, parent-sentinel, dep-checksums, expected-path). §3.0.1 OS-keychain для LLM key (Windows Credential Manager / Keychain / libsecret через keytar); key не в process.env → не утечёт через npm test stdout. §3.2.1 automated bootstrap smoke (1/5/6/7 на каждый session start, cached 7 days); user-run остаётся для 3/4/8. §6.1 docs/recovery-procedures.md новый файл — пошаговая шпаргалка PowerShell-команд для 3 уровней recovery. Budget: 13.5-20h (v3.5) → 22.5-32h (v3.6) → 33-44h (v3.7) → 45-60h (v3.8). Закрыто 105 holes total через 9 раундов adversarial audit. Generalisable lesson v3.8: каждый раунд аудита должен начинать с abstract classification классов атак до enumeration конкретных дыр. v3.7 «maximum closure» был maximum внутри границ воображения v3.6 R5-audit; Round 6 показал что сами границы имели дыры. Spec: 1980 → 2554 строк (+1110 inserts / -44 deletes за v3.6-3.8 sweep). +13 терминов в cspell-words.txt (PowerShell aliases, npm deps). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>