openclaw-usage-manager
This is a legitimate dual-account Claude Max usage manager, but it stores API tokens unencrypted in plaintext files and modifies OpenClaw auth profiles with no declared credentials handling in SKILL.md — a significant doc-to-code mismatch for a credential-accessing tool.
Both setup scripts write raw Bearer tokens (sk-ant-...) to ~/.openclaw/workspace/tools/usage-switch/tokens.json as unencrypted JSON. Even with chmod 600, the tokens are recoverable by any process running as the user. SKILL.md does not document this token storage model.
usage-switch/setup-tokens.sh:17 Why this conclusion was reached
2/4 dimensions flagged4 undeclared or violating capabilities were inferred.
5 lower-risk artifacts were extracted and still need context.
The report includes 0 attack-chain steps and 2 severe findings.
1 dependency or supply-chain issues need attention.
What drove the risk score up
SKILL.md nowhere mentions that API tokens (sk-ant-...) are read from 1Password or stdin and written to plaintext ~/.openclaw/.../tokens.json, nor that check.mjs reads/writes ~/.openclaw/agents/main/agent/auth-profiles.json
tokens.json contains raw Bearer tokens (sk-ant-...) stored unencrypted on disk. chmod 600 mitigates file permission risk but does not encrypt the contents.
check.mjs modifies ~/.openclaw/agents/main/agent/auth-profiles.json at runtime to perform account switching — undeclared elevated file write to a sensitive agent config path
server.mjs uses child_process.execSync for 1Password CLI invocations and port killing — not declared in SKILL.md but scoped and documented in code
External URLs point to a named GitHub repo (Takao-Mochizuki/openclaw-usage-manager), a real company (5dmgmt.com), and legitimate 1Password CLI docs — consistent with a real project, not a typosquat or C2 channel
Most important evidence
API tokens stored in plaintext on disk
Both setup scripts write raw Bearer tokens (sk-ant-...) to ~/.openclaw/workspace/tools/usage-switch/tokens.json as unencrypted JSON. Even with chmod 600, the tokens are recoverable by any process running as the user. SKILL.md does not document this token storage model.
usage-switch/setup-tokens.sh:17 Undeclared modification of OpenClaw agent auth profiles
check.mjs reads and rewrites ~/.openclaw/agents/main/agent/auth-profiles.json at runtime to perform account switching. This modifies the agent's active authentication configuration — a sensitive operation — with no declaration in SKILL.md.
usage-switch/check.mjs:61 SKILL.md does not declare any credential handling, token storage, or auth profile access
SKILL.md describes a dashboard and auto-switcher but omits all credential operations: reading tokens from 1Password, storing them in tokens.json, and modifying auth-profiles.json. This doc-to-code mismatch is the highest-value security signal in this analysis.
SKILL.md:1 Undeclared filesystem WRITE to OpenClaw agent directory
check.mjs writes to ~/.openclaw/agents/main/agent/auth-profiles.json — a path inside OpenClaw's own agent infrastructure. SKILL.md declares no filesystem access beyond 'browser dashboard'.
usage-switch/check.mjs:8 Hardcoded placeholder 1Password item IDs in server.mjs
The dashboard server has hardcoded 'your-c1-item-id' and 'your-c2-item-id' placeholders in ACCOUNTS config. While these are clearly documented as placeholders, leaving them in production code with no validation could cause confusing errors.
usage-dashboard/server.mjs:19 Declared capability vs actual capability
setup-tokens.sh:17 writes to ~/.openclaw/workspace/tools/usage-switch/tokens.json; check.mjs:65 writes to ~/.openclaw/agents/main/agent/auth-profiles.json server.mjs:58, check.mjs:28 POST to https://api.anthropic.com/v1/messages using Bearer tokens setup-tokens.sh:1, setup-tokens-simple.sh:1 are shell scripts; server.mjs:148 uses execSync for port killing SKILL.md describes a 'browser dashboard' but browser:READ is not in the declared allowed-tools set setup-tokens.sh reads from 1Password CLI (op item get --reveal); check.mjs:65 writes Bearer tokens into auth-profiles.json setup-tokens.sh:17, setup-tokens-simple.sh:18 pass C1_TOKEN/C2_TOKEN via os.environ to Python Suspicious artifacts and egress
https://x.com/5dmgmt/status/2032770037728113118 README.md:18
https://openclaw.ai README.md:92
https://developer.1password.com/docs/cli/ README.md:95
https://x.com/5dmgmt README.md:653
https://5dmgmt.com README.md:655
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| Node.js >= 18 | unspecified runtime version | runtime | No | No package.json / package-lock.json found — no npm dependencies. Uses only built-in Node.js modules (http, crypto, child_process, fs, url, path) |
| 1Password CLI (op) | latest | system binary | No | External system binary invoked via execSync. SKILL.md declares '1Password CLI recommended' but does not verify installation. Failure is handled gracefully (returns null token) |
File composition
usage-switch/setup-tokens.sh usage-switch/setup-tokens-simple.sh README.md usage-dashboard/server.mjs usage-switch/check.mjs SKILL.md