Back to skill

Security audit

TG Cam Claw

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent camera integration, but it asks agents to persist camera API credentials in a local config file and handles sensitive camera images with limited privacy and URL-safety guidance.

Install only if you trust the camera service and are comfortable giving the skill ongoing access to camera devices, event history, and snapshots. Treat the API key like a password: avoid pasting it into normal chat if possible, store it only in a protected secret mechanism, rotate it if it may have been written to a plain config file, and confirm before requesting images that may show other people or private spaces.

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

T09 · Insecure Skill Coding Practices

Error
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: High

Vulnerable 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

  1. Store TIVS_API_KEY in the platform's protected credential manager or operating-system secret store rather than directly in openclaw.json.
  2. Reference the secret by an opaque identifier or protected environment injection mechanism; do not serialize its value into ordinary configuration.
  3. Avoid requesting secrets through normal conversation text. Use a dedicated masked credential-entry workflow where available.
  4. Require explicit user consent before any credential is persisted.
  5. If file-based storage is unavoidable, use encryption at rest with keys held separately and restrict permissions to the owning account, such as mode 0600 on supported systems.
  6. Ensure configuration files containing secrets are excluded from source control, cloud synchronization, support bundles, logs, telemetry, and unencrypted backups.
  7. Redact both the API key and associated client identifier from command output, errors, traces, and audit logs.
  8. Document credential rotation and revocation procedures, and rotate credentials that may already have been written insecurely.
  9. Minimize credential scope and lifetime so that a leaked key cannot access more devices or functions than necessary.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:76
Finding

Unvalidated remote image URLs can create an SSRF-style request primitive

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 76-78
Vulnerability Type: Unrestricted server-side URL retrieval
Risk Level: Medium

Vulnerable Code

The following is an English rendering of the image-handling instructions:

markdown
### Image handling

- Image URLs may contain signed parameters; when access is required, the complete URL must be used without truncation.
- Do not send the raw image URL to the user by default; retrieve the image content first and then display it.

Technical Analysis

The skill directs the agent to retrieve image content from a complete URL returned by the remote API. It does not require validation of the URL scheme, hostname, resolved address, port, redirect destination, content type, or response size.

Consequently, a malicious or compromised API response could provide an imageUrl targeting an unintended destination. If the agent's image-fetching facility has access to localhost, private networks, link-local services, or cloud metadata endpoints, fetching that value would create an SSRF-style request primitive.

Signed query parameters do not establish that the destination is safe. Validation must apply to both the initial URL and every redirect after DNS resolution. This finding depends on an attacker gaining influence over an API response or image URL; the audited file does not itself prove that the legitimate API currently returns malicious URLs.

Attack Path

  1. An attacker compromises, spoofs, or otherwise gains control over an API response containing data.imageUrl.
  2. The attacker supplies a URL targeting an internal service, localhost endpoint, cloud metadata address, or attacker-controlled host.
  3. The agent follows the skill instruction to retrieve the complete URL before displaying the image.
  4. The fetching component sends a request using the agent runtime's network position.
  5. If private destinations are reachable, the request may in ...[truncated 1009 chars]
Remediation
View remediation

Remediation Suggestions

  1. Allow image retrieval only from explicitly approved HTTPS hostnames controlled by the camera service or its designated media provider.
  2. Reject non-HTTPS schemes, embedded user information, IP-address literals, unusual ports, malformed hostnames, and URLs exceeding reasonable length limits.
  3. Resolve the hostname before connecting and reject loopback, private, link-local, multicast, reserved, and cloud-metadata address ranges for both IPv4 and IPv6.
  4. Revalidate the resolved destination immediately before connection to reduce DNS rebinding risk.
  5. Disable redirects where practical. Otherwise, validate every redirect target using the same scheme, host, port, DNS, and address checks.
  6. Do not forward API authentication headers, cookies, or other sensitive request metadata to image hosts.
  7. Enforce strict response-size, timeout, and redirect-count limits.
  8. Accept only expected image content types and verify file signatures rather than trusting the server-provided Content-Type.
  9. Fetch images through a sandboxed media proxy with no access to localhost, private networks, or cloud metadata services.
  10. Treat API-provided URLs as untrusted data even when the API request itself was authenticated.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill is presented largely as a query/read-oriented camera integration, but it explicitly includes a snapshot action that sends a command to the device to capture a new image. That is a state-changing, privacy-impacting operation, and users or downstream agents may underestimate its sensitivity if it is framed as simple viewing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill enables viewing current images, event histories, and event pictures from cameras, yet the introductory text does not warn about privacy implications for occupants, visitors, or bystanders. This increases the risk that operators treat surveillance outputs as ordinary content and disclose or request them without adequate care.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The listed trigger phrases are broad everyday expressions such as asking what happened today or to look at a camera view, which can cause accidental invocation in adjacent contexts. Because this skill accesses surveillance devices and images, false activations can expose sensitive visual data or trigger unwanted screenshots.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs the agent to take credentials provided in chat and write them into a local configuration file, creating a durable secret at rest from conversational input. Without clear warnings, storage constraints, or secure-handling guidance, this can lead to credential persistence, accidental leakage, and unauthorized reuse of camera API access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

L003 的技能说明完全以中文给出,且文档整体默认中文交互,没有说明是否支持其他语言或允许用户选择语言。这可能构成语言/locale 强制约束,但未见用户 opt-in 或区域性合理说明。

Content

No source excerpt is available for this finding.