Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

safety-pattern-auditor

БесплатноБез исполняемых скриптовНе проверен

Systematic audit of safety patterns to identify gaps, regressions, and improvement opportunities

wildcardот wildcard★ 41 звезда на GitHub12 установок в других каталогах

Об этом скилле

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:

  1. Capture pattern metrics:

    ./scripts/capture-safety-baseline.sh .claude/audits/baseline-$(date +%Y%m%d).json
    
  2. Review baseline:

    cat .claude/audits/baseline-$(date +%Y%m%d).json | python3 -m json.tool
    

    Key metrics:

    • Total pattern count
    • Patterns by risk level (Critical/High/Medium)
    • Test pass rates
  3. 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:

  1. Run gap analyzer:

    ./scripts/analyze-pattern-gaps.py src/safety/patterns.rs \
      -o .claude/audits/gaps-$(date +%Y%m%d).md
    
  2. Review gap report:

    cat .claude/audits/gaps-$(date +%Y%m%d).md
    
  3. Categorize 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 -l
    
  4. Extract 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:

  1. Run regression checker:

    ./scripts/check-safety-regressions.sh .claude/audits/baseline-*.json
    
  2. Run full test suite:

    ./target/release/caro test --backend static \
      --suite .claude/beta-testing/test-cases.yaml
    
  3. Check pattern compilation:

    cargo test --lib safety::patterns --quiet
    
  4. Test 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 static
    

    All 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:

  1. 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})'
    
  2. 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)
  3. Create priority matrix:

    Gap ID Severity Likelihood Ease Coverage Fix Priority
    GAP-001 Critical High Easy None Simple P0
    GAP-002 Critical Medium Medi
Полный SKILL.md на GitHub

Установить safety-pattern-auditor в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

QUICK-REFERENCE.mdREADME.mdexamples/audit-report-template.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить safety-pattern-auditor с