Back to skill

Security audit

TG Cam Test

Security checks for vulnerabilities and agentic risk

Overview

This camera skill does what it says, but it can expose private camera images and stores camera API credentials in a local config file without enough user-control guidance.

Review this before installing if the cameras cover homes, workplaces, or other private areas. Only provide credentials you are comfortable storing locally, restrict file access to the config, rotate the API key if exposed, and use explicit camera-specific requests when asking for snapshots or event images.

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

Camera API Credentials Persisted in Plaintext Configuration

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 41–53
Vulnerability Type: Plaintext storage of sensitive credentials
Risk Level: Medium

Vulnerable Code

markdown
### 授权配置

如果会话中收到 `TIVS_CLI_ID` 和 `TIVS_API_KEY`,请将其写入 `openclaw.json`:

```json
{
  "skills": {
    "entries": {
      "tg-cam-api-test": {
        "env": {
          "TIVS_CLI_ID": "{TIVS_CLI_ID}",
          "TIVS_API_KEY": "{TIVS_API_KEY}"
        }
      }
    }
  }
}
text

### Technical Analysis

The Skill instructs the Agent to take camera-service credentials received through a conversation and persist them directly in `openclaw.json`. The API key is therefore stored as plaintext in a general configuration file rather than through an operating-system credential vault, dedicated secret manager, or runtime-only secret-injection mechanism.

Although the Skill separately prohibits displaying the key in chat, that restriction does not protect the persisted copy. No requirements are provided for restrictive file permissions, encryption at rest, exclusion from version control and backups, credential retention, secure deletion, or key rotation.

Exploitation requires an attacker or process to gain read access to the resulting configuration file or a copy of it. The documentation does not establish that the file is publicly accessible, so this is not independently a remote compromise. Nevertheless, plaintext persistence increases the consequences of local compromise, overly broad filesystem permissions, diagnostic collection, backups, or accidental repository commits.

### Attack Path

1. A user supplies `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 or one of its copies becomes readable through local access, permissive filesystem permissions, backup extraction, support bundles, or an accidenta
...[truncated 1098 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not write TIVS_API_KEY directly into openclaw.json.
  2. Store the API key in an operating-system-backed credential vault or a dedicated secret-management service, and retain only a non-sensitive reference in configuration.
  3. Prefer runtime-only environment injection where persistent storage is unnecessary.
  4. If file-based storage is unavoidable:
    • Obtain explicit user consent before persistence.
    • Store secrets in a separate credentials file rather than a general configuration file.
    • Enforce owner-only read and write permissions.
    • Exclude the file from version control, backups, logs, diagnostics, and support bundles where possible.
    • Avoid printing secret-bearing configuration during debugging or error reporting.
    • Encrypt the credentials at rest using keys protected separately from the file.
  5. Define credential retention and secure-deletion procedures.
  6. Provide a mechanism to revoke and rotate credentials immediately after suspected exposure.
  7. Use narrowly scoped, short-lived credentials if the API supports them.
  8. Preserve the existing instruction not to echo the API key in chat, but treat it as an additional control rather than a substitute for secure storage.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description and usage guidance emphasize retrieving snapshots and event images but do not warn that these actions access sensitive user data, potentially including images of people, homes, schedules, or other private activity. For a surveillance/camera integration, the absence of privacy notice and consent-oriented safeguards increases the chance of users unknowingly exposing sensitive visual data or the agent over-serving such content in ambiguous contexts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes broad natural-language triggers such as generic requests to 'see what happened today' or 'check current picture', which can plausibly match routine conversation and invoke camera/event retrieval without sufficiently explicit user intent. In a camera skill, accidental activation is privacy-sensitive because it can expose live snapshots, event history, or images from inside a home or other monitored space.

Content

No source excerpt is available for this finding.