T09 · Insecure Skill Coding Practices
- Location
commands/status.ts:39- Finding
Sensitive Membase secret key exposed through status JSON output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill appears intended to back up agent memory, but it exposes secrets in normal workflows and depends on unbundled external code.
Review before installing. Do not use this version with real credentials or backup passwords unless the status JSON is redacted, secret-check instructions are replaced with non-disclosing presence checks, password arguments are removed or avoided, restore behavior has clear staging or overwrite confirmation, and the reviewed package includes the actual lib implementation instead of relying on an external symlink.
commands/status.ts:39Sensitive Membase secret key exposed through status JSON output
SKILL.md:55Skill instructions direct the agent to print plaintext credentials
SKILL.md:93Backup passwords are supplied through observable command-line arguments
SKILL.md:375Security-critical implementation is loaded from an unaudited external symlink target
The documented '--no-validate' option disables password strength validation, allowing weak backup passwords to be used. While not an exploit by itself, in this context it undermines the skill's stated encryption guarantees because weak passwords materially reduce resistance to offline guessing if encrypted backup data is obtained.
- `--password <pwd>` or `-p <pwd>` - Encryption password (required if not in env)
- `--incremental` or `-i` - Only backup changed files since last backup
- `--workspace <path>` - Custom workspace directory
- `--no-validate` - Skip password strength validation
- `--no-json` - Don't output JSON for agent parsing
**Example conversation:**
The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
} catch (error) {
console.error(`[ERROR] Error: ${error instanceof Error ? error.message : 'Invalid password'}`);
console.error(' Password must be at least 12 characters with uppercase, lowercase, and numbers');
console.error(' Use --no-validate to skip password strength check');
process.exit(1);
}
}
The documentation instructs users/agents to echo sensitive environment variables such as MEMBASE_SECRET_KEY and MEMBASE_BACKUP_PASSWORD directly to the terminal. This can disclose secrets into terminal scrollback, chat transcripts, recordings, logs, and agent outputs, making credential theft much easier.
The restore workflow describes restoring memory files into the agent workspace but does not warn that existing local memory files may be overwritten or replaced. In a memory-management skill, silent overwrite can cause integrity loss, accidental destruction of current state, or rollback to attacker-controlled or stale memory if a user restores the wrong backup.
The skill claims the backup password never leaves the local machine, but its own examples repeatedly pass the password as a command-line argument. Command-line arguments are commonly exposed to process listings, shell history, audit logs, and agent/tool telemetry, so this contradicts the security claim and can leak the decryption secret to other local users or logging systems.
The machine-readable JSON output serializes both status and the full config object, which can expose sensitive operational details such as the configured endpoint, workspace path, agent name, and potentially credential-related fields if present in config. Because this output is explicitly intended for agent parsing, it is more likely to be captured in logs, downstream tools, or other automation layers where sensitive configuration data may persist or be exfiltrated.
The code reads the secret credential from process.env.MEMBASE_SECRET_KEY, but there is no confirmation prompt, user-facing log, or inline warning indicating that sensitive environment data is being accessed. In this file, the surrounding comments describe configuration loading generally but do not disclose credential handling specifically.
No suspicious patterns detected.