Détecteur d'injection de prompts
Détecte les caractères Unicode invisibles et les directives hostiles cachées dans les fichiers d'instructions.
Comment l'utiliser
Dans Claude Code, lance ces commandes :
/plugin marketplace add karanb192/claude-code-hooks /plugin install instructions-audit@claude-code-hooks
Présentation
Le contenu est réservé aux abonnés
Compris dans SuperPrompt : copiez, téléchargez et installez toutes les fiches, avec les six agents métier x10. 7 jours gratuits, puis 97 € par an, résiliable en trois clics.
Description d'origine, en anglais
A prompt-injection tripwire for instruction files. An InstructionsLoaded hook audits CLAUDE.md / .claude/rules/*.md content as it enters context and flags hidden or hostile directives: invisible Unicode smuggling (zero width characters, tag characters, variation-selector runs; the TrapDoor supply-chain signature), bidi overrides, directives to read or exfiltrate secrets, curl|sh, decode-and-execute, and hook/settings tampering. Because current builds cannot block on that event, the same script also registers on UserPromptSubmit and PreToolUse as the enforcement arm: a finding locks the session and every prompt and tool call is denied until a human fixes the file or clears the named lock. Tune via HOOK_AUDIT_LEVEL (critical/high/strict) and HOOK_AUDIT_WARN_ONLY, no file edits needed.
D'où vient cette fiche
Création de Karan Bansal, publiée sur karanb192/claude-code-hooks sous licence MIT.
Le contenu est reproduit tel quel, dans le respect de sa licence. Le titre, le résumé et le classement en français sont rédigés par SuperPrompt.
