pattern-exhaustion
Skill này làm gì
Skill này giải thích cách lấy một lỗi bảo mật đã xác nhận và tìm cùng nguyên nhân gốc ở nơi khác trong mã. Skill dành cho người rà soát bảo mật và lập trình viên cần bao phủ đầy đủ sau một phát hiện.
Khi nào nên dùng
- ✓Khi một người rà soát đã xác nhận một lỗi bảo mật và muốn biết có bao nhiêu chỗ chia sẻ cùng nguyên nhân.
- ✓Khi agent phải phân loại nguyên nhân gốc của một lỗi, chẳng hạn như thiếu kiểm tra hoặc xây chuỗi không an toàn.
- ✓Khi một đội cần danh sách các vị trí mã khớp để rà soát trước khi phát hành bản sửa.
Liên kết skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/pattern-exhaustion/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chúng tôi vừa tìm thấy một kiểm tra quyền bị thiếu trong ứng dụng. Bạn có thể tìm các route khác có thể có cùng lỗ hổng không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đặt tên cho nguyên nhân gốc, biến nó thành mẫu tìm kiếm, chạy tìm kiếm trên toàn bộ mã, rồi kiểm tra từng kết quả trước khi tính vào.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Pattern Exhaustion
When you find a vulnerability, you have found a PATTERN. The same developer who wrote one broken auth check likely wrote twenty. The same framework that misses one guard has a systemic design gap. One root cause → multiple CVEs.
Real-world examples:
- Parse Server: 4 advisories from guard bypass patterns (prototype chain, falsy-value guard, protected-field bypass, complexity validator)
- zrok: 3 advisories from access control (symlink traversal, broken ownership, reflected XSS in callback)
- AVideo: 3 advisories from deployment config (SSRF, exposed installer, memcached session leak)
The Exhaustion Loop
1. Classify the root cause
After confirming a vulnerability, classify its root cause pattern:
| Root Cause | Search Pattern |
|---|---|
| Missing auth/authz check | grep -rn 'def handle_|router\.\(get|post|put|delete\)' | grep -v 'auth|permission|require|middleware' |
| Unvalidated path parameter | grep -rn 'req\.params|request\.args|ctx\.params' | grep -v 'sanitize|validate|path\.resolve|path\.normalize' |
| SQL string interpolation | grep -rn 'f"SELECT|f"INSERT|f"UPDATE|query(.*\+.*|query(.*\$\{' --include='*.py' --include='*.ts' --include='*.js' |
| shell: true with user input | grep -rn 'shell:\s*true|shell=True|os\.system|subprocess\.call.*shell' --include='*.py' --include='*.ts' --include='*.js' |
| Missing ownership validation | grep -rn 'delete|update|modify' --include='*.py' --include='*.ts' | grep -v 'owner|author|created_by|user_id.*==' |
| Default-open feature flag | grep -rn 'enabled.*=.*false|feature.*disabled|trust.*=.*true' --include='*.ts' --include='*.py' |
| Unsafe deserialization | grep -rn 'pickle\.loads|yaml\.load|yaml\.unsafe|unserialize|JSON\.parse.*reviver|eval(' --include='*.py' --include='*.js' --include='*.php' |
| Type confusion in guard | grep -rn 'typeof.*==|instanceof|is_array|Array\.isArray' --include='*.ts' --include='*.js' --include='*.php' |
| Missing CSRF/state check | grep -rn 'state=|csrf|nonce' --include='*.py' --include='*.ts' | grep -v 'verify|validate|check' |
| Prototype pollution | grep -rn 'Object\.assign|merge(|extend(|deepMerge|_.merge|lodash' --include='*.js' --include='*.ts' |
For semgrep (when installed):
# Generic: user input reaching dangerous sink without sanitization
semgrep --config auto --severity ERROR /workspace/target/src/ --sarif -o /workspace/exhaustion.sarif
kg_ingest_sarif("/workspace/exhaustion.sarif", "pattern-exhaustion")
2. Enumerate all instances
Run the search. For EACH hit:
- Check: is this the SAME pattern as the confirmed vuln?
- Check: is there a mitigation the original instance lacked?
- Check: is this in test/fixture/example code? (reject if so)
- If potentially exploitable, create a HYPOTHESIS node:
kg_add_node("hypothesis", "Missing ownership check in DELETE /api/v2/unaccess",
props={"pattern": "missing_ownership_validation", "file": "api/routes.py",
"line": 87, "related_finding": "<original_finding_id>",
"key": "api/routes.py:handle_unaccess:missing_ownership"})
Link to the original vulnerability:
kg_add_edge(new_hypothesis_id, original_vuln_id, "chains_to", weight=0.3)
3. Prioritize by impact
Not all instances are equal. Prioritize:
- Unauthenticated endpoints over authenticated ones
- Write/delete operations over read-only
- Production code paths over admin/debug routes
- External-facing over internal-only
4. Verify each instance
Feed each top candidate to the verifier with a separate positive and baseline
command. Persist the validate_workspace_finding result beside the candidate;
only a result with validated=true becomes a separate operational finding.
5. Exhaustion criteria
Stop the pattern search when:
- All instances have been checked (grep returns no unchecked matches)
- Remaining instances have proper mitigations in place
- The pattern no longer applies (different framework version, different code path)
- You've hit 10+ findings from the same pattern (diminishing returns on signal)
Record the exhaustion state:
kg_add_node("hypothesis", "pattern exhaustion complete: missing_ownership",
props={"pattern": "missing_ownership_validation", "status": "exhausted",
"total_instances": 15, "confirmed": 4, "rejected": 11})
Graph Structure
After exhaustion, the graph should show:
VULNERABILITY (original finding)
← chains_to ← FI
Câu hỏi thường gặp
Vì sao phải tìm cùng một mẫu?
Skill nói cùng một nhà phát triển hoặc framework thường lặp lại một lỗi, nên một lỗi có thể dẫn đến nhiều lỗi khác.
Kết quả tìm kiếm có phải là bằng chứng lỗi không?
Không. Skill nói mỗi kết quả phải được kiểm tra luồng dữ liệu và các lớp bảo vệ trước khi báo cáo.
Skill có ví dụ không?
Có. Skill liệt kê các cảnh báo trước đây, trong đó một nguyên nhân gốc đã tạo ra nhiều báo cáo liên quan.
Chi tiết
Mô tả gốc của tác giả
Systematic pattern exhaustion methodology. Load after finding any confirmed vulnerability to search for all instances of the same root cause pattern across the codebase.
Độ phổ biến
- Sao GitHub
- 6.5k
- Vị trí xếp hạng
- #13965
- Giấy phép
- Apache-2.0
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
detector-overview
6.5kGiúp agent của bạn đọc code mà một công cụ quét đã đánh dấu, rồi quyết định điểm nào là lỗ hổng bảo mật thật và điểm nào là báo động giả.
exploiter-overview
6.5kGiúp agent của bạn ghép nhiều lỗ hổng bảo mật đã xác nhận thành một chuỗi kiểm thử và kiểm tra chuỗi đó có thể gây hậu quả đến đâu.
llm-redteam-overview
6.5kGiúp agent của bạn tìm đúng hướng dẫn red-team AI cho một bài kiểm thử, bao quát 15 nhóm chiến thuật từ prompt injection đến lạm dụng mô hình.
aatmf-t01-prompt-injection
6.5kGiải thích prompt injection, khi các chỉ dẫn ẩn cố ghi đè một hệ thống AI, để chuyên gia bảo mật có thể kiểm tra lỗi này.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.