safety-pattern-auditor
БесплатноБез исполняемых скриптовНе проверенSystematic audit of safety patterns to identify gaps, regressions, and improvement opportunities
Об этом скилле
Safety Pattern Auditor Skill
Purpose: Conduct comprehensive audits of safety pattern coverage to find vulnerabilities before attackers do.
When to Use:
- Before releases (QA gate)
- After adding multiple patterns (sanity check)
- Monthly security reviews
- When vulnerabilities are reported
Duration: 1-3 hours depending on audit scope
Prerequisites
- Gap analyzer installed:
./scripts/analyze-pattern-gaps.py - Baseline captured:
./scripts/capture-safety-baseline.sh - Caro built:
cargo build --release - Test suite available:
.claude/beta-testing/test-cases.yaml
The 5-Phase Audit Workflow
Phase 1: Baseline Capture (10 min)
↓
Phase 2: Gap Analysis (20 min)
↓
Phase 3: Regression Testing (15 min)
↓
Phase 4: Priority Assessment (30 min)
↓
Phase 5: Report & Recommendations (30 min)
Phase 1: Baseline Capture (10 minutes)
Goal: Establish current state of pattern coverage.
Actions:
Capture pattern metrics:
./scripts/capture-safety-baseline.sh .claude/audits/baseline-$(date +%Y%m%d).jsonReview baseline:
cat .claude/audits/baseline-$(date +%Y%m%d).json | python3 -m json.toolKey metrics:
- Total pattern count
- Patterns by risk level (Critical/High/Medium)
- Test pass rates
Document starting point:
## Audit Baseline - 2026-01-08 - Total Patterns: 52 - Critical: 23 - High: 16 - Medium: 0 - Test Pass Rate: 4/4 (100%)
Output:
- Baseline JSON file created
- Metrics documented
- Starting point established
Phase 2: Gap Analysis (20 minutes)
Goal: Use automated tools to find missing coverage.
Actions:
Run gap analyzer:
./scripts/analyze-pattern-gaps.py src/safety/patterns.rs \ -o .claude/audits/gaps-$(date +%Y%m%d).mdReview gap report:
cat .claude/audits/gaps-$(date +%Y%m%d).mdCategorize gaps by detector type:
# Count gaps by type grep "**Type**: argument_order" .claude/audits/gaps-*.md | wc -l grep "**Type**: path_variant" .claude/audits/gaps-*.md | wc -l grep "**Type**: wildcard" .claude/audits/gaps-*.md | wc -l grep "**Type**: platform" .claude/audits/gaps-*.md | wc -lExtract critical gaps:
./scripts/analyze-pattern-gaps.py src/safety/patterns.rs \ --min-severity critical
Gap Categories:
Argument Order Gaps:
- Flags in different positions
- Combined vs separated flags
- Missing permutations
Path Variant Gaps:
- Trailing slashes
- Relative vs absolute paths
- Recursive parent references
Wildcard Gaps:
- Missing glob patterns
- Recursive wildcards (**)
- Hidden file patterns (.*)
Platform Gaps:
- PowerShell equivalents missing
- CMD command variants
- Cross-platform coverage
Output:
- Gap report generated
- Gaps categorized by type
- Critical gaps identified
- Total gap count documented
Phase 3: Regression Testing (15 minutes)
Goal: Ensure no regressions introduced recently.
Actions:
Run regression checker:
./scripts/check-safety-regressions.sh .claude/audits/baseline-*.jsonRun full test suite:
./target/release/caro test --backend static \ --suite .claude/beta-testing/test-cases.yamlCheck pattern compilation:
cargo test --lib safety::patterns --quietTest false positives (sample safe commands):
echo "cd .." | ./target/release/caro --backend static echo "ls -la" | ./target/release/caro --backend static echo "cp file.txt backup/" | ./target/release/caro --backend staticAll should be ALLOWED.
Red Flags:
- ❌ Pattern count decreased
- ❌ Risk level downgrades (Critical → High)
- ❌ Test pass rate dropped
- ❌ False positives (safe commands blocked)
- ❌ Compilation errors
Output:
- No regressions detected
- Test pass rate maintained
- False positive check passed
- Compilation successful
Phase 4: Priority Assessment (30 minutes)
Goal: Triage gaps and create action plan.
Actions:
Count gaps by severity:
./scripts/analyze-pattern-gaps.py src/safety/patterns.rs \ --format json | jq '.gaps | group_by(.severity) | map({severity: .[0].severity, count: length})'Assess each critical gap: For each critical gap, determine:
- Real-world likelihood (High/Medium/Low)
- Ease of exploitation (Easy/Medium/Hard)
- Existing coverage (None/Partial/Full)
- Fix complexity (Simple/Medium/Complex)
Create priority matrix:
Gap ID Severity Likelihood Ease Coverage Fix Priority GAP-001 Critical High Easy None Simple P0 GAP-002 Critical Medium Medi
Установить safety-pattern-auditor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл safety-pattern-auditor?
Systematic audit of safety patterns to identify gaps, regressions, and improvement opportunities
Как установить скилл safety-pattern-auditor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл safety-pattern-auditor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic