T09 · Insecure Skill Coding Practices
- Location
SKILL.md:41- Finding
Plaintext Persistence of Webcam API Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 41–53
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: MediumVulnerable Code
markdown ### 授权配置 如果会话中收到 `TIVS_CLI_ID` 和 `TIVS_API_KEY`,请将其写入 `openclaw.json`: ```json { "skills": { "entries": { "webcam": { "env": { "TIVS_CLI_ID": "{TIVS_CLI_ID}", "TIVS_API_KEY": "{TIVS_API_KEY}" } } } } }text ### Technical Analysis The Skill directs the Agent to take `TIVS_CLI_ID` and `TIVS_API_KEY` values received through a conversation and persist them directly in `openclaw.json`. The documented process does not require explicit user consent before persistence and does not specify encrypted secret storage, restrictive file permissions, log redaction, credential lifetime, deletion, or rotation controls. Although a separate instruction prohibits echoing the API key in chat, that control does not protect the plaintext copy stored in the configuration file. Any local principal or process that can read the file—and any backup, diagnostic archive, or repository that inadvertently captures it—may recover the credential. ### Attack Path 1. A user provides `TIVS_CLI_ID` and `TIVS_API_KEY` during a conversation. 2. Following the Skill instructions, the Agent writes both values into `openclaw.json`. 3. The configuration file is exposed to another local user or process, included in a backup or diagnostic archive, or accidentally committed to source control. 4. An attacker extracts the API key from the plaintext JSON. 5. The attacker submits authenticated requests to the configured webcam service. 6. Subject to the credential's server-side authorization scope, the attacker accesses camera device information, online or battery status, snapshots, event metadata, or event images. ### Impact Assessment Successful exploitation exposes the privileges assigned to the compromised webcam API credential; it does not inherently ...[truncated 546 chars]- Remediation
View remediation
Remediation Suggestions
- Store
TIVS_API_KEYin the platform's encrypted secret manager or protected credential facility rather than directly inopenclaw.json. - Avoid requesting secrets through ordinary chat where conversation histories or logs may retain them. Use a dedicated secret-entry interface when available.
- Obtain explicit user consent before persisting any credential and clearly state its storage location, purpose, and retention period.
- If file-backed storage is unavoidable, keep only a secret reference in
openclaw.json, store the actual value separately, and apply owner-only filesystem permissions. - Ensure that credentials are redacted from Agent transcripts, command output, telemetry, crash reports, backups, and diagnostic bundles.
- Add credential deletion and rotation procedures, including immediate revocation guidance for suspected disclosure.
- Prevent configuration and secret files from being committed to source control through ignore rules and automated secret scanning.
- Apply least privilege and expiration to issued API keys so a compromised credential can access only the required cameras and operations for the shortest practical period.
- Store
