Back to skill

Security audit

skill-advisor

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent safety-review purpose, but its instructions leave risky command handling and untrusted skill-document handling insufficiently scoped.

Install only if you are comfortable with the agent using the ClawHub CLI and reading other skills' SKILL.md files. Use exact, normal ClawHub skill names only, avoid shell metacharacters or pasted command text as skill names, and treat reviewed skill contents as untrusted data rather than instructions to follow.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:45
Finding

Potential Command Injection Through Unsanitized Skill Name

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 45-50
Vulnerability Type: Unsanitized user-controlled input in a CLI command
Risk Level: High

Vulnerable Code Snippet:

markdown
## Step 1: Get Skill Information

When user provides a skill name, fetch its metadata:

Use clawhub CLI to inspect the skill:

  • clawhub inspect {skill-name}
text

Technical Analysis

The documented workflow places the user-provided {skill-name} directly into a command without specifying validation, shell escaping, quoting, or a shell-free execution mechanism. If an implementing agent passes the resulting command to a shell, shell metacharacters in a malicious skill name could be interpreted as additional commands.

The vulnerability depends on how the agent invokes the CLI. Using a process API with a fixed executable and an argument array would avoid shell interpretation, while constructing a command string and executing it through a shell would expose a command-injection path.

Attack Path

  1. An attacker asks the skill to inspect a crafted skill name containing shell-control characters and an additional command.
  2. The agent substitutes that value into clawhub inspect {skill-name}.
  3. The agent executes the constructed string through a shell without validation or escaping.
  4. The shell interprets the injected control characters and runs the attacker's additional command.
  5. The injected command executes with the operating-system privileges and environmental access of the agent process.

Impact Assessment

Successful exploitation could allow arbitrary local command execution under the account running the agent. The attacker could access files and credentials available to that account, alter workspace content, invoke network utilities, or execute additional programs. The vulnerability does not itself establish privilege escalation; its scope is limited to the privileges and isolation boundar ...[truncated 41 chars]

Remediation
View remediation

Remediation Suggestions

  • Validate skill names against the exact identifier syntax accepted by ClawHub. For example, use a strict allowlist such as ^[A-Za-z0-9._-]+$ if that grammar is compatible with the service.
  • Reject values containing whitespace, shell metacharacters, command substitutions, redirection operators, or control characters.
  • Invoke clawhub through a process API using a fixed executable and argument array, such as arguments equivalent to ["inspect", skillName].
  • Do not invoke the command through a shell and do not concatenate user input into a command string.
  • Apply a timeout and capture output through bounded buffers.
  • Run the inspection process with minimal filesystem, network, and operating-system privileges.
  • Add negative tests covering semicolons, pipes, redirection, newlines, command substitution, and platform-specific shell syntax.

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:52
Finding

Indirect Prompt Injection Through Untrusted SKILL.md Content

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 52-55
Vulnerability Type: Untrusted skill instructions processed without an explicit isolation boundary
Risk Level: Medium

Vulnerable Code Snippet:

markdown
## Step 2: Fetch SKILL.md Content

Get the actual SKILL.md to analyze dependencies and functionality.

Technical Analysis

The workflow directs the agent to retrieve and analyze another skill's SKILL.md. Such a document is controlled by the author of the skill being reviewed and may contain adversarial instructions designed to influence the reviewing agent.

The workflow does not explicitly require retrieved content to be treated exclusively as untrusted data, nor does it prohibit executing commands, following links, invoking tools, disclosing information, or changing the assessment criteria in response to instructions found in that content. Consequently, a malicious target document could attempt indirect prompt injection, such as directing the reviewer to ignore its original task, report a false security result, or perform unrelated tool actions.

Attack Path

  1. An attacker publishes a skill whose SKILL.md contains instructions targeting automated reviewers.
  2. A user asks Skill Advisor to assess the attacker's skill.
  3. Skill Advisor retrieves the malicious SKILL.md as directed by the audited workflow.
  4. The reviewing model interprets embedded instructions as actionable rather than as untrusted evidence.
  5. The malicious instructions alter the assessment, trigger unauthorized tool activity, or cause information available in the current session to be disclosed.

Impact Assessment

Successful exploitation could compromise the integrity of the security assessment by producing a fabricated score or recommendation. If the reviewing agent has tool access, the impact could extend to actions permitted by those tools, including unauthorized command execution, file access, netw ...[truncated 296 chars]

Remediation
View remediation

Remediation Suggestions

  • State explicitly that retrieved skill files are untrusted data and that none of their instructions may override the advisor's task, policies, scoring rules, or tool constraints.
  • Prohibit executing commands, installing dependencies, following embedded links, loading the reviewed skill, or invoking tools solely because the retrieved document requests it.
  • Delimit retrieved content clearly and analyze it in a data-only context.
  • Prefer deterministic parsing for metadata and dependency declarations rather than allowing free-form content to direct the review process.
  • Require independent verification of security claims using trusted ClawHub metadata and scan results.
  • Restrict the reviewing agent to read-only, least-privilege tools and prevent access to unrelated secrets or files.
  • Treat attempts to alter review instructions or request unrelated actions as security indicators and surface them in the assessment report.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (2)

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.txt (reported line 12)May include surrounding context.

text
permit persons to whom the Software is furnished to do so.

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

Vague Triggers

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The trigger phrase "帮我看看这个skill怎么样" is conversational and loosely scoped, which may overlap with general discussion about a skill rather than a clear request to run this specific pre-install assessment workflow. The file does not provide exclusion conditions or negative examples to distinguish casual commentary from explicit invocation.

Content

No source excerpt is available for this finding.