agent-canary
Detect Malicious Skill Behavior Using Decoy Credentials
Install & Use
Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:
Help me install this AI Skill: agent-canary. It is used for: Detect Malicious Skill Behavior Using Decoy Credentials Full Skill content: https://321skill.com/skills/agent-canary/raw/index.md Read that page and install it.
The prompt includes a link to the full Skill content. You can also view the full content.
This Skill addresses the challenge of proactively detecting malicious skills that steal credentials within an AI Agent workspace. In real-world development, agent skills may be embedded with malicious code that silently reads or copies sensitive information such as environment variables and key files. Traditional security tools often rely on passive log auditing and cannot identify such activities in real time.
Usage is straightforward: simply tell the AI "deploy decoys" or "set up honeypot," and it will automatically plant multiple files disguised as real credentials (e.g., .env.canary, secrets.backup.json) in the workspace root, memory directory, and user directories. These files contain tokens marked with a "CANARY" identifier. If any skill reads, copies, or exfiltrates these files, the monitoring script triggers an immediate alert. You can then check the status with "canary check" and clean up all decoys with "canary cleanup."
It is ideal for teams or individuals who need to secure their AI development environments, especially those using platforms like OpenClaw to manage multiple agent skills and are concerned about backdoors in third-party skills. Operations engineers can use it to quickly verify if skills are accessing sensitive data beyond their permissions, and agent developers can employ it as a supplementary tool for security testing.
We recommend using this tool when deploying new skills for the first time or during regular security checks. Note that it primarily targets file system access behaviors and cannot detect data exfiltration at the network level. Additionally, the decoy files contain obvious identifiers and should only be used in test environments; they are not a substitute for formal security auditing processes.
Key Features
Unlike traditional security auditing tools (e.g., log analysis systems), it proactively plants identifiable decoy tokens (such as AKIACANARY, ghp_CANARY_) to trap malicious behavior, triggering immediate alerts upon access rather than relying on passive post-incident log analysis.
Limitations
Requires Python 3 environment and is only compatible with OpenClaw workspaces. Decoy files are limited to the local file system and cannot detect network-based exfiltration or credential theft from memory.
FAQ
How do I deploy decoy credentials?
Tell the AI "deploy decoys" or "set up honeypot." It will automatically run the plant_canaries.py script and set up a scheduled task to check every 30 minutes.
Will cleaning up decoys affect real credentials?
No. All decoy files contain the "CANARY" identifier and are independent of real environment variables. The cleanup script only removes decoy files created by the agent.
Installation guide for AI assistants
If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:
Visit https://321skill.com/skills/agent-canary/raw/index.md to read the original Skill definition (Markdown format) for agent-canary, and install it according to the instructions.
Raw Markdown URL for AI: /skills/agent-canary/raw/index.md