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.
为什么得出这个结论
2/4 个维度触发发现 2 项声明之外的能力或越权行为。
提取到 2 个一般风险产物,需要结合上下文判断。
报告包含 6 步攻击链,另有 3 项高危或严重发现。
发现 2 项需要关注的依赖或供应链线索。
攻击链
初始入口 · SKILL.md:1
recon · index.js:62
权限提升 · index.js:67
权限提升 · src/archiver.ts:118
最终危害 · src/archiver.ts:108
exfiltration_potential · src/refiner.ts:25
风险分是怎么被拉高的
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
最关键的证据
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 声明能力 vs 实际能力
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 可疑产物与外联
https://clawhub.ai/skills/publish PUBLISH.md:18
https://json.schemastore.org/default keywords.json:2
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| openclaw | ^0.5.0 | npm | 否 | Caret version allows major updates |
| fast-glob | not declared | dynamic import | 否 | Imported but not used in src/archiver.ts |
| @types/node | ^20 | npm | 否 | Dev dependency, not pinned |
| typescript | ^5 | npm | 否 | Dev dependency, not pinned |
文件构成
src/archiver.ts SKILL.md index.js src/defaults.ts