Back to skill

Security audit

Agent Quick Start

Security checks for vulnerabilities and agentic risk

Overview

This template skill mostly matches its stated purpose, but the generated research bot uses unsafe shell commands and automatically saves research topics to memory.

Review carefully before installing. Use this only in a disposable or intended new project directory, avoid passing untrusted research topics to the generated research bot, and prefer a version-pinned install command. The research template should be fixed to use non-shell argument passing and should ask before saving topics to memory.

Vulnerability Patterns
  • 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
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
start.js:48
Finding

Shell Command Injection in the Generated Research Bot

Content
View full analysis

Vulnerability Details

File Location: start.js, lines 48–55 and 94–99
Vulnerability Type: OS command injection through unsafe shell-string interpolation
Risk Level: High

The vulnerable code is embedded in the research-bot template and is written to custom/research.js when a user creates a project from that template.

Vulnerable search command:

js
const { execSync } = require('child_process');

function searchWeb(query) {
  try {
    const output = execSync(`node ~/.openclaw/workspace/custom/free_search.js '${query}'`, {
      encoding: 'utf8',
      timeout: 30000
    });
    return output;

Vulnerable memory command:

js
// Save to memory
const { execSync } = require('child_process');
try {
  execSync(`node ~/.openclaw/skills/openclaw-memorize/memorize.js save "research-${Date.now()}" "${topic}"`, {
    encoding: 'utf8'
  });
  console.log('✅ Research saved to memory');

Technical Analysis

The generated script obtains topic from command-line arguments and passes it to searchWeb:

js
const args = process.argv.slice(2);
const topic = args.join(' ');

Both vulnerable calls construct a complete shell command by interpolating this attacker-controlled value into a string passed to execSync. Because execSync executes string commands through a shell, quote characters, command substitutions, and shell metacharacters in the topic can change the intended command structure.

The search invocation surrounds the value with single quotes, but a supplied single quote can terminate that quoted context. The memory invocation surrounds the value with double quotes, which still permits shell substitutions on common shells. Neither location applies shell-safe escaping or passes arguments through a non-shell API.

This vulnerability exists in generated projects rather than being triggered directly by the start.js create command. Once a Research Bot pr ...[truncated 1523 chars]

Remediation
View remediation

Remediation Suggestions

Replace shell command strings with a non-shell process API such as execFileSync or spawnSync, and supply every dynamic value as a separate argument.

A hardened implementation should resemble:

js
const { execFileSync } = require('child_process');
const path = require('path');
const os = require('os');

function searchWeb(query) {
  const scriptPath = path.join(
    os.homedir(),
    '.openclaw',
    'workspace',
    'custom',
    'free_search.js'
  );

  return execFileSync(process.execPath, [scriptPath, query], {
    encoding: 'utf8',
    timeout: 30000,
    shell: false
  });
}

Apply the same design to the memory operation:

js
const memorizePath = path.join(
  os.homedir(),
  '.openclaw',
  'skills',
  'openclaw-memorize',
  'memorize.js'
);

execFileSync(
  process.execPath,
  [memorizePath, 'save', `research-${Date.now()}`, topic],
  {
    encoding: 'utf8',
    shell: false
  }
);

Additional hardening measures include:

  • Do not attempt to fix the issue solely with ad hoc quote replacement.
  • Validate topic length and reject control characters if they are not required.
  • Resolve script locations with os.homedir() and path.join() rather than relying on shell tilde expansion.
  • Use an explicit timeout for both child processes.
  • Limit the environment inherited by child processes where practical.
  • Add tests containing quotes, substitutions, semicolons, newlines, and other shell metacharacters to verify that they remain literal arguments.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:13
Finding

Mutable Latest Package Is Downloaded and Executed During Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 13
Vulnerability Type: Unpinned third-party package execution
Risk Level: Medium

Vulnerable installation instruction:

bash
npx clawhub@latest install agent-quick-start

Technical Analysis

The documented installation command instructs users to invoke npx with the mutable clawhub@latest package reference. This causes the package version selected at installation time to depend on the registry's current latest tag rather than a version reviewed alongside this project.

npx can download and execute package code. Consequently, the command's effective behavior can change after this audit without any change to the audited repository. The project also provides no integrity digest or other verification information for the retrieved package.

This is a supply-chain weakness rather than evidence that the current clawhub package is malicious. Exploitation depends on a malicious or compromised future release, registry account, package distribution path, or unexpected reassignment of the latest tag.

Attack Path

  1. An attacker compromises the package publisher, registry account, release process, or another relevant supply-chain component.
  2. A malicious package version is published and assigned the latest tag.
  3. A user follows the installation command from SKILL.md.
  4. npx resolves clawhub@latest to the attacker-controlled release and downloads it.
  5. Package code executes with the privileges of the user running the installation command.
  6. The malicious release can access data and perform operations available to that user.

Impact Assessment

If the mutable dependency is compromised, its code can execute with the installing user's privileges. Potential scope includes:

  • Reading or changing user-accessible files.
  • Accessing environment variables and locally stored tokens.
  • Modifying OpenClaw projects or configurat ...[truncated 314 chars]
Remediation
View remediation

Remediation Suggestions

  • Replace @latest with an exact, reviewed package version:
    bash
    npx clawhub@X.Y.Z install agent-quick-start
    
  • Document the expected package registry and publisher identity.
  • Where supported, verify the downloaded package against a trusted integrity hash or signed provenance record.
  • Review the pinned release before recommending it to users.
  • Update the pinned version only through a controlled review process.
  • In automated environments, use lockfiles, immutable package sources, and registry allowlists where applicable.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (10)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The generated research template constructs a shell command with unsanitized user input: execSync(node ~/.openclaw/workspace/custom/free_search.js '${query}'). Because the query is inserted inside single quotes, an attacker can break out of quoting and achieve shell command injection when the generated script is used.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

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.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description says the skill should be used 'when starting new OpenClaw projects' and lists broad purposes like 'research bots, content generators, task automation, and more.' In a markdown skill description, this is an expansive activation scope without specific trigger phrases, exclusions, or constraints, which can cause unintended invocation for many common project-start tasks.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The installation command uses npx clawhub@latest, which pulls the most recent published package at runtime instead of a pinned version. This creates a supply-chain risk because a malicious or compromised future release could be installed and executed without review.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
# List available templates
node ~/.openclaw/skills/agent-quick-start/start.js list

# Create a project from a template
node ~/.openclaw/skills/agent-quick-start/start.js create <template_name> <project_path>

# Example: Create a research bot

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The generated AGENT.md describes a research bot but does not disclose that its implementation performs subprocess-based web search and stores research topics in memory. This mismatch increases the chance that users will run the generated skill without understanding its side effects, making the hidden execution and data retention more dangerous in a template context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The template generator embeds a research template that executes subprocesses and writes user-provided topics to another installed skill's memory. Even though this is scaffolding rather than immediate execution by start.js itself, shipping a boilerplate skill with hidden side effects exceeds the advertised quick-start/template role and can lead users to generate agents that invoke shell commands and persist potentially sensitive input without clear disclosure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The generated template automatically persists the research topic to an external memory skill without explicit notice or consent. This creates a confidentiality/privacy risk because prompts may contain sensitive project names, investigation subjects, credentials-by-mistake, or other user data that gets stored outside the immediate workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The createProject function creates directories and writes template files into the specified projectPath, but the only disclosure is success logging after execution begins. There is no confirmation prompt or explicit warning that existing files in the target location may be created or overwritten.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The usage examples show a 'create' command that writes a new project to the provided path, and the features section reinforces that it will 'Copy to any directory.' The README does not warn users that files will be created in the target location or advise choosing an empty/safe directory, which is a user-impacting filesystem operation.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
start.js:52