audit-context-building
Skill này làm gì
Hướng dẫn đọc kỹ code lạ trước khi tìm lỗi, để nhóm hiểu các phần ghép với nhau như thế nào. Dành cho người review bảo mật mới bắt đầu làm việc trên code mới.
Khi nào nên dùng
- ✓Khi người review bảo mật bắt đầu kiểm toán một codebase họ chưa từng thấy.
- ✓Khi nhóm lên kế hoạch review kiến trúc hoặc mô hình mối đe dọa cho một hệ thống có sẵn.
- ✓Khi một lần review trước đưa ra phát hiện mà không ai đánh giá được vì hệ thống chưa rõ.
Liên kết skill
https://github.com/trailofbits/skills/blob/main/plugins/audit-context-building/skills/audit-context-building/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
“Tôi bắt đầu kiểm toán bảo mật một codebase mình không biết. Hãy giúp tôi lập bản đồ cách nó hoạt động trước.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill xây dựng hiểu biết mà không gọi tên lỗi hay đánh giá rủi ro. Nó ghi lại những gì mỗi hàm giả định và phụ thuộc vào, và lưu ghi chú chi tiết vào file để công việc chính vẫn tập trung.
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.
Audit Context Building
Build understanding, not verdicts. This runs before anyone hunts for bugs, and feeds that work.
When to Use
At the start of an audit, a threat model, or an architecture review, when the code is unfamiliar. Also when an earlier pass produced findings nobody could judge, because no one had mapped out how the system fits together.
When NOT to Use
Do not name vulnerabilities, suggest fixes, write proofs-of-concept, or rate severity. Those belong to the hunting phase, which runs next and with the whole picture in hand. When the code counts on something and nothing checks it, record that plainly and move on — whether it matters is decided later.
Not worth the tokens on code you already understand.
Do not analyze in this context
The analysis is long, and this context needs to survive to use it. Dispatch it:
- A codebase, or more than one function — run
/audit-context-building:audit-context <path>. It orients, analyzes each function in its own subagent, and writesaudit-context/DOSSIER.mdplus one file per function underaudit-context/functions/. Only compact records return here. - A single function — dispatch the
audit-context-building:function-analyzeragent at it. It writes its prose to disk and returns a record.
Then work from what comes back: the index, the unenforced assumptions, the open questions. Read a function's file when you need its detail.
The workflow is what enforces this, not this text: a subagent bound to a return schema cannot return prose. Treat this section as routing, and route.
What comes back, and how to read it
Each record lists what must always be true (with the line that shows it), what the function takes on faith (with whatever establishes it), which functions it calls and what it needs from each, and anything still unclear. The dossier adds the rules that span several functions, who can reach what, and where the complicated parts cluster.
Two things matter more than the rest:
- Assumptions marked
nothing found. The code counts on something being true and nothing anywhere makes it true. This is the most useful thing to hand the hunting phase. - The open questions. An honest list of what is still unclear beats a confident answer that turns out to be wrong. Carry them forward instead of closing them out.
Where two records disagree, both are quoted rather than quietly reconciled. That is a fact about the code, not a flaw in the analysis.
The format
ANALYSIS_FORMAT.md defines it, and FUNCTION_MICRO_ANALYSIS_EXAMPLE.md works through examples in C and Solidity. Read them when extending this plugin or deciding whether a record can be trusted.
The format is the same whatever the target. What changes is what fills each slot, and what counts as a call you cannot see inside. DOMAIN_NOTES.md maps that across smart contracts, C and C++, decompiled firmware, and web services — read it when the target is not plain source code.
The rule that matters most: follow the calls. Whether a function is correct usually depends on something
another function does, and you cannot see that from the caller alone. A limit looks enforced because the
value came back from a function whose name suggests it was checked. So read the function being called, follow
every path through it rather than only the one that succeeds, and say what makes each assumption true. When
nothing does, use those words: nothing found. Every claim cites a line, or becomes an open question.
Câu hỏi thường gặp
Nó có tìm lỗ hổng không?
Không. Skill dùng để hiểu code trước. Việc tìm lỗi thuộc bước sau.
Nó có phân tích toàn bộ codebase cùng lúc không?
Với toàn bộ codebase hoặc nhiều hàm, skill giao việc phân tích cho các subagent và ghi kết quả vào file hồ sơ.
Nó tạo ra những gì?
Nó tạo một chỉ mục, danh sách các giả định không được thực thi và câu hỏi còn mở, cùng một ghi chú cho mỗi hàm.
Chi tiết
Mô tả gốc của tác giả
Understand a codebase before looking for bugs in it - what each function assumes, what it guarantees, and what it depends on elsewhere. Use when starting an audit, threat model, or architecture review on unfamiliar code, and before any vulnerability-hunting pass.
repo: trailofbits/skills
Độ phổ biến
- Sao GitHub
- 8.0k
- Vị trí xếp hạng
- #12655
- Giấy phép
- CC-BY-SA-4.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
algorand-vulnerability-scanner
8.0kGiúp agent quét smart contract Algorand viết bằng TEAL hoặc PyTeal để tìm 11 vấn đề bảo mật phổ biến, như tấn công rekey và phí không được kiểm tra.
audit-prep-assistant
8.0kGiúp agent chuẩn bị codebase cho một đợt review bảo mật bên ngoài, với phân tích tĩnh, độ phủ test, dọn mã chết và tài liệu rõ ràng.
cairo-vulnerability-scanner
8.0kGiúp agent quét smart contract Cairo trên StarkNet để tìm 6 vấn đề nghiêm trọng, gồm tràn số học, thông điệp xuyên lớp rủi ro và replay chữ ký.
code-maturity-assessor
8.0kGiúp agent chấm điểm độ trưởng thành của một codebase smart contract hoặc blockchain theo 9 lĩnh vực, có bằng chứng và danh sách cải thiện ưu tiên.
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.