Command Palette

Search for a command to run...

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

forensic-audit

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

Three-phase read-only forensic audit of a codebase. Use when the user invokes `/forensic-audit`, asks to run a "forensic audit", "forensic audit pipeline"…

bergschlossот bergschloss299 установок в других каталогах

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

Skill: forensic-audit

Trigger

Use this skill when the user invokes /forensic-audit, asks to run a "forensic audit", "forensic audit pipeline", "multi-pass audit", "security audit", "vulnerability scan", "security check", or "code vulnerability scan".

Description

Three-phase read-only forensic audit of a codebase. Each phase is written to a timestamped report file before the next phase begins. Reports are saved to %USERPROFILE%\Desktop\_Reports\<timestamp>\.

STRICT READ-ONLY: Never modify, refactor, or create any files inside the project repository. Only write to the _Reports output folder.


Execution Protocol

Pre-flight (before any phase)

  1. Resolve output path: $outDir = "$env:USERPROFILE\Desktop\_Reports\$(Get-Date -Format 'yyyy-MM-dd_HHmm')" — new timestamped subfolder every run to preserve previous audits.
  2. Create output dir: mkdir -p "$outDir" (or equivalent PowerShell command) — confirm creation, abort if it fails.
  3. Capture repo context (embed in every report header):
    • Current directory (repo root)
    • git rev-parse --short HEAD — git hash
    • git branch --show-current — branch name
    • git status --short — dirty/clean state
  4. Quick signal scan (run before Phase 1 to orient findings): Use the grep_search tool (or run_command to run rg):
    # Unbounded queries
    rg "\.findMany\(\)" --type ts -l
    
    # Potential hardcoded secrets
    rg -i "password\s*=\s*['\"][^'\"]{4,}|api_key\s*=\s*['\"]|secret\s*=\s*['\"]" --type ts -l
    
    # Missing await / fire-and-forget risks
    rg "^\s*[^/].*\bprisma\." --type ts -l | head -20
    
    # console.log with sensitive-looking data
    rg "console\.(log|error)\(.*?(token|password|secret|hash)" --type ts -l
    
    # TODO / FIXME / HACK markers
    rg "TODO|FIXME|HACK|XXX" --type ts
    
  5. Directory snapshot: rg --files apps/api/src | sort — full source tree before Phase 1.

Report Header Template (prepend to every phase file)

# [Phase Title]
**Date**: YYYY-MM-DD HH:MM
**Repo**: [repo root path]
**Git HEAD**: [short hash] ([branch])
**Dirty files**: [output of git status --short, or "clean"]
**Auditor role**: [role for this phase]
---

Phase 1 — Security, Cryptography & Data Privacy

Role: Senior Cybersecurity Expert (OWASP), Cryptographer, EU DPO.

Audit scope — read the relevant source files using view_file or search via grep_search, then write findings:

PASS 1: Authentication & Privilege Escalation

  • POST /register: guard preventing unauthenticated users from passing role: "ADMIN" or role: "OPERATOR" in the payload?
  • JWT plugin: secrets verified against empty/default fallbacks? Expiration enforced? Refresh token rotation (RTR) atomic and replay-safe?
  • TOTP /totp/verify: lastUsedTotpCode stored to prevent 30-second replay attacks?

PASS 2: Authorization & IDOR

  • Every business route: explicit auth hook (preHandler: [app.authenticate])? Unprotected endpoints?
  • CLIENT-scoped endpoints (GET /api/queue/:id, POST /api/appointments, POST /api/sessions/:id/feedback): strict ownership validation, or IDOR via ID swap?

PASS 3: Rate Limiting & Brute Force

  • /login, /register, /forgot-password, /reset-password, /totp/verify: is rateLimit config present? What are the limits? Are they adequate?
  • Missing rate limit on any auth-adjacent endpoint = HIGH finding.

PASS 4: Cryptographic Practices & Secret Hygiene

  • AES-256-GCM helper (crypto.ts): key length verified at startup? authTag and iv correctly stored/decrypted?
  • Desktop credential storage: plaintext JSON in %APPDATA% or Electron safeStorage?
  • GET /clients and similar: sensitive fields (encrypted passwords, raw tokens, hashes) explicitly excluded from Prisma select?
  • Hardcoded secrets scan: any API keys, tokens, or passwords committed directly in source (.ts, .js, .env.* tracked by git)?
  • console.log / app.log calls that print tokens, hashes, or raw PII?

PASS 5: Stripe Webhook Security

  • /webhooks/stripe: webhook signature verified via stripe.webhooks.constructEvent? What happens if STRIPE_WEBHOOK_SECRET is missing?
  • Is the raw body preserved (not parsed as JSON) before signature check?
  • Does the handler log Stripe event payloads in a way that could expose customer PII?

PASS 6: GDPR / DSGVO Compliance

  • Account deletion (POST /api/dsgvo/delete-account): cascade deletes/anonymizes orphaned Client PII (names, addresses, RustDesk access data)?
  • Session consent handler: logs immutable metadata (IP, timestamp, clientId) confirming explicit consent before remote control?
  • Data export (GET /api/dsgvo/export): does it include all personal data per Art. 20? Is the download URL scoped to the requesting user?

Output format:

## 1. Executive Summary (Security Focus)
## 2. Top Critical Security Vulnerabilities
## 3. Detailed Severity Breakdown

### CRITICAL findings
[file:line] CRITICA
Полный SKILL.md на ClawHub

Установить forensic-audit в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл forensic-audit?

Three-phase read-only forensic audit of a codebase. Use when the user invokes `/forensic-audit`, asks to run a "forensic audit", "forensic audit pipeline", "multi-pass audit", "security audit", "vulnerability scan", "security check", or "code vulnerability scan".

Как установить скилл forensic-audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл forensic-audit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить forensic-audit с