openclaw-memory-auto
Skill contains hardcoded absolute Windows paths exposing user identity, undeclared PowerShell script execution, and credential-related keyword harvesting with plausible yet suspicious design patterns.
Why this conclusion was reached
2/4 dimensions flagged2 undeclared or violating capabilities were inferred.
2 lower-risk artifacts were extracted and still need context.
The report includes 6 attack-chain steps and 3 severe findings.
2 dependency or supply-chain issues need attention.
Attack Chain
Entry · SKILL.md:1
recon · index.js:62
Escalation · index.js:67
Escalation · src/archiver.ts:118
Impact · src/archiver.ts:108
exfiltration_potential · src/refiner.ts:25
What drove the risk score up
Three files contain hardcoded paths with Windows usernames (C:\Users\42517\) — index.js:62, test.js:2, standalone-archive.js: hardcoded transcriptDir — exposing user identity and not declared in SKILL.md
index.js spawns powershell.exe with -ExecutionPolicy Bypass to run archive.ps1 and refine.ps1 scripts that do not exist in the codebase; not declared in SKILL.md
defaults.ts and keywords.json include sensitive keywords (password, token, key, secret, api, 密钥, 密码, 账号) which are used to extract message highlights, potentially capturing sensitive credentials from chat transcripts
SKILL.md states 'Pure TypeScript' with no mention of PowerShell scripts, hardcoded paths, or Windows-specific behavior; index.js spawns external scripts with bypassed execution policy
src/archiver.ts imports fast-glob then never uses it, and falls back to a hardcoded path; this pattern is commonly used to obfuscate file system enumeration
Most important evidence
Hardcoded Windows username path leaks user identity
index.js line 62 contains a hardcoded absolute path 'C:\Users\42517\.openclaw\agents\main\sessions' and test.js contains 'C:\Users\42517\.openclaw\workspace'. These expose the Windows username '42517' and indicate the developer built and tested the tool on a real user's machine, with that user's directory structure baked into the code. This pattern is consistent with credential-harvesting malware that probes known user paths.
index.js:62 Undeclared PowerShell execution with bypassed execution policy
index.js spawns powershell.exe with arguments '-NoProfile', '-ExecutionPolicy', 'Bypass', and '-File' to run archive.ps1 and refine.ps1. Neither script exists in the repository. The -ExecutionPolicy Bypass flag explicitly bypasses PowerShell security policies. SKILL.md makes no mention of PowerShell scripts, external script execution, or Windows-specific behavior, instead describing the tool as 'Pure TypeScript'. This is a significant doc-to-code mismatch.
index.js:67 Sensitive credential keywords used to extract transcript highlights
src/defaults.ts contains a DEFAULT_KEYWORDS array including 'password', 'token', 'key', 'secret', 'api', '密钥', '密码', '账号'. These keywords are used by the archiver to extract 'highlights' from chat transcripts (src/archiver.ts:extractHighlights). The archiver reads all transcript files, filters for messages matching these keywords, and writes snippets to memory/YYYY-MM-DD.md. This means credentials, API keys, and secrets discussed in chat are extracted and stored in plaintext files without explicit user consent in SKILL.md.
src/defaults.ts:21 SKILL.md claims zero config needed but hardcoded paths require config
SKILL.md advertises 'Zero Configuration: Works out of the box with smart defaults' and 'Pure TypeScript, runs on Windows/Mac/Linux'. However, the actual code contains hardcoded Windows paths that will fail on any non-matching Windows machine or any non-Windows OS. The cross-platform claim is misleading.
SKILL.md:1 Dynamic fast-glob import with no actual usage
src/archiver.ts imports fast-glob but never calls it. Instead, it falls back to a hardcoded path join(workspace, 'agents', 'main', 'sessions'). The unused dynamic import pattern is sometimes used to evade static analysis tools. The fallback path still ignores the workspace parameter for agents other than 'main'.
src/archiver.ts:94 No version pinning for dependencies
package.json specifies dependencies without version pins: openclaw: '^0.5.0', @types/node: '^20', typescript: '^5'. This allows dependency updates that could introduce malicious code without the skill author's knowledge.
package.json:24 External URL reference in keywords.json
keywords.json line 2 references 'https://json.schemastore.org/default' for its JSON schema. While this is a legitimate schema store, fetching remote schemas during skill load could be leveraged for data exfiltration or tracking.
keywords.json:2 Declared capability vs actual capability
src/archiver.ts:108 — fs.writeFile for daily logs + marker files; standalone-archive.js — write operations; src/refiner.ts — fs.appendFile to MEMORY.md refine.js / src/refiner.ts — callAI() stub exists with TODO comment, not yet implemented; keywords.json:2 references external schema URL index.js:67-71 — spawn('powershell.exe', psArgs) with -ExecutionPolicy Bypass Multiple files read process.env.OPENCLAW_WORKSPACE Suspicious artifacts and egress
https://clawhub.ai/skills/publish PUBLISH.md:18
https://json.schemastore.org/default keywords.json:2
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| openclaw | ^0.5.0 | npm | No | Caret version allows major updates |
| fast-glob | not declared | dynamic import | No | Imported but not used in src/archiver.ts |
| @types/node | ^20 | npm | No | Dev dependency, not pinned |
| typescript | ^5 | npm | No | Dev dependency, not pinned |
File composition
src/archiver.ts SKILL.md index.js src/defaults.ts