Back to skill

Security audit

Interactive Skills Platform Mvp

Security checks for vulnerabilities and agentic risk

Overview

This is a planning skill, but it recommends a web platform that executes uploaded skills without sandboxing or authentication, so it needs careful review before use.

Install or use this only as a design reference, not as production-ready implementation guidance. Before building the described platform, require authentication, per-skill ownership checks, sandboxed per-run execution, restricted tools and network access, credential isolation, path validation, audit logs, quotas, and explicit warnings before executing any uploaded or third-party skill.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:120
Finding

Untrusted Skill Execution Without Sandboxing or Access Control

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:120-121, SKILL.md:337, SKILL.md:353, and SKILL.md:468-469
Vulnerability Type: Untrusted instructions executed through an agent with Bash access
Risk Level: High

Vulnerable Code and Instructions

English rendering of SKILL.md:120-121:

text
- Do not implement security sandbox isolation during the MVP phase.
- Do not implement user authentication or permission management during the MVP phase.

SKILL.md:337:

python
skill_path = f"skills/{skill_name}/SKILL.md"

The execution example subsequently loads the selected Skill into an agent and executes it:

python
with open(skill_path, "r", encoding="utf-8") as f:
    skill_content = f.read()

agent = Agent(skill_content=skill_content)
result = await agent.execute(parameters)

English rendering of SKILL.md:353:

text
The Agent SDK executes the Skill and may invoke Bash tools and the Claude API.

English rendering of SKILL.md:468-469:

text
Security is deferred to a later iteration.
Skills can execute arbitrary CLI commands.

Technical Analysis

The proposed platform accepts user-supplied SKILL.md content and passes that content to an execution-capable agent. The agent is explicitly expected to have access to Bash and external APIs. At the same time, the MVP design explicitly excludes authentication, authorization, and execution sandboxing.

A SKILL.md file is not passive data when supplied to an agent. It contains instructions that can influence tool calls and command execution. Consequently, an uploaded Skill must be treated as untrusted executable content. Passing it directly to an agent with Bash access crosses a critical trust boundary.

No command allowlist, filesystem boundary, network restriction, credential isolation, approval workflow, or per-execution container is specified. An attacker could therefore construct Skill instr ...[truncated 1771 chars]

Remediation
View remediation

Remediation Suggestions

Treat isolation and access control as release blockers rather than deferred enhancements.

  1. Authenticate every operation

    • Require authentication for upload, analysis, execution, status, and deletion endpoints.
    • Enforce ownership and explicit authorization checks for each Skill and execution job.
    • Apply rate limits and execution quotas per identity.
  2. Use an isolated execution environment

    • Run each Skill invocation in a new ephemeral container or microVM.
    • Use a non-root identity with no host namespace access.
    • Do not mount the Docker socket, host filesystem, SSH agents, or cloud credential directories.
    • Make the root filesystem read-only and provide only a small disposable working directory.
    • Destroy the environment after each invocation.
  3. Restrict tools and commands

    • Disable Bash by default.
    • Grant only the tools explicitly required by an approved Skill.
    • If command execution is essential, use an argument-aware allowlist rather than shell-string filtering.
    • Prohibit shell metacharacters, indirect interpreters, and arbitrary subprocess creation.
  4. Restrict network access

    • Deny outbound network access by default.
    • Allow only explicitly approved domains and protocols through an egress proxy.
    • Block cloud metadata endpoints, localhost services, private address ranges, and internal control-plane networks.
  5. Protect credentials

    • Do not expose backend-wide secrets to Skill processes.
    • Issue short-lived, narrowly scoped credentials for individual executions.
    • Use a secret broker and redact sensitive values from prompts, logs, and results.
  6. Add admission controls

    • Parse and statically inspect uploaded Skills before publication.
    • Require manual approval for Skills requesting command execution or network access.
    • Record immutable audit logs for upload, approval, tool calls, ...[truncated 204 chars]

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:198
Finding

User-Controlled Skill Name Used in Filesystem Paths

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:198 and SKILL.md:337
Vulnerability Type: Path traversal through unsafe path construction
Risk Level: Medium

Vulnerable Code and Instructions

English rendering of SKILL.md:198:

text
The backend receives the file and saves it to:
skills/{skill-name}/SKILL.md

SKILL.md:337:

python
skill_path = f"skills/{skill_name}/SKILL.md"

Technical Analysis

The design constructs storage and read paths by interpolating skill_name directly into a filesystem path. It does not prescribe character validation, server-generated identifiers, path canonicalization, or a containment check against the intended storage root.

If an implementation allows the uploader or API caller to control skill_name, traversal components such as .., absolute path forms, encoded separators, or platform-specific path syntax could cause the resolved path to escape the skills directory.

