Back to skill

Security audit

Skill Auditor in Sandbox

Security checks for vulnerabilities and agentic risk

Overview

This skill has a legitimate sandbox-auditing purpose, but its install and audit scripts use unsafe installation patterns, overbroad file collection, and weak path containment that require review before use.

Install only in a disposable, least-privilege environment. Do not run the documented curl-to-bash installer without independently verifying the script, use a scoped Novita API key, avoid sandboxes containing unrelated private skills, and treat reports as advisory because the scanner may read unrelated skill files.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:26
Finding

Unverified Remote Installation Script Executed Directly by Bash

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:26-31; duplicated in README.md:33-37
Vulnerability Type: Remote payload retrieval and execution
Risk Level: High

Vulnerable code in SKILL.md:

markdown
- `novitaclaw` CLI must be installed. If not found:
  `curl -fsSL https://novitaclaw.novita.ai/install.sh | bash`
- `novita-sandbox` npm package must be available. If not:
  `npm install novita-sandbox`

Vulnerable code in README.md:

markdown
- **novitaclaw CLI** — install with:
  ```bash
  curl -fsSL https://novitaclaw.novita.ai/install.sh | bash
  ```

Technical Analysis

The documented installation procedure downloads mutable content from an external URL and pipes it directly into Bash. The payload is executed without first saving it for inspection and without a pinned version, checksum, digital signature, or other integrity verification.

Consequently, the code that users execute can differ from the code reviewed during this audit. HTTPS protects transport under normal conditions but does not protect against compromise of the hosting service, publisher account, DNS or certificate infrastructure, or an intentional future replacement of the script.

Direct remote execution is not the minimum privilege necessary to install the required CLI. A versioned artifact can instead be downloaded, authenticated, inspected, and installed using narrowly scoped permissions.

