Back to skill

Security audit

secrets-manager

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent local secret store, but it has material secret-exposure risks in normal documented workflows.

Review before installing. This skill does not show exfiltration or hidden execution, but use it only in a local, single-user environment and avoid putting real secrets in command arguments, --raw stdout, temp files, CI logs, or agent transcripts. Treat audit output as potentially sensitive until the plaintext-prefix issue is fixed, and do not rely on permissions.json for access control.

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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
secrets-manager.js:317
Finding

Secret Audit Logs Plaintext Secret Prefixes

Content
View full analysis
0) { hasIssues = true; console.log(`\n ⚠️ Weak patterns (${findings.patterns.length}):`); for (const f of findings.patterns) { console.log(` ⚠️ ${f.name}: starts with '${f.pattern}'`); } } ``` ### Technical Analysis The audit function decrypts each stored secret and, when the plaintext starts with a recognized weak prefix, copies up to the first ten plaintext characters into an audit finding. That prefix is then printed to standard output. An audit operation should report that a policy violation was detected without reproducing any part of the sensitive value. Standard output may be captured by terminal scrollback, CI/CD logs, journald, centralized log collectors, or Agent conversation transcripts. This behavior also conflicts with the documentation's assertion that secret values are not logged. The exposure occurs during ordinary `--audit` execution and does not require the explicitly sensitive `--get --raw` option. ### Attack Path 1. A secret beginning with `password`, `admin`, `root`, `test`, `demo`, `secret`, `key`, or `token` is stored. 2. A user, scheduled workflow, or Agent runs: ```bash node secrets-manager.js --audit ``` 3. The audit decrypts the secret and copies its first ten characters into `findings.patterns`. 4. The plaintext prefix is printed to standard output. 5. Any user or service with access to captured logs, terminal history, CI output, or Agent transcripts ...[truncated 656 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
secrets-manager.js:438
Finding

Plaintext Secrets Are Accepted Through Process Command-Line Arguments

Content
View full analysis
'); } else { storeSecret(name, value); } break; } ``` The documented usage encourages this input method: ```bash node secrets-manager.js --store openai-key sk-abc123 ``` ### Technical Analysis Although the value is encrypted before being written to the secret database, it first enters the program as a plaintext command-line argument. Command-line arguments are not a confidential input channel. Depending on the operating system and deployment environment, arguments may be exposed through: - Shell history - Process inspection utilities - `/proc` process metadata - Endpoint monitoring and audit systems - CI/CD command logs - Agent transcripts containing the generated command - Wrapper scripts or orchestration telemetry Encryption at rest does not mitigate disclosure that occurs before encryption. The documentation warns about plaintext output from `--get --raw`, but it does not provide a protected secret-input mechanism for storage. ### Attack Path 1. A user follows the documented Quick Start command: ```bash node secrets-manager.js --store production-key actual-secret-value ``` 2. The shell records the command in history, or the process arguments remain observable while the command runs. 3. A local user, monitoring service, CI log reader, or other party with access to process telemetry reads the plaintext value. 4. The attacker can use the recovered credential i ...[truncated 597 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
secrets-manager.js:38
Finding

Command-Line Storage Directory Override Is Applied After Path Initialization

