Back to skill

Security audit

Webcam

Security checks for vulnerabilities and agentic risk

Overview

This webcam skill is mostly purpose-aligned, but it tells the agent to save camera API credentials from chat into a local config file without clear consent or protection.

Review before installing. Only use this skill if you are comfortable giving it access to private camera device data, snapshots, event history, and event images. Do not paste camera API keys into chat unless you accept that this skill instructs the agent to store them locally in openclaw.json; prefer a protected secret store or out-of-band credential setup with clear deletion and rotation procedures.

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

T09 · Insecure Skill Coding Practices

Warning
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: Medium

Vulnerable 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

  1. Store TIVS_API_KEY in the platform's encrypted secret manager or protected credential facility rather than directly in openclaw.json.
  2. Avoid requesting secrets through ordinary chat where conversation histories or logs may retain them. Use a dedicated secret-entry interface when available.
  3. Obtain explicit user consent before persisting any credential and clearly state its storage location, purpose, and retention period.
  4. 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.
  5. Ensure that credentials are redacted from Agent transcripts, command output, telemetry, crash reports, backups, and diagnostic bundles.
  6. Add credential deletion and rotation procedures, including immediate revocation guidance for suspected disclosure.
  7. Prevent configuration and secret files from being committed to source control through ignore rules and automated secret scanning.
  8. 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.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly directs the agent to persist user-provided credentials from the conversation into openclaw.json. This is dangerous because chat-provided secrets become durable local state, expanding exposure to other processes, future sessions, filesystem compromise, accidental commits, or backup leakage; with camera-service credentials, an attacker could access sensitive visual data and device information.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description focuses on querying bound devices, viewing current images, events, status, and battery. However, the documentation explicitly states the snapshot endpoint sends a screenshot command to the device and waits for upload, which is an active operation rather than a passive read; this goes beyond the primarily query-oriented behavior presented in the manifest.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill claims to return summarized data rather than raw responses, but separately instructs the agent to take highly sensitive credentials provided in chat and persist them to a local configuration file. That introduces a materially different and more sensitive behavior than the user-facing description suggests, increasing the risk of secret retention and later misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This skill handles highly privacy-sensitive household visual data, including images, events, and current snapshots, yet the overview lacks a prominent warning or consent-oriented notice. In a camera context, insufficient privacy disclosure increases the chance of unexpected exposure of intimate or security-relevant information.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The listed trigger examples include broad phrases like “今天发生了什么” and “设备在线吗”, which can easily occur in ordinary conversation and are not clearly scoped to this skill. The document also does not provide exclusion conditions or negative examples to distinguish when these phrases should invoke the webcam skill versus a general discussion.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Persisting conversation-supplied API credentials to a local file is not necessary for the core camera-query functionality and creates a durable secret footprint on disk. If the host, workspace, logs, backups, or other skills gain access to that file, the credentials could be reused to access private camera feeds, events, and images.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instructions tell the agent to store API credentials locally without warning the user that these are sensitive secrets that may persist beyond the session. In the context of a home camera skill, compromise of these credentials could expose live snapshots, event history, and device metadata.

Content

No source excerpt is available for this finding.