Find Bugs

davila7/claude-code-templates/cli-tool/components/skills/sentry/find-bugs

作者 davila78da17d671b6f無授權條款32K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

Find bugs, security vulnerabilities, and code quality issues in local branch changes. Use when asked to review changes, find bugs, security review, or audit code on the current branch.

AI 產生的概覽

審查本機分支變更中的缺陷、安全漏洞與程式碼品質問題,只回報發現而不修改程式碼。

功能
此技能引導對目前分支與 master 之間的差異進行結構化審查。它會依變更檔案梳理攻擊面,執行涵蓋注入、XSS、驗證、授權、CSRF、競態條件、工作階段、加密、資訊洩漏、DoS 與業務邏輯的安全檢查清單,並將每個疑似問題與周邊程式碼及現有測試核對驗證。最後產出依優先順序排列的發現報告,包含檔案與行號、嚴重程度、問題描述、證據、具體修正建議與參考標準,並明確不修改程式碼。
適用情境
當被要求審查分支變更、尋找缺陷、進行安全審查或稽核目前分支程式碼時使用。適用於合併前對本機變更的審查,需要的是有證據支撐、依優先順序排列的發現報告,而非直接修改。
執行需求
需要 git 版本庫且存在 master 分支,並能執行 git diff 指令;不包含指令碼或額外相依套件。

Find Bugs

Review changes on this branch for bugs, security vulnerabilities, and code quality issues.

Phase 1: Complete Input Gathering

  1. Get the FULL diff: git diff master...HEAD
  2. If output is truncated, read each changed file individually until you have seen every changed line
  3. List all files modified in this branch before proceeding

Phase 2: Attack Surface Mapping

For each changed file, identify and list:

  • All user inputs (request params, headers, body, URL components)
  • All database queries
  • All authentication/authorization checks
  • All session/state operations
  • All external calls
  • All cryptographic operations

Phase 3: Security Checklist (check EVERY item for EVERY file)

  • Injection: SQL, command, template, header injection
  • XSS: All outputs in templates properly escaped?
  • Authentication: Auth checks on all protected operations?
  • Authorization/IDOR: Access control verified, not just auth?
  • CSRF: State-changing operations protected?
  • Race conditions: TOCTOU in any read-then-write patterns?
  • Session: Fixation, expiration, secure flags?
  • Cryptography: Secure random, proper algorithms, no secrets in logs?
  • Information disclosure: Error messages, logs, timing attacks?
  • DoS: Unbounded operations, missing rate limits, resource exhaustion?
  • Business logic: Edge cases, state machine violations, numeric overflow?

Phase 4: Verification

For each potential issue:

  • Check if it's already handled elsewhere in the changed code
  • Search for existing tests covering the scenario
  • Read surrounding context to verify the issue is real

Phase 5: Pre-Conclusion Audit

Before finalizing, you MUST:

  1. List every file you reviewed and confirm you read it completely
  2. List every checklist item and note whether you found issues or confirmed it's clean
  3. List any areas you could NOT fully verify and why
  4. Only then provide your final findings

Output Format

Prioritize: security vulnerabilities > bugs > code quality

Skip: stylistic/formatting issues

For each issue:

  • File:Line - Brief description
  • Severity: Critical/High/Medium/Low
  • Problem: What's wrong
  • Evidence: Why this is real (not already fixed, no existing test, etc.)
  • Fix: Concrete suggestion
  • References: OWASP, RFCs, or other standards if applicable

If you find nothing significant, say so - don't invent issues.

Do not make changes - just report findings. I'll decide what to address.

來源與署名

來源:davila7/claude-code-templates位於cli-tool/components/skills/sentry/find-bugs提交8da17d6

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架