""" SARIF 2.1.0 rule definitions. Every ruleId used in scan results must have a matching entry here. """ SARIF_RULE_DEFINITIONS = { # --- Custom: AI instruction file rules --- "prompt-injection": ( "Prompt Injection", "Instruction override, jailbreak or safety bypass detected in AI instruction file", ), "persona-override": ( "Persona Override", "Instruction attempts to replace the AI's identity or remove its restrictions", ), "data-exfiltration": ( "Data Exfiltration", "Instruction attempts to leak secrets, tokens or credentials to an external destination", ), "suspicious-network": ( "Suspicious Network Access", "Outbound network call (curl/wget/nc/fetch) to an unexpected external host", ), "code-execution": ( "Code Execution", "Dynamic code execution (eval/exec/subprocess/shell -c) detected", ), "obfuscation": ( "Obfuscation", "Base64 encoding or other obfuscation technique used to hide intent", ), "hidden-content": ( "Hidden Content", "Content concealed via HTML comments or zero-width characters", ), "persistence": ( "Persistence Mechanism", "Cron job, startup file, or scheduled task modification instruction", ), "supply-chain": ( "Supply Chain Risk", "Package installation from unofficial or untrusted registry", ), "destructive-action": ( "Destructive Action", "Disk wipe, bulk file deletion or encryption command detected", ), "privilege-escalation": ( "Privilege Escalation", "Instruction attempts to gain elevated system privileges", ), # --- Claude marketplace plugin rules --- "claude-plugin-injection": ( "Claude Plugin Injection", "Prompt injection or suspicious instruction in Claude plugin description or system prompt", ), # --- GuardDog built-in PyPI/npm rules --- "cmd-overwrite": ("Command Overwrite", "Package overwrites a system command"), "deceptive_author": ( "Deceptive Author", "Package author is impersonating a trusted author", ), "repository_integrity_mismatch": ( "Repository Integrity Mismatch", "Source code does not match the published package", ), "single_python_file": ( "Single Python File", "Package consists of a suspiciously small single file", ), "clipboard-access": ("Clipboard Access", "Package accesses the system clipboard"), "steganography": ("Steganography", "Package uses steganography to hide data"), "download-executable": ( "Download Executable", "Package downloads and executes a binary", ), "shady-links": ("Shady Links", "Package contains links to suspicious domains"), "silent-process-execution": ( "Silent Process Execution", "Package silently spawns a child process", ), "dll-hijacking": ("DLL Hijacking", "Package attempts DLL hijacking"), "empty_information": ("Empty Information", "Package metadata is missing or empty"), "bundled_binary": ("Bundled Binary", "Package bundles a compiled binary"), "potentially_compromised_email_domain": ( "Compromised Email Domain", "Maintainer email domain may be compromised", ), "typosquatting": ( "Typosquatting", "Package name is suspiciously similar to a popular package", ), "exec-base64": ("Exec Base64", "Package executes base64-encoded code"), "release_zero": ("Release Zero", "Package has only been released at version 0.x"), "unclaimed_maintainer_email_domain": ( "Unclaimed Maintainer Email", "Maintainer email domain is unclaimed and could be hijacked", ), "exfiltrate-sensitive-data": ( "Exfiltrate Sensitive Data", "Package attempts to exfiltrate sensitive data", ), }