Attack Path

  1. An attacker compromises the script host, deployment pipeline, publisher credentials, or another component controlling https://novitaclaw.novita.ai/install.sh.
  2. The attacker replaces the installation script with a malicious shell payload.
  3. A user or Agent follows the prerequisite instructions.
  4. curl retrieves the current attacker-controlled response.
  5. The pipe passes that response directly to Bash without validation.
  6. The payload executes with all permissions available to t ...[truncated 444 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove the curl | bash installation instruction from both documentation files.
  • Publish versioned release artifacts through a trusted release channel.
  • Pin an explicit release version rather than retrieving a mutable endpoint.
  • Download the artifact to disk without executing it immediately.
  • Verify a publisher signature or a checksum obtained through an independently authenticated channel.
  • Provide users with an opportunity to inspect the downloaded script before execution.
  • Avoid requiring administrator privileges unless a specific installation step genuinely needs them.
  • Document the files, directories, and environment changes performed by the installer.
  • If a package-manager installation is available, prefer a signed and versioned package from a trusted repository.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/install-skill.mjs:26
Finding

Dot-Segment Skill Names Can Escape Intended Directories and Reach Destructive Shell Operations

Content
View full analysis

Vulnerability Details

File Location: scripts/install-skill.mjs:26-32, scripts/install-skill.mjs:35-42, scripts/install-skill.mjs:63-66, and scripts/install-skill.mjs:86-97
Vulnerability Type: Path traversal caused by insufficient validation and unsafe shell command construction
Risk Level: High

Vulnerable code:

javascript
// Validate SKILL_NAME to prevent command injection (allow only owner/repo or simple names)
if (!/^[\w.-]+(?:\/[\w.-]+)?$/.test(SKILL_NAME)) {
  console.error(JSON.stringify({
    success: false,
    error: `Invalid skill name: "${SKILL_NAME}". Expected format: "owner/repo" or "skill-name".`,
  }));
  process.exit(1);
}

const skillBaseName = SKILL_NAME.includes('/')
  ? SKILL_NAME.split('/').pop()
  : SKILL_NAME;

const SKILLS_DIR = '/home/user/.claude/skills';
const TARGET_DIR = `${SKILLS_DIR}/${skillBaseName}`;
const TMP_DIR = `/tmp/${skillBaseName}`;
javascript
if (!result.ok) {
  method = 'git-github';
  await tryRun(`rm -r ${TMP_DIR}`);
  result = await tryRun(`git clone https://github.com/${SKILL_NAME}.git ${TMP_DIR}`);
}
javascript
if (method !== 'clawhub') {
  await run(`mkdir -p ${TARGET_DIR}`);

  // Detect structure: does the clone have .claude/skills/?
  const hasClaudeSkills = await tryRun(`test -d ${TMP_DIR}/.claude/skills`);

  if (hasClaudeSkills.ok) {
    await run(`cp -r ${TMP_DIR}/.claude/skills/* ${SKILLS_DIR}/`);
  } else {
    // Copy everything except .git
    await run(`cp -a ${TMP_DIR}/. ${TARGET_DIR}/ && rm -r ${TARGET_DIR}/.git`);
  }
}

Technical Analysis

The regular expression permits periods anywhere in each component and therefore accepts complete path-navigation components such as . and ... For example, SKILL_NAME=. and SKILL_NAME=owner/.. pass validation.

The final component is interpolated directly into TMP_DIR and TARGET_DIR. Filesystem path normali ...[truncated 2121 chars]

Remediation
View remediation

Remediation Suggestions

  • Reject empty components and the exact components . and ...
  • Define a stricter component expression that requires at least one alphanumeric character and does not permit leading or trailing periods where unnecessary.
  • Resolve paths with Node.js path.resolve() and verify containment before every filesystem operation.
  • Require resolved target paths to begin with the resolved approved root plus path.sep.
  • Create a unique temporary directory with fs.promises.mkdtemp() rather than deriving it directly from user input.
  • Replace shell-based rm, mkdir, and copy operations with Node.js filesystem APIs such as fs.promises.rm, mkdir, and cp.
  • Pass external-command arguments through an API that does not invoke a shell.
  • Refuse to operate when the resolved path equals the root directory itself.
  • Add regression tests for ., .., owner/., owner/.., repeated periods, and normalized path boundary conditions.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/audit-skill.mjs:38
Finding

Audit Collects and Returns Files from All Installed Skills

Content
View full analysis

Vulnerability Details

File Location: scripts/audit-skill.mjs:38-48, scripts/audit-skill.mjs:58-75, and scripts/audit-skill.mjs:88-105
Vulnerability Type: Excessive filesystem access and unintended disclosure of unrelated Skill contents
Risk Level: High

Vulnerable code:

javascript
const SKILLS_DIR = '/home/user/.claude/skills';

async function run(cmd) {
  const r = await sandbox.commands.run(cmd, { timeoutMs: 30_000 });
  return r.stdout.trim();
}

async function grepLines(pattern) {
  try {
    const out = await run(
      `grep -rn -E "${pattern}" ${SKILLS_DIR}/ 2>/dev/null || true`
    );
    return out ? out.split('\n').filter(Boolean) : [];
  } catch {
    return [];
  }
}
javascript
const suspicious = await grepLines(`(${riskyTokens.join('|')})`);

// 2. URL references
const urls = await grepLines('(ht' + 'tp://|ht' + 'tps://|ft' + 'p://)');

// 3. External path references — built at runtime
const pathTokens = [
  '/et' + 'c/', '/ro' + 'ot/',
  '~/\\\\.' + 'ssh', '/va' + 'r/', '/tm' + 'p/',
];
const externalPaths = await grepLines(`(${pathTokens.join('|')})`);
javascript
let fileContents = [];
try {
  const filesRaw = await run(
    `find ${SKILLS_DIR}/ -type f -not -path '*/.git/*' ` +
    `\\( -name "*.md" -o -name "*.txt" -o -name "*.json" -o -name "*.py" ` +
    `-o -name "*.js" -o -name "*.ts" -o -name "*.sh" -o -name "*.yaml" -o -name "*.yml" \\)`
  );
  const filePaths = filesRaw ? filesRaw.split('\n').filter(Boolean) : [];

  for (const fp of filePaths) {
    try {
      const content = await run(`cat "${fp}"`);
      fileContents.push({ path: fp, content });
    } catch { /* skip unreadable */ }
  }
} catch { /* skip */ }

Technical Analysis

The script derives skillBaseName, but its suspicious-pattern scan, URL scan, external-path scan, and full-file collection are rooted at the global `/home ...[truncated 1871 chars]

Remediation
View remediation

Remediation Suggestions

  • Construct an exact target directory from the validated Skill name.
  • Normalize the target with path.resolve() and verify that it remains beneath the approved skills root.
  • Restrict all grep, find, dependency inspection, and content reads to that exact target directory.
  • Apply the same restriction to the installed-file listing in scripts/install-skill.mjs.
  • Use Node.js filesystem traversal rather than shell commands where practical.
  • Enforce maximum file sizes and a maximum total output size to prevent excessive collection.
  • Detect and redact likely API keys, tokens, private keys, and passwords before returning content.
  • Avoid returning full file contents by default; return metadata and matched excerpts unless the user explicitly requests full content.
  • Clearly identify the target-relative path for each finding to prevent cross-Skill attribution errors.

T08 · Insecure Dependencies

Warning
Location
package.json:32
Finding

Mutable Third-Party Dependency Is Installed Without a Locked Version or Integrity Workflow

Content
View full analysis

Vulnerability Details

File Location: package.json:32-34; related installation guidance in SKILL.md:30-31
Vulnerability Type: Insecure dependency resolution and supply-chain exposure
Risk Level: Medium

Vulnerable code in package.json:

json
"dependencies": {
  "novita-sandbox": "^1.0.0"
}

Related installation instruction in SKILL.md:

markdown
- `novita-sandbox` npm package must be available. If not:
  `npm install novita-sandbox`

Technical Analysis

The caret range allows npm to select later compatible releases rather than requiring the specific version reviewed by the project author. The project structure supplied for audit contains no lockfile, while the instructions recommend an unqualified npm install novita-sandbox.

No evidence establishes that the current dependency is malicious. The security issue is that future installations may resolve to package content different from the content originally reviewed. npm packages may execute lifecycle scripts during installation, and this dependency is imported into processes that receive NOVITA_API_KEY.

This creates a supply-chain trust boundary where compromise of the package publisher, registry account, or a future compatible release could introduce code with access to the local Node.js process and its environment.

Attack Path

  1. A malicious actor compromises the dependency publisher or otherwise causes a malicious compatible version to be published under the legitimate package name.
  2. A user follows the documented npm install novita-sandbox instruction or installs project dependencies without a lockfile.
  3. npm resolves the mutable version range to the malicious compatible release.
  4. Malicious lifecycle code may execute during installation, or malicious module code executes when either project script imports the package.
  5. Runtime code can access process-level resources, including the NOVITA_API_KEY ...[truncated 506 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin the dependency to an exact reviewed version.
  • Generate and commit a package-lock.json containing registry-resolved integrity metadata.
  • Use npm ci in automated and documented installation procedures.
  • Review dependency lifecycle scripts and consider installing with --ignore-scripts where compatible.
  • Use npm provenance information, registry signatures, or an organizational package allowlist where available.
  • Run dependency vulnerability and provenance checks in continuous integration.
  • Upgrade dependencies only through explicit reviewed changes.
  • Minimize how long NOVITA_API_KEY remains in the process environment and use a narrowly scoped API key where supported.
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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (18)

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The command pipes a remotely fetched script directly into bash, giving the remote server immediate code execution on the user's machine with no integrity verification or review step. If the server, CDN, DNS, TLS termination, or upstream publishing path is compromised, the install step becomes a one-command arbitrary code execution vector.

Content

Scanner excerpt · README.md (reported line 36)May include surrounding context.

  • NOVITA_API_KEY — get one from Novita AI Key Management
  • novitaclaw CLI — install with:
    bash
    curl -fsSL https://novitaclaw.novita.ai/install.sh | bash
    

Usage

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The use of '| bash' is the dangerous execution primitive that turns remote content retrieval into immediate shell execution, removing any meaningful inspection barrier. In this skill's context, where users are encouraged to audit untrusted skills, normalizing command chaining like this is especially risky because it undermines the very security posture the skill claims to improve.

Content

Scanner excerpt · README.md (reported line 36)May include surrounding context.

  • NOVITA_API_KEY — get one from Novita AI Key Management
  • novitaclaw CLI — install with:
    bash
    curl -fsSL https://novitaclaw.novita.ai/install.sh | bash
    

Usage

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

The skill recommends installing novitaclaw via curl -fsSL https://novitaclaw.novita.ai/install.sh | bash, which fetches and executes remote code directly in a shell without verification. If the remote server, transport path, or script content is compromised, this becomes an immediate arbitrary code execution vector on the host system.

Content

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

md
- `NOVITA_API_KEY` must be set. If not, ask the user to register at https://novita.ai/?utm_source=OpenClaw&utm_medium=Dev_Rel&utm_campaign=Claw-30 and get an API key from https://novita.ai/settings/key-management, then:
  `export NOVITA_API_KEY=<key>`
- `novitaclaw` CLI must be installed. If not found:
  `curl -fsSL https://novitaclaw.novita.ai/install.sh | bash`
- `novita-sandbox` npm package must be available. If not:
  `npm install novita-sandbox`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
SANDBOX_ID=<sandbox_id> SKILL_NAME="$ARGUMENTS" node scripts/install-skill.mjs

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script deliberately constructs suspicious search tokens at runtime 'to avoid triggering static scanners', which is unnecessary for a legitimate audit helper and indicates scanner-evasion behavior. Even if the immediate effect is only grep pattern construction, embedding anti-analysis logic in a security tool undermines trust, can conceal risky behavior from review pipelines, and is especially concerning given the skill’s stated purpose is security auditing.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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 · scripts/install-skill.mjs (reported line 95)May include surrounding context.

js
await run(`cp -r ${TMP_DIR}/.claude/skills/* ${SKILLS_DIR}/`);
  } else {
    // Copy everything except .git
    await run(`cp -a ${TMP_DIR}/. ${TARGET_DIR}/ && rm -r ${TARGET_DIR}/.git`);
  }
}

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/install-skill.mjs (reported line 95)May include surrounding context.

