T09 · Insecure Skill Coding Practices
- Location
SKILL.md:41- Finding
Camera API credentials are persisted in plaintext configuration
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 41-52
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: HighVulnerable Code
The following is an English rendering of the instruction and configuration block:
markdown If `TIVS_CLI_ID` and `TIVS_API_KEY` are received during the session, write them to `openclaw.json`: ```json { "skills": { "entries": { "tg-cam-claw": { "env": { "TIVS_CLI_ID": "{TIVS_CLI_ID}", "TIVS_API_KEY": "{TIVS_API_KEY}" } } } } }text ### Technical Analysis The skill explicitly directs the agent to copy credentials received through a conversation into `openclaw.json`. This stores the camera API key as plaintext in a persistent configuration file. No requirement is provided to use a protected secret store, obtain explicit approval before persistence, enforce restrictive file permissions, exclude the file from source control and backups, or remove the secret after use. Although the document separately says not to echo the API key in chat, that does not protect the key once it has been written to disk. This is an insecure secret-management practice. Any principal capable of reading the configuration file—including another local user under weak permissions, malware, backup operators, diagnostic tooling, or a recipient of an accidentally committed configuration—could recover the credential. ### Attack Path 1. A user supplies `TIVS_CLI_ID` and `TIVS_API_KEY` during a conversation. 2. Following the skill instruction, the agent writes both values to `openclaw.json`. 3. The file remains on disk after the immediate operation or session. 4. An attacker obtains read access through local compromise, overly broad file permissions, backups, support bundles, synchronization, or accidental source-control inclusion. 5. The attacker extracts the client ID and API key. 6. The at ...[truncated 997 chars]- Remediation
View remediation
Remediation Suggestions
- Store
TIVS_API_KEYin the platform's protected credential manager or operating-system secret store rather than directly inopenclaw.json. - Reference the secret by an opaque identifier or protected environment injection mechanism; do not serialize its value into ordinary configuration.
- Avoid requesting secrets through normal conversation text. Use a dedicated masked credential-entry workflow where available.
- Require explicit user consent before any credential is persisted.
- If file-based storage is unavoidable, use encryption at rest with keys held separately and restrict permissions to the owning account, such as mode
0600on supported systems. - Ensure configuration files containing secrets are excluded from source control, cloud synchronization, support bundles, logs, telemetry, and unencrypted backups.
- Redact both the API key and associated client identifier from command output, errors, traces, and audit logs.
- Document credential rotation and revocation procedures, and rotate credentials that may already have been written insecurely.
- Minimize credential scope and lifetime so that a leaked key cannot access more devices or functions than necessary.
- Store
