/** * AI agent skills / rules-file scanner (v5.3). * * AI coding agents (Claude Code, Cursor, Copilot, Gemini CLI) read and obey * instruction files that no mainstream scanner inspects: .claude/skills, * .claude/commands, .cursorrules, CLAUDE.md, AGENTS.md, and friends. The * ClawHub audit found 11.9% of published agent skills malicious. These files * are a direct instruction channel into the agent, so hidden text, control * tokens, download-and-execute recipes, and credential-harvesting steps in * them are supply-chain attacks on the developer's AI tooling. * * False-positive design: rules files legitimately INSTRUCT agents in natural * language, so jailbreak-style prose ("ignore previous instructions") is only * reported at medium severity with reduced confidence. Raw LLM control * TOKENS (<|im_start|>, a fake ) have no legitimate reason * to appear in a rules file and stay high severity. Security guidance that * NEGATES an action ("never read ~/.ssh/") is not flagged. * * Note: the core directory walk in scanner.ts deliberately skips .claude/; * this module does its own targeted traversal from the scan root. */ import type { Finding } from "./types.js"; /** * Scan AI agent skill / rules files under a directory. * * Targets (relative to dir): .claude/skills/**\/SKILL.md, .claude/commands/*.md, * .claude/settings.json, .claude/settings.local.json, .cursorrules, * .cursor/rules/*.mdc, .github/copilot-instructions.md, AGENTS.md, CLAUDE.md, * GEMINI.md. */ export declare function scanAgentSkillFiles(dir: string): Finding[]; /** * Scan the text of a single skill / command / rules file. */ export declare function scanSkillContent(content: string, relativePath: string): Finding[]; /** * Scan a .claude/settings.json / settings.local.json for dangerous hook * commands. Malformed JSON is ignored (no crash, no findings). */ export declare function scanAgentSettingsContent(content: string, relativePath: string): Finding[]; //# sourceMappingURL=skills-scanner.d.ts.map