js
await run(`cp -r ${TMP_DIR}/.claude/skills/* ${SKILLS_DIR}/`);
  } else {
    // Copy everything except .git
    await run(`cp -a ${TMP_DIR}/. ${TARGET_DIR}/ && rm -r ${TARGET_DIR}/.git`);
  }
}

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README instructs users to run installation and audit workflows that use a live API key and fetch/install third-party skills, but it does not warn that this executes untrusted remote code and may expose credentials through environment variables, logs, or compromised tooling. In a security-auditing skill, the absence of explicit operational safety guidance increases the chance that users will treat the process as inherently safe and run it with overly broad trust.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill invokes environment-dependent operations and instructs use of sensitive configuration such as NOVITA_API_KEY, but it does not declare any explicit tool scope or permissions boundaries. This increases the risk that an agent may access environment data or perform actions beyond what a user would reasonably expect, with no machine-readable restriction layer.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs the agent to automatically pause the sandbox after generating a report, without first obtaining user confirmation. Although lower severity than code execution issues, this still performs a state-changing external action on user resources automatically, which can surprise users and conflict with their intended workflow.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
89% confidence
Finding

Hardcoding and scanning the shared skills directory enables enumeration of all installed skills in the sandbox rather than limiting access to the requested package. In context, that broad scope increases the danger because this tool is supposed to audit one specified skill, yet it can inventory unrelated assets and feed that information into later exfiltration via the fileContents output.

