T09 · Insecure Skill Coding Practices
- Location
clawskillshield/skill.py:13- Finding
Security Scanner Excludes Skill Instruction Files
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a local security scanner, but its quarantine feature can automatically move or delete local directories without enough safeguards.
Install only if you are comfortable with a local scanner that can read files under paths you provide and can move directories into quarantine. Do not let an agent call quarantine automatically; require human approval, verify the path is an intended skill directory, and keep backups of anything important.
clawskillshield/skill.py:13Security Scanner Excludes Skill Instruction Files
clawskillshield/skill.py:23Unsafe Quarantine Replacement Can Recursively Delete Existing Data
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
lawskillshield scan-local /path/to/skill clawskillshield quarantine /path/to/skill
### Python API (Agents)
```python
from clawskillshield import scan_local, quarantine
threats = scan_local("/path/to/skill")
if risk_score < 4: # HIGH RISK
quarantine("/path/to/skill")
Pure Python. No network calls. Runs entirely locally.
ClawHavoc demonstrated how easily malicious skills can slip into the ecosystem. ClawSkillShield provides a trusted, open-source defense layer—audit the code, run offline, stay safe.
GitHub: https://github.com/AbYousef739/clawskillshield
License: MIT
Author: Ab Yousef
Contact: contact@clawskillshield.com
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
# ClawSkillShield v0.1.1
**Local-first security scanner for OpenClaw/ClawHub skills built for BOTH humans AND autonomous agents/Moltbots.**
The function and returned message explicitly frame a destructive filesystem move as 'safe for agents to auto-trigger,' which encourages autonomous execution of a sensitive action without human validation. In an agent context, this materially increases the chance of unintended disruption, denial of service, or movement of important user files based on imperfect analysis results.
The quarantine routine deletes any existing target directory and then moves the provided path without confirmation, rollback, or strong path validation. If invoked on an attacker-influenced or mistaken path, it can destroy data at the destination and remove access to legitimate files, especially dangerous when exposed to autonomous agents.
The README explicitly encourages autonomous agents to call quarantine() automatically when a risk threshold is met and labels this as 'Safe for agents to auto-trigger,' but it does not clearly warn that quarantine may move or alter local files. In an agent setting, that omission can lead to unintended file manipulation, disruption of workflows, or abuse if the scanner misclassifies a target.
The skill explicitly advertises automatic quarantine of local skills but provides no warning that this can autonomously modify, move, or disable files on the user's system. In an agent-executed context, that side effect can be disruptive and may cause denial of access to legitimate skills or unintended workflow interruption.
The quick-start command presents clawskillshield quarantine /path/to/skill as a normal first-use action without any caution about filesystem side effects. Users may execute it without understanding that it can alter local skill state, which is risky for a tool positioned as a safety utility.
The agent API example encourages autonomous quarantine of local content without warning about automatic modification by an agent. In addition, the example uses a suspicious/inverted threshold (risk_score < 4 labeled HIGH RISK), which could cause quarantining low-risk skills or signal poor safety design around an autonomous action.
scan_local recursively traverses all matching files under a user-supplied path, which can access large portions of the local filesystem. The current docstring describes automation use but does not warn users or agents about the breadth of local file access or scanning scope.
The risk verdict mapping is inverted relative to the numeric score: higher scores are labeled LOW RISK while lower scores are labeled HIGH RISK. This can cause users or agents to trust dangerous skills and quarantine safer ones, directly undermining the security purpose of the tool.
The top-level docstring presents the analyzer as broadly 'safe for humans and agents alike' with 'zero deps, no execution'. While it does avoid executing analyzed code, it still performs filesystem access by opening arbitrary paths and includes OS-level capability via an os import. That documentation overstates the absence of side effects/capabilities and can mislead about what the module actually does.
The build dependency is specified as setuptools>=61.0 without an upper bound or exact pin, so installs may resolve to different setuptools versions depending on environment and time. Because multiple setuptools releases have known advisories, this creates supply-chain uncertainty and can expose users or build systems to vulnerable versions if dependency resolution selects an affected release.
No suspicious patterns detected.