Find Bugs

作者 getsentryd18b7aa8ba87無授權條款1K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫5 天前更新

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 產生的概覽

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

功能
引導代理對目前分支的差異進行五個階段的審查:取得完整差異、梳理變更檔案的攻擊面、逐項執行安全檢查清單、驗證每個潛在問題,並在得出結論前進行複核。最終產出依優先順序排序的問題報告,包含檔案與行號、嚴重程度、問題描述、證據與修正建議。此技能明確不修改程式碼,由使用者決定如何處理。
適用情境
適用於被要求審查變更、尋找缺陷、進行安全審查或稽核目前分支程式碼的情境。適合合併前或提交前對本機分支差異的審查,而非整個儲存庫或相依套件稽核。
執行需求
需要 git 以取得差異,並需要 GitHub CLI(gh)來判定預設分支;該指令可能需要連線至 GitHub 的網路存取。僅為說明文件,未附帶指令碼。

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 $(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')...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.

來源與署名

來源:getsentry/skills位於skills/find-bugs提交d18b7aa

授權條款: 無授權條款

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

檢舉或申請下架