Back to skill

Security audit

skill-audit

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because it documents running an unpinned GitHub package locally, while some code inspection was incomplete.

Consider the suspicious verdict before installing. The documented GitHub command may run unpinned third-party code locally, and the scanner reports a report-path overwrite risk. Inspection was partial: 57.1% coverage was reported, with three files only partially inspected, so the scan cannot establish that the remaining code is safe.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
bin/cli.js
Finding

Untrusted skill names escape the report output directory

Content
View full analysis

Impact

An attacker can create or overwrite files outside the report directory with the auditor's filesystem permissions. Destinations are constrained to the .report.json and .report.html suffixes, and contents are generated reports; arbitrary code execution is not established. Existing matching files are overwritten without confirmation.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
Findings (9)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 17)May include surrounding context.

md
node bin/cli.js <path-to-skill> --out reports/

YARA rule 'agent_skill_prompt_injection_hidden_instructions': Prompt injection or hidden instructions embedded in AI agent skill text [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · src/audit.js (reported line 6)May include surrounding context.

js
'use strict';
const fs = require('fs');
const path = require('path');

const INJECTION = [
  { id: 'S1', re: new RegExp(['ign', 'ore\\s+(?:all\\s+|any\\s+)?(?:prev', 'ious|prior|above)\\s+(?:inst', 'ructions|prompts?|rules?|context)'].join(''), 'i'), msg: 'Prompt-injection: asks to ignore prior instructions' },
  { id: 'S2', re: new RegExp(['(?:rev', 'eal|show|print|repeat|output)\\s+(?:your\\s+|the\\s+)?(?:sys', 'tem\\s+prompt|hidden\\s+instructions|initial\\s+instructions|secrets?)'].join(''), 'i'), msg: 'Prompt-injection: asks to reveal system prompt or secrets' },
  { id: 'S3', re: new RegExp(['(?:exfil', 'trat\\w*|upload|send|post|transmit)[^.\\r\\n]{0,60}https?:\\/\\/'].join(''), 'i'), msg: 'Possible exfiltration: sends data to a remote URL' },
  { id: 'S4', re: new RegExp(['(?:cu', 'rl|wget)[^|\\r\\n]*\\|\\s*(?:sudo\\s+)?(?:ba)?sh'].join(''), 'i'), msg: 'Danger

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · src/audit.js (reported line 7)May include surrounding context.

js
const INJECTION = [
  { id: 'S1', re: new RegExp(['ign', 'ore\\s+(?:all\\s+|any\\s+)?(?:prev', 'ious|prior|above)\\s+(?:inst', 'ructions|prompts?|rules?|context)'].join(''), 'i'), msg: 'Prompt-injection: asks to ignore prior instructions' },
  { id: 'S2', re: new RegExp(['(?:rev', 'eal|show|print|repeat|output)\\s+(?:your\\s+|the\\s+)?(?:sys', 'tem\\s+prompt|hidden\\s+instructions|initial\\s+instructions|secrets?)'].join(''), 'i'), msg: 'Prompt-injection: asks to reveal system prompt or secrets' },
  { id: 'S3', re: new RegExp(['(?:exfil', 'trat\\w*|upload|send|post|transmit)[^.\\r\\n]{0,60}https?:\\/\\/'].join(''), 'i'), msg: 'Possible exfiltration: sends data to a remote URL' },
  { id: 'S4', re: new RegExp(['(?:cu', 'rl|wget)[^|\\r\\n]*\\|\\s*(?:sudo\\s+)?(?:ba)?sh'].join(''), 'i'), msg: 'Dangerous: pipes remote content straight into a shell' },
  { id: 'S5a', re: /\b(?:eval|new\s+Function)\s*\(/, msg: 'Obfuscation: dynamic code evaluation' },

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · src/audit.js (reported line 19)May include surrounding context.

js
const SCRIPT_RISK = [
  { id: 'R1', re: new RegExp(['r', 'm\\s+-rf?\\s+(?:~|\\/|\\$HOME|\\.\\.)'].join('')), msg: 'Destructive rm -rf on home or root' },
  { id: 'R2', re: /(?:^|\r?\n)\s*(?:sudo\s+)?(?:crontab|systemctl|service)\b/, msg: 'Touches system scheduler/services' },
  { id: 'R3', re: new RegExp(['chm', 'od\\s+777'].join('')), msg: 'chmod 777 (permissive)' },
  { id: 'R4', re: /(?:^|\r?\n)\s*(?:sudo\s+)?(?:cat|cp|mv|rm)\b[^\r\n]*\/etc\//, msg: 'Modifies /etc' },
];

MCP server referenced without pinned version: 'npx github'.

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

Although this is not an MCP server reference, the documented npx command downloads and executes code from a mutable GitHub reference without pinning the reviewed revision. A compromised repository or malicious later update could execute with the user's local privileges; static analysis of the target skill does not protect against a compromised auditor.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The GitHub execution option lacks a warning that it downloads and runs third-party code locally.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The GitHub execution option omits disclosure that npx downloads and runs third-party code locally. Although the offline statement specifically concerns target-skill execution, it can still create misplaced confidence in this bootstrap step; this is a disclosure weakness accompanying the same execution path as the unpinned-dependency finding.

Content

No source excerpt is available for this finding.

MCP server referenced without pinned version: 'npx github'.

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

The procedure directly instructs an agent to execute an unpinned GitHub package, allowing upstream changes to alter the code that runs locally. This is a supply-chain execution risk rather than an MCP-specific issue, and it is particularly consequential for a tool used as an installation security gate.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE (reported line 9)May include surrounding context.

text
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.