T09 · Insecure Skill Coding Practices
- Location
SKILL.md:209- Finding
Plaintext Storage of ClickHouse Database Passwords
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 209–218
Vulnerability Type: Plaintext credential storage
Risk Level: MediumVulnerable Code:
markdown **Data saved locally (with user consent):** - Connection profiles (host, port, database) in ~/clickhouse/memory.md - Query patterns and schema documentation - Authentication method preferences (password vs certificate) **Important:** If you provide database passwords, they are stored in plain text in ~/clickhouse/. Consider using environment variables or connection profiles managed by clickhouse-client instead.Technical Analysis
The Skill explicitly states that database passwords supplied by users are stored in plaintext under
~/clickhouse/. Plaintext credential persistence lacks confidentiality protection and can expose database credentials to any actor or process able to read the relevant files.This instruction also conflicts with
memory-template.md, which states that passwords must never be stored in the memory file. The inconsistent guidance may cause an Agent to follow the less secure behavior inSKILL.md. No requirement is provided for restrictive directory or file permissions.Attack Path
- A user supplies a ClickHouse password while configuring a connection.
- The Agent follows the documented behavior and writes the password beneath
~/clickhouse/. - The file is exposed through permissive filesystem permissions, local malware, backup software, synchronization tools, or accidental archive or repository inclusion.
- An attacker or unauthorized local process reads the plaintext credential.
- The attacker uses the credential to authenticate to the configured ClickHouse instance.
Impact Assessment
Successful exploitation exposes the privileges granted to the compromised ClickHouse account. Depending on that account's permissions, an attacker could read analytical data, modify or delete tables, submit ...[truncated 275 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove all instructions permitting database passwords to be stored in
~/clickhouse/. - Make
SKILL.mdconsistent withmemory-template.mdby explicitly prohibiting secret persistence in memory files. - Store only the name of an environment variable, secret-manager reference, or named
clickhouse-clientprofile. - If persistent secret storage is essential, use an operating-system keychain or dedicated secret manager rather than a Markdown file.
- Require directory permissions of
0700for~/clickhouse/and file permissions of0600for non-secret connection metadata. - Add validation instructing the Agent to redact passwords from generated files, logs, responses, and saved command examples.
- Recommend a dedicated, least-privileged ClickHouse account and credential rotation if plaintext storage has already occurred.
- Remove all instructions permitting database passwords to be stored in