Content
View full analysis
{ if (process.env.SECRETS_DIR) return process.env.SECRETS_DIR; let dir = __dirname; for (let i = 0; i < 10; i++) { if (fs.existsSync(path.join(dir, 'MEMORY.md'))) return dir; dir = path.resolve(dir, '..'); } return path.resolve(__dirname, '..', '..'); })(); const DATA_DIR = path.join(WORKSPACE, 'memory', 'secrets'); const SECRETS_FILE = path.join(DATA_DIR, 'secrets.json'); const MASTER_KEY_FILE = path.join(DATA_DIR, '.master-key'); const PERMS_FILE = path.join(DATA_DIR, 'permissions.json'); ``` The command-line override is not processed until later: ```js else if (arg === '--dir' && i + 1 < args.length) { process.env.SECRETS_DIR = args[++i]; } ``` ### Technical Analysis `WORKSPACE`, `DATA_DIR`, `SECRETS_FILE`, `MASTER_KEY_FILE`, and `PERMS_FILE` are constants initialized before `parseCLI()` handles `--dir`. Updating `process.env.SECRETS_DIR` afterward does not recompute any of those constants. Consequently, the documented `--dir ` option is silently ineffective. A user may select a protected or isolated storage location while the program continues reading and writing at the default path. This is security-relevant because storage location is part of the access-control boundary for both the encrypted database and its master key. File modes provide protection against other operating-system users, but they do not prevent exposure through an unintended workspace, backup, synchronization, or container-mount policy. ### Attack Path 1. A user expects to isolate secrets in a protected location: ```bash node secrets-manager.js --dir /protected/location --store api-key value ``` 2. The module compu ...[truncated 1035 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (49)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is a second distinct mismatch report on the same lines: the documentation asserts properties such as 'never writes plaintext secrets to disk' and support for multiple operational modes, but none of that can be validated from the supplied content. For a secret store, unverifiable claims materially increase risk because users may expose credentials under a false assumption of confidentiality and safe handling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

This is a second distinct mismatch report on the same lines: the documentation asserts properties such as 'never writes plaintext secrets to disk' and support for multiple operational modes, but none of that can be validated from the supplied content. For a secret store, unverifiable claims materially increase risk because users may expose credentials under a false assumption of confidentiality and safe handling.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
| Approach | Encryption | Setup | Audit | Rotation | Recovery |
|----------|-----------|-------|-------|----------|----------|
| Environment vars | None | Medium | None | Manual | N/A |
| .env files | None | Low | None | Manual | N/A |
| **Secrets Manager** | **AES-256-GCM** | **None** | **Auto** | **Auto** | **With .master-key** |
| Vault service | Various | High | Auto | Auto | Yes |

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'shell' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 16)May include surrounding context.

md
* Secrets Manager — Local encrypted secret store for OpenClaw agents
 *
 * Storage: AES-256-GCM encryption with a per-install master key.
 *   - secrets.json: { name: { iv, ct, tag, created, updated, rotationDays, lastRotated, rotationCount } }
 *   - .master-key: 32 random bytes, chmod 0600
 *   - If .master-key is lost, all stored secrets become unrecoverable
 *

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 65)May include surrounding context.

md
* Secrets Manager — Local encrypted secret store for OpenClaw agents
 *
 * Storage: AES-256-GCM encryption with a per-install master key.
 *   - secrets.json: { name: { iv, ct, tag, created, updated, rotationDays, lastRotated, rotationCount } }
 *   - .master-key: 32 random bytes, chmod 0600
 *   - If .master-key is lost, all stored secrets become unrecoverable
 *

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
* Secrets Manager — Local encrypted secret store for OpenClaw agents
 *
 * Storage: AES-256-GCM encryption with a per-install master key.
 *   - secrets.json: { name: { iv, ct, tag, created, updated, rotationDays, lastRotated, rotationCount } }
 *   - .master-key: 32 random bytes, chmod 0600
 *   - If .master-key is lost, all stored secrets become unrecoverable
 *

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
* Secrets Manager — Local encrypted secret store for OpenClaw agents
 *
 * Storage: AES-256-GCM encryption with a per-install master key.
 *   - secrets.json: { name: { iv, ct, tag, created, updated, rotationDays, lastRotated, rotationCount } }
 *   - .master-key: 32 random bytes, chmod 0600
 *   - If .master-key is lost, all stored secrets become unrecoverable
 *

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · clawhub.yaml (reported line 24)May include surrounding context.

yaml
* Secrets Manager — Local encrypted secret store for OpenClaw agents
 *
 * Storage: AES-256-GCM encryption with a per-install master key.
 *   - secrets.json: { name: { iv, ct, tag, created, updated, rotationDays, lastRotated, rotationCount } }
 *   - .master-key: 32 random bytes, chmod 0600
 *   - If .master-key is lost, all stored secrets become unrecoverable
 *

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · secrets-manager.js (reported line 6)May include surrounding context.

js
* Secrets Manager — Local encrypted secret store for OpenClaw agents
 *
 * Storage: AES-256-GCM encryption with a per-install master key.
 *   - secrets.json: { name: { iv, ct, tag, created, updated, rotationDays, lastRotated, rotationCount } }
 *   - .master-key: 32 random bytes, chmod 0600
 *   - If .master-key is lost, all stored secrets become unrecoverable
 *

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · secrets-manager.js (reported line 27)May include surrounding context.

js
* Secrets Manager — Local encrypted secret store for OpenClaw agents
 *
 * Storage: AES-256-GCM encryption with a per-install master key.
 *   - secrets.json: { name: { iv, ct, tag, created, updated, rotationDays, lastRotated, rotationCount } }
 *   - .master-key: 32 random bytes, chmod 0600
 *   - If .master-key is lost, all stored secrets become unrecoverable
 *

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · secrets-manager.js (reported line 28)May include surrounding context.

js
* Secrets Manager — Local encrypted secret store for OpenClaw agents
 *
 * Storage: AES-256-GCM encryption with a per-install master key.
 *   - secrets.json: { name: { iv, ct, tag, created, updated, rotationDays, lastRotated, rotationCount } }
 *   - .master-key: 32 random bytes, chmod 0600
 *   - If .master-key is lost, all stored secrets become unrecoverable
 *

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · secrets-manager.js (reported line 49)May include surrounding context.

js
* Secrets Manager — Local encrypted secret store for OpenClaw agents
 *
 * Storage: AES-256-GCM encryption with a per-install master key.
 *   - secrets.json: { name: { iv, ct, tag, created, updated, rotationDays, lastRotated, rotationCount } }
 *   - .master-key: 32 random bytes, chmod 0600
 *   - If .master-key is lost, all stored secrets become unrecoverable
 *

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The inline security model states raw secrets should only be printed when explicitly confirmed, but the implementation prints plaintext whenever --raw is supplied and ignores the parsed confirmExpose flag entirely. In agent environments, stdout is often logged, captured, or forwarded, so a single flag can cause direct credential disclosure to logs and downstream systems.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
87% confidence
Finding

The example explicitly prints a plaintext secret with --get --raw and redirects it to /tmp/key.txt. Even with chmod 600, writing secrets to /tmp contradicts the broader safety claims and creates exposure risk via insecure temporary storage, backups, race conditions, shell history/process observation, or accidental mishandling by downstream tools.

Content

Scanner excerpt · README.md (reported line 31)May include surrounding context.

md
# → openai-key: sk-****23

# Get the raw value (prints to stdout — use only when you must pass it onward)
node secrets-manager.js --get --raw openai-key > /tmp/key.txt && chmod 600 /tmp/key.txt

# List secret names + metadata (never values)
node secrets-manager.js --list

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 67)May include surrounding context.

Data stored in memory/secrets/:

  • secrets.json — encrypted secrets (chmod 0600)
  • .master-key — 256-bit master key as hex (chmod 0600)
  • permissions.json — per-secret access rules (chmod 0600)

Override storage location:

bash

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 80)May include surrounding context.

Data stored in memory/secrets/:

  • secrets.json — encrypted secrets (chmod 0600)
  • .master-key — 256-bit master key as hex (chmod 0600)
  • permissions.json — per-secret access rules (chmod 0600)

Override storage location:

bash

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

Data stored in memory/secrets/:

  • secrets.json — encrypted secrets (chmod 0600)
  • .master-key — 256-bit master key as hex (chmod 0600)
  • permissions.json — per-secret access rules (chmod 0600)

Override storage location:

bash

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly recommends retrieving a raw secret and redirecting it into /tmp, which results in plaintext secret material being written to disk despite the product positioning as a 'PURE STORE' that avoids plaintext-on-disk handling. This contradiction is dangerous because temporary files are often world-discoverable by path, persist longer than intended, and may be captured by backups, forensic tooling, or other local users depending on system configuration.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

Use only when piping to a private process:

bash
node secrets-manager.js --get --raw api-key > /tmp/api-key.txt && chmod 600 /tmp/api-key.txt

Rotation: Old Values Are Archived

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The documentation introduces a permissions.json file with per-secret access rules, but no authorization model or enforcement details are otherwise described. In a secret-management skill, undocumented or ambiguous access-control semantics can create a false sense of isolation and lead users to assume secrets are protected from unauthorized access when they may not be.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 14)May include surrounding context.

md
slug: secrets-manager
name: secrets-manager
owner: jlacroix82
description: "Encrypted local secret store for OpenClaw agents. A PURE STORE: AES-256-GCM authenticated encryption with per-secret random IVs, master key in chmod 0600 .master-key file. Modes: store, get (masked; --raw prints plaintext), list (names+metadata only), delete (irreversible), rotate / rotate --all (archive old as retired), audit (--expired/--stale), status. NEVER writes plaintext secrets to disk or generates executable command scripts — command injection lives in the separate secrets-inject skill. SECRETS_DIR and SECRETS_MASTER_KEY env overrides supported. Losing .master-key makes secrets unrecoverable."
version: 1.1.15
type: skill
author: OpenClaw

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 16)May include surrounding context.

md
slug: secrets-manager
name: secrets-manager
owner: jlacroix82
description: "Encrypted local secret store for OpenClaw agents. A PURE STORE: AES-256-GCM authenticated encryption with per-secret random IVs, master key in chmod 0600 .master-key file. Modes: store, get (masked; --raw prints plaintext), list (names+metadata only), delete (irreversible), rotate / rotate --all (archive old as retired), audit (--expired/--stale), status. NEVER writes plaintext secrets to disk or generates executable command scripts — command injection lives in the separate secrets-inject skill. SECRETS_DIR and SECRETS_MASTER_KEY env overrides supported. Losing .master-key makes secrets unrecoverable."
version: 1.1.15
type: skill
author: OpenClaw

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 65)May include surrounding context.

md
slug: secrets-manager
name: secrets-manager
owner: jlacroix82
description: "Encrypted local secret store for OpenClaw agents. A PURE STORE: AES-256-GCM authenticated encryption with per-secret random IVs, master key in chmod 0600 .master-key file. Modes: store, get (masked; --raw prints plaintext), list (names+metadata only), delete (irreversible), rotate / rotate --all (archive old as retired), audit (--expired/--stale), status. NEVER writes plaintext secrets to disk or generates executable command scripts — command injection lives in the separate secrets-inject skill. SECRETS_DIR and SECRETS_MASTER_KEY env overrides supported. Losing .master-key makes secrets unrecoverable."
version: 1.1.15
type: skill
author: OpenClaw