audit-context-building
Ce qu’il fait
Guide une lecture attentive d'un code inconnu avant toute recherche de bugs, pour que l'équipe comprenne comment les parties s'articulent. Il s'adresse aux relecteurs de sécurité qui commencent à travailler sur un nouveau code.
Quand l’utiliser
- ✓Quand un relecteur de sécurité commence l'audit d'un code qu'il ne connaît pas.
- ✓Quand une équipe prépare une revue d'architecture ou une modélisation des menaces d'un système existant.
- ✓Quand une revue précédente a produit des constats que personne ne pouvait juger, faute de comprendre le système.
Lien du skill
https://github.com/trailofbits/skills/blob/main/plugins/audit-context-building/skills/audit-context-building/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Je commence un audit de sécurité sur un code que je ne connais pas. Aide-moi d'abord à comprendre son fonctionnement.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
Le skill construit la compréhension sans nommer de bugs ni noter de risques. Il consigne ce que chaque fonction suppose et dont elle dépend, et enregistre les notes détaillées dans des fichiers pour garder le travail principal ciblé.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
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.
Questions fréquentes
Recherche-t-il des vulnérabilités ?
Non. Le skill sert d'abord à comprendre le code. La recherche de failles intervient dans une étape ultérieure.
Analysera-t-il tout le code d'un seul coup ?
Pour un code entier ou plusieurs fonctions, le skill confie l'analyse à des sous-agents et écrit les résultats dans un dossier de synthèse.
Que produit-il ?
Il produit un index, une liste d'hypothèses non vérifiées et de questions ouvertes, ainsi qu'une note pour chaque fonction.
Détails
Description originale de l’auteur
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
Popularité
- Étoiles GitHub
- 8.0k
- Position au classement
- #12655
- Licence
- CC-BY-SA-4.0
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
algorand-vulnerability-scanner
8.0kAide votre agent à scanner des contrats Algorand (TEAL, PyTeal) pour 11 failles courantes, comme la réaffectation de clé ou les frais non contrôlés.
audit-prep-assistant
8.0kAide votre agent à préparer votre code pour une revue de sécurité externe, avec analyse statique, couverture de tests, nettoyage du code mort et documentation claire.
cairo-vulnerability-scanner
8.0kAide votre agent à scanner les contrats Cairo sur StarkNet pour 6 problèmes graves, comme les dépassements arithmétiques et le rejeu de signature.
code-maturity-assessor
8.0kAide votre agent à évaluer un contrat intelligent ou une base de code blockchain selon 9 domaines de maturité, avec des preuves et une liste prioritaire d'améliorations.
Skills similaires
reverse-engineer-anything
422kAide votre agent à analyser les applications et paquets livrés, pour expliquer leurs fonctions, comparer des versions ou guider une reconstruction, avec REA.
1password
394kAide votre agent à configurer l'interface en ligne de commande de 1Password, à se connecter, et à lire ou injecter des secrets sans afficher leurs valeurs dans le chat.
healthcheck
394kAide votre agent à auditer l'ordinateur ou le serveur qui fait tourner OpenClaw pour détecter des risques de sécurité, comme SSH, le pare-feu, les mises à jour et les sauvegardes, puis à proposer des corrections sûres.