Content

Scanner excerpt · scripts/audit-skill.mjs (reported line 38)May include surrounding context.

js
? SKILL_NAME.split('/').pop()
  : SKILL_NAME;

const SKILLS_DIR = '/home/user/.claude/skills';

async function run(cmd) {
  const r = await sandbox.commands.run(cmd, { timeoutMs: 30_000 });

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script enumerates files across the skills directory and emits full contents of all matching text files to stdout, not just metadata for the requested skill. This can disclose proprietary code, prompts, embedded secrets, or unrelated installed skills from the sandbox, creating unnecessary data exfiltration risk from an audit operation.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · scripts/install-skill.mjs (reported line 40)May include surrounding context.

js
? SKILL_NAME.split('/').pop()
  : SKILL_NAME;

const SKILLS_DIR = '/home/user/.claude/skills';
const TARGET_DIR = `${SKILLS_DIR}/${skillBaseName}`;
const TMP_DIR = `/tmp/${skillBaseName}`;

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script executes rm -r against a temporary directory during fallback install attempts, but there is no confirmation prompt or user-facing disclosure at the point of deletion. Although cleanup is part of installation flow, recursive deletion is a safety-relevant operation and the file only documents required environment variables and JSON output, not this behavior.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · scripts/install-skill.mjs (reported line 89)May include surrounding context.

js
await run(`mkdir -p ${TARGET_DIR}`);

  // Detect structure: does the clone have .claude/skills/?
  const hasClaudeSkills = await tryRun(`test -d ${TMP_DIR}/.claude/skills`);

  if (hasClaudeSkills.ok) {
    await run(`cp -r ${TMP_DIR}/.claude/skills/* ${SKILLS_DIR}/`);

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency uses a caret range (^1.0.0), allowing newer compatible versions to be installed without explicit review. In a security-auditing skill that launches sandboxes and installs third-party skills, this increases supply-chain risk because a compromised or breaking upstream release could silently alter audit behavior or execute unintended code during installation.

Content

Scanner excerpt · package.json (reported line 33)May include surrounding context.

json
"node": ">=18.0.0"
  },
  "dependencies": {
    "novita-sandbox": "^1.0.0"
  }
}

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The script consumes NOVITA_API_KEY from the environment to connect to the sandbox. While the header lists required environment variables, it does not explicitly warn users that a credential is being accessed and used for an external service connection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The script installs a skill via clawhub install or git clone from GitHub/clawhub.ai, which causes network access and downloads remote content, but the file does not include any user-facing disclosure beyond a brief install description. For a tool that fetches code into a sandbox, an explicit warning about contacting external services and pulling remote repositories would improve transparency.

Content

No source excerpt is available for this finding.