Back to skill

Security audit

Migrator

Security checks for vulnerabilities and agentic risk

Overview

This migration skill appears purpose-built, but it needs review because restore can write files before archive integrity is fully verified and its examples expose backup passwords on the command line.

Install only if you are comfortable reviewing and controlling where backups are created and restored. Treat .oca files as highly sensitive, transfer them only over trusted channels, avoid command-line passwords, and do not import archives you did not create or cannot trust. The restore integrity issue should be fixed before relying on this for important agent state.

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
src/restore.js:75
Finding

Archive contents are extracted before AES-GCM authentication succeeds

Content
View full analysis
{ const input = fs.createReadStream(archivePath); try { const { salt, iv } = await readHeader(input); const key = crypto.scryptSync(password, salt, 32); const decipher = crypto.createDecipheriv('aes-256-gcm', key, iv); const splitter = new GcmTagSplitter(); splitter.on('tag', (tag) => { try { decipher.setAuthTag(tag); } catch (e) { reject(new Error('Invalid auth tag')); } }); const extractor = tar.x({ cwd: targetDir, filter: (path) => { // Security: Block absolute paths and parent directory traversal const normalizedPath = path.replace(/\\/g, '/'); if (normalizedPath.startsWith('/') || normalizedPath.includes('..')) { console.warn(`🚨 Security: Blocked suspicious path in archive: ${path}`); return false; } return true; }, onentry: (entry) => { console.log(`Extracting: ${entry.path}`); } }); decipher.on('error', () => reject(new Error('Decryption failed (Wrong password or corrupted archive)'))); extractor.on('error', reject); extractor.on('end', () => { console.log('🔓 Decryption & Extraction complete.'); resolve(); }); input.pipe(splitter).pipe(decipher).pipe(extractor); ``` ### Technical Analysis AES-256-GCM provides confidentiality and integrity only after the authentication tag has been supplied and successfully verified. Node.js can emit plaintext through a GCM decipher before `decipher.final()` verifies that tag. Here, decrypted bytes are strea ...[truncated 2095 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
src/index.js:21
Finding

Command-line password option exposes archive credentials to local observers and shell history

Content
View full analysis
', 'Output archive path', 'agent-backup.oca') .option('-p, --password ', 'Encryption password') ``` The same insecure option is exposed for imports at `src/index.js`, lines 45-48: ```javascript program.command('import') .description('Restore agent state from an archive') .requiredOption('-i, --input ', 'Input archive path') .option('-p, --password ', 'Decryption password') ``` The documentation actively recommends this usage in `README.md`, lines 37-45, and `SKILL.md`, lines 21-29: ```bash migrator export -o my-agent.oca --password "your-secret-password" migrator import -i my-agent.oca --password "your-secret-password" ``` ### Technical Analysis Passing a secret as a command-line argument commonly exposes it through: - Shell history files. - Process inspection interfaces and utilities such as `ps`. - Process accounting and monitoring agents. - Terminal logs, command auditing, and automation logs. - CI/CD job output or task definitions. Although the code also supports `MIGRATOR_PASSWORD`, environment variables are not an ideal general-purpose secret channel either: they can be inherited by child processes and may be exposed by process-inspection or diagnostic facilities. Because the archive contains sensitive OpenClaw configuration, authentication tokens, memory, and skills, disclosure of the password can compromise both archived secrets and agent state. ### Attack Path 1. A user follows the documented command and supplies the archive password with `--password`. 2. The complete command is recorded in shell history or exposed in the process argument list while migration is running. 3. Anot ...[truncated 917 chars]
Remediation
View remediation
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims to securely migrate real agent configuration, memory, and skills, but the analyzed behavior indicates it does not actually perform that migration and may instead write synthetic credentials or sample content. This creates a dangerous trust gap: users may believe sensitive state was securely preserved or transferred when it was not, potentially causing data loss, broken recovery, or unsafe handling of credentials.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims to securely migrate real agent configuration, memory, and skills, but the analyzed behavior indicates it does not actually perform that migration and may instead write synthetic credentials or sample content. This creates a dangerous trust gap: users may believe sensitive state was securely preserved or transferred when it was not, potentially causing data loss, broken recovery, or unsafe handling of credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README explicitly promotes exporting and importing an agent's config, memory, and skills across machines but does not warn users that these archives may contain sensitive data such as credentials, prompts, memory contents, workspace references, or other private artifacts. In a migration tool context, omission of clear data-sensitivity and trust-boundary warnings increases the chance that users will create, transfer, or import highly sensitive archives insecurely or from untrusted sources.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
71% confidence
Finding

The skill declares no explicit tool scope even though environment access is implied, which increases the chance of over-broad execution privileges during migration of sensitive agent data. For a skill that handles secrets like config and auth tokens, missing permissions boundaries can enable unintended access to environment variables or other host state beyond what users expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code archives default user directories under the home folder and begins writing the encrypted archive to the provided output path, but the function itself has no confirmation prompt, disclosure message, or comment warning that user data and metadata will be packaged. The only visible warning in the file is for missing source directories, not for the data-collection and file-write behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest includes the user's home directory, platform details, and possibly a workspace path derived from configuration, and this data is then embedded into the archive. There is no user-facing notice or code comment warning that potentially sensitive system and path information will be included.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency uses a caret range (^7.0.0), which permits newer minor and patch releases to be installed over time. This weakens build reproducibility and can expose the package to unexpected upstream regressions or newly introduced supply-chain issues, though by itself it is not direct exploit code.

Content

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

json
"author": "Lucas <lucas.xuan>",
  "license": "MIT",
  "dependencies": {
    "archiver": "^7.0.0",
    "tar": "^7.4.3",
    "fs-extra": "^11.2.0",
    "commander": "^12.0.0"

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The tar dependency is specified with a caret range (^7.4.3), so installations may resolve to different releases over time. In a migration tool that likely handles archive creation or extraction, this increases risk because behavior and security posture depend on whatever tar version is pulled at install time.

Content

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

json
"license": "MIT",
  "dependencies": {
    "archiver": "^7.0.0",
    "tar": "^7.4.3",
    "fs-extra": "^11.2.0",
    "commander": "^12.0.0"
  }

Unverifiable Dependency: tar has 16 known advisory(ies) (CVE-2026-59873 (node-tar: Decompression/parse DoS via unlimited input); CVE-2025-64118 (node-tar has a race condition leading to uninitialized memory exposure); CVE-2026-24842 (node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Trave) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The manifest includes tar without pinning an exact version, while the package has multiple known advisories. Because the exact installed release is not fixed, it is impossible to verify from this manifest alone whether deployments are protected or exposed; in a migration utility that likely processes archives, this uncertainty is more concerning than in a non-archive-related package.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Using a version range for fs-extra allows non-deterministic dependency resolution and makes it harder to verify exactly what code is installed in different environments. This is primarily a software supply-chain hygiene issue rather than an immediate exploitable flaw from the manifest alone.

Content

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

json
"dependencies": {
    "archiver": "^7.0.0",
    "tar": "^7.4.3",
    "fs-extra": "^11.2.0",
    "commander": "^12.0.0"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The commander package is not pinned to an exact version, so downstream installs may receive different releases. That creates avoidable supply-chain and reproducibility risk, especially for a CLI tool that may run with access to sensitive migration data.

Content

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

json
"archiver": "^7.0.0",
    "tar": "^7.4.3",
    "fs-extra": "^11.2.0",
    "commander": "^12.0.0"
  }
}

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill is described as securely migrating OpenClaw Agent data to a new machine, which naturally justifies decrypting archives and writing restored files. However, this file's CLI path specifically pulls a secret from process environment state (MIGRATOR_PASSWORD), which is a separate credential-access capability not implied by the manifest description itself.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest contains hardcoded user-specific absolute paths for both the workspace and home directory. This exposes local username and filesystem layout information and can cause privacy leakage, portability problems, or unsafe path assumptions when the migrated data is restored on another machine.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.