The same unsafe identifier is relevant to both file creation and file reading. A vulnerable upload handler could write outside the intended Skill directory, while a vulnerable execution handler could attempt to read an unintended SKILL.md file. Exploitability depends on how the eventual implementation derives and validates skill_name, but the prescribed sample omits the controls needed to make this construction safe.

Attack Path

  1. An attacker submits an upload or execution request containing a crafted Skill name with traversal components.
  2. The backend inserts the supplied value into skills/{skill_name}/SKILL.md.
  3. The operating system normalizes the path and resolves traversal components.
  4. The resulting path escapes the intended Skills storage root.
  5. During upload, the backend may create or overwrite a file in another writable directory.
  6. During execution, the backend may read unintended content and supply it to the agent as Skill instructions.
  7. If a ...[truncated 845 chars]
Remediation
View remediation

Remediation Suggestions

  1. Use server-generated identifiers

    • Generate a UUID or similarly opaque identifier for each uploaded Skill.
    • Store the user-visible name only as metadata and never use it as a filesystem path component.
  2. Validate identifiers

    • If readable slugs are required, enforce a strict allowlist such as lowercase ASCII letters, digits, and hyphens.
    • Reject empty names, dots, path separators, traversal tokens, control characters, drive prefixes, and encoded separator variants.
    • Apply a conservative maximum length.
  3. Canonicalize and verify containment

    • Resolve the storage root and candidate path to canonical absolute paths.
    • Verify that the candidate is a descendant of the dedicated storage root before every read, write, rename, and deletion.
    • Reject the operation if containment cannot be proven.
  4. Prevent link-based escapes

    • Do not follow symbolic links while opening Skill files.
    • Ensure intermediate directories are owned by the service and cannot be replaced by untrusted users.
    • Use operating-system APIs that support directory-relative and no-follow file operations where available.
  5. Separate storage responsibilities

    • Store each Skill in an isolated directory created by the backend.
    • Use restrictive filesystem permissions.
    • Avoid sharing writable storage between the web process and privileged services.
  6. Add security tests

    • Test ../, nested traversal, absolute paths, alternate separators, percent-encoded separators, Unicode lookalikes, excessively long names, and symbolic-link attacks.
    • Confirm that every rejected request leaves the filesystem unchanged.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill is presented as a design/planning assistant, but the body specifies a platform that uploads and executes SKILL.md content through an agent capable of CLI actions. That creates a dangerous mismatch between declared purpose and actual execution semantics, increasing the chance that operators or end users treat untrusted skill files as harmless planning inputs when they may trigger code execution in the proposed system.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The design explicitly excludes sandbox isolation while proposing execution of arbitrary uploaded skills via an agent SDK that can run tools and CLI commands. In this context, untrusted SKILL.md content can become a vehicle for remote code execution, data exfiltration, host compromise, or abuse of connected credentials and network access.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The document defers both sandboxing and authentication/authorization while still describing an execution platform for uploaded skills. In combination, this creates a high-risk environment where untrusted content may be run without containment and potentially without meaningful access controls, greatly amplifying abuse and blast radius.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
创建一个 Web 平台,用户上传 Claude Code 标准的 `SKILL.md` 文件,平台使用 Claude API 分析 skill 并生成交互界面,通过 Claude Agent SDK 执行 skills。

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The solution describes uploading SKILL.md files and executing them through an agent, but it does not prominently warn users that these skills may invoke CLI commands or external APIs. That missing disclosure undermines informed consent and increases the risk that administrators onboard unsafe content or expose end users to actions they did not expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The trigger phrases are broad, generic, and lack clear activation constraints, which can cause the skill to match user requests outside its intended scope. In a platform-design skill that discusses uploading and executing SKILL.md content, overbroad activation increases the chance of unintended invocation on adjacent requests, potentially exposing users to risky guidance around dynamic skill execution without sufficient context or safeguards.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The activation guidance says to use the skill when the user expresses requests such as '把 skill 做成网页给非技术用户用' or '做一个 skills 平台 / interactive skills platform.' These phrases are broad design intents rather than tightly scoped invocation triggers, and the file does not provide exclusion conditions or negative examples to bound when this skill should not activate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The tagline and description force a specific language for user-facing skill metadata, which can violate language/locale policy when no opt-in or alternative is provided. Nothing in the manifest indicates that this skill is intentionally region-specific or that users can select another language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instruction '默认中文输出' imposes a language preference in the skill behavior. Under the policy, locale or language constraints should either be optional, user-selected, or clearly justified; here there is no opt-in or alternative language path.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.