What Gets Scanned
The content scanner checks skill bodies for six categories of dangerous patterns. Each scan looks for specific techniques that attackers use to abuse AI agent systems.Command Injection
Command Injection
Severity: CRITICALDetects attempts to run system commands through skill content. Attackers embed shell commands hoping the agent will execute them blindly.Examples caught:
$(command)— subshell execution- Backtick command substitution
eval()calls- Piped commands like
curl | bash
Environment Harvesting
Environment Harvesting
Severity: WARNDetects attempts to read sensitive environment variables where API keys, passwords, and secrets are often stored. Findings are logged but do not block skill loading by default.Examples caught:
printenvcommands- Reading
/proc/*/environ env | greppatterns that filter for specific secrets
Crypto Mining
Crypto Mining
Severity: CRITICALDetects cryptocurrency mining attempts that would hijack your server’s computing power.Examples caught:
stratum+tcp://mining pool URLs- Known miner binary names
- Mining pool domain references
Network Exfiltration
Network Exfiltration
Severity: mixed (WARN for piped downloads, CRITICAL for reverse shells)Detects attempts to send your data to external servers without authorization.Examples caught:
curl | shpatterns that download and execute remote code (WARN)wget -O- | bashdownload-and-run chains (WARN)- Reverse shell patterns that open a connection back to an attacker (CRITICAL)
Obfuscated Encoding
Obfuscated Encoding
Severity: mixed (WARN for long encoded blobs, CRITICAL for decode-and-execute chains)Detects suspiciously encoded content that may be hiding malicious instructions. Encoding is not always malicious, but large encoded blocks in a skill body are a red flag.Examples caught:
- Unusually long base64-encoded strings (WARN)
- Hex-encoded payloads (WARN)
base64 -d | bashdecode-and-execute patterns (CRITICAL)
XML Breakout
XML Breakout
Severity: CRITICALDetects attempts to escape the skill boundary and inject content directly into the agent’s system prompt.Examples caught:
</skill>close tags that try to end the skill context early<system>tags that attempt to hijack the prompt structure
The Sanitization Pipeline
In addition to scanning for threats, every prompt skill body goes through a four-step sanitization pipeline before it reaches the agent. This pipeline runs automatically on all skills, regardless of scan results.Strip HTML comments
Removes all
<!-- ... --> comment blocks. HTML comments are invisible in rendered content, making them a common way to hide malicious instructions that humans would not notice during review.Unicode normalization
Converts fancy characters to their standard forms using NFKC normalization. This prevents visual tricks where an attacker uses fullwidth or ligature characters that look identical to normal text but bypass pattern matching. For example, a fullwidth
eval looks like eval but would not match a simple text scan.Strip invisible characters
Removes zero-width Unicode characters like zero-width spaces, zero-width joiners, and Unicode tag characters. These are completely invisible in text but can carry hidden payloads or break security boundaries.
What Happens When a Threat is Found
The scanner classifies each finding by severity:-
CRITICAL findings: The skill is blocked from loading entirely when
contentScanning.blockOnCriticalis enabled (which it is by default). The agent never sees the skill content. A log entry records what was found and why it was blocked. - WARN findings: The skill loads normally, but a warning is logged. Review the warning and decide whether the skill is safe. Obfuscated encoding, for example, may be legitimate — some skills include base64 data for valid reasons.
Even if a skill passes content scanning, it still goes through the full sanitization pipeline. Scanning catches known dangerous patterns, while sanitization removes entire classes of hidden content. Together, they provide layered protection.
Configuration
Content scanning is enabled by default. You can adjust its behavior in your configuration file:How Scanning Fits into the Security Stack
Content scanning is one layer in the Comis defense-in-depth security model:- Content scanning catches malicious patterns before a skill loads (this page)
- Sanitization removes hidden or obfuscated content from all skills (this page)
- The sandbox isolates skill execution with memory, time, and access limits (Sandbox)
- Tool policy controls which tools a skill can access (Tool Policy)
- Output scanning catches leaked secrets in agent responses before they reach the chat
Sandbox
How skill execution is isolated
Defense in Depth
All security layers explained
Manifest Reference
Declaring skill permissions
Prompt Skills
Creating custom prompt skills
