Back to skill

Security audit

Trio Vision

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent camera-monitoring purpose, but it under-discloses sensitive live-video processing and uses unsafe shell command templates for user-provided stream data.

Install only if you are comfortable sending selected live camera streams, frames, summaries, and webhook notifications to Trio/MachineFi and any configured webhook destination. Use only feeds you are authorized to monitor, avoid sensitive indoor or regulated environments unless you have consent, store the API key in a secret manager rather than a shell profile, and prefer a structured HTTP client or JSON-safe command construction instead of pasting untrusted values into the provided curl snippets.

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:34
Finding
Shell Command Injection Through Unescaped User-Controlled JSON Values<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:34-40`, `SKILL.md:63-72`, and `SKILL.md:95-102` **Vulnerability Type**: User-controlled values interpolated into shell command templates **Risk Level**: High ### Vulnerable Code ```bash curl -s -X POST "https://trio.machinefi.com/api/check-once" \ -H "Authorization: Bearer $TRIO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "stream_url": "STREAM_URL_HERE", "condition": "NATURAL_LANGUAGE_CONDITION_HERE" }' | python3 -m json.tool ``` The same unsafe construction pattern is used for continuous monitoring: ```bash curl -s -X POST "https://trio.machinefi.com/api/live-monitor" \ -H "Authorization: Bearer $TRIO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "stream_url": "STREAM_URL_HERE", "condition": "NATURAL_LANGUAGE_CONDITION_HERE", "interval_seconds": 10, "monitor_duration_seconds": 600, "max_triggers": 1 }' | python3 -m json.tool ``` It also appears in the digest workflow: ```bash curl -s -X POST "https://trio.machinefi.com/api/live-digest" \ -H "Authorization: Bearer $TRIO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "stream_url": "STREAM_URL_HERE", "window_minutes": 10, "capture_interval_seconds": 60 }' | python3 -m json.tool ``` ### Technical Analysis The Skill instructs an agent to execute shell commands and replace `STREAM_URL_HERE` and `NATURAL_LANGUAGE_CONDITION_HERE` with values supplied through conversation. Those values are placed inside a single-quoted shell argument rather than being serialized by a JSON library. A single quote in an attacker-controlled value can terminate the shell quoting context. Additional shell syntax can then be appended and interpreted as a local command. JSON escaping alone would not prevent this issue because shell parsing occurs before the request is sent. This behavior is not necessary for the declared functionality. Sending a URL and condition to the Trio API i ...[truncated 1854 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not interpolate user-controlled values into shell command text. 2. Prefer a structured JavaScript or Python HTTP client that accepts the stream URL and condition as data values and serializes the JSON body internally. 3. If curl must be retained, construct the body with a JSON-aware tool and pass it as a file: ```bash payload_file="$(mktemp)" trap 'rm -f "$payload_file"' EXIT jq -n \ --arg stream_url "$STREAM_URL" \ --arg condition "$CONDITION" \ '{ stream_url: $stream_url, condition: $condition }' > "$payload_file" curl --fail-with-body --silent --show-error \ -X POST "https://trio.machinefi.com/api/check-once" \ -H "Authorization: Bearer $TRIO_API_KEY" \ -H "Content-Type: application/json" \ --data-binary "@$payload_file" ``` 4. Pass values through environment variables or fixed argument arrays rather than generating a shell program dynamically. 5. Validate stream URLs against explicitly supported schemes. Reject shell metacharacters only as defense in depth; validation must not replace correct argument handling. 6. Apply the same correction to the check-once, live-monitor, and live-digest examples. 7. Run the agent with a restricted operating-system account, a minimal environment, limited filesystem access, and constrained outbound network access to reduce impact if another injection flaw is introduced. 8. Add automated tests using quotes, newlines, command substitutions, semicolons, and other shell metacharacters to verify that inputs remain data rather than executable syntax. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
IMPLEMENTATION_GUIDE.md:41
Finding
Long-Lived API Key Stored in a Plaintext Shell Startup File<![CDATA[ ## Vulnerability Details **File Location**: `IMPLEMENTATION_GUIDE.md:41-47` **Vulnerability Type**: Plaintext persistence of a sensitive API credential **Risk Level**: Medium ### Vulnerable Code ```bash export TRIO_API_KEY="your_api_key_here" ``` The guide then recommends persisting the credential in a shell profile: ```bash echo 'export TRIO_API_KEY="your_api_key_here"' >> ~/.zshrc source ~/.zshrc ``` ### Technical Analysis The implementation guide recommends writing a long-lived Trio API key directly into `~/.zshrc`. Shell startup files are plaintext and are commonly copied into backups, diagnostic archives, dotfile repositories, and workstation migration bundles. They may also be readable by local software operating under the same user account. Sourcing the file exports the key into the environment of the current shell. Subsequent child processes inherit that environment unless it is explicitly removed. This broadens credential exposure beyond the Skill process and violates least-privilege secret handling. Some systems protect home-directory files from other operating-system users, so exposure is environment-dependent. Nevertheless, plaintext profile persistence is unnecessary because the implementation guide itself identifies OpenClaw configuration as an alternative credential-storage mechanism. ### Attack Path 1. A user follows the implementation guide and places the real API key in `~/.zshrc`. 2. The credential remains stored in plaintext across sessions. 3. The profile is read by a same-user process, copied into a dotfile repository, included in a backup or support archive, or otherwise disclosed. 4. An attacker extracts the API key from the exposed file. 5. The attacker authenticates to the Trio API using the stolen bearer credential. 6. The attacker can consume the victim's API credits and perform operations permitted to that key until it is revoked or rotated. ### Impact Assessment The immediate impact is compromise of the Trio AP ...[truncated 580 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the recommendation to append the API key directly to `~/.zshrc`, `~/.bashrc`, or another plaintext startup file. 2. Store the key in OpenClaw's supported secret-management facility, an operating-system keychain, or a dedicated secrets manager. 3. Expose the key only to the Trio Skill process rather than exporting it globally to every child process launched from the user's shell. 4. If a file-backed secret is unavoidable: - Store it in a dedicated file outside source repositories. - Restrict permissions to the owning user, such as mode `0600`. - Ensure backup, diagnostics, and dotfile tools exclude it. - Load it only for the process that needs it. 5. Document key revocation and rotation procedures. 6. Warn users never to commit real credentials to Git or paste them into chat transcripts, logs, screenshots, or support reports. 7. Redact authorization headers and environment values from all diagnostic output. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (26)

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
|-------|-----|
| Agent doesn't validate stream first | Add stronger "ALWAYS validate first" language in Rules section |
| Agent forgets to show explanation | Emphasize in Rules: "ALWAYS show the explanation field" |
| Agent starts monitor without warning about cost | Add cost disclosure to the monitor workflow |
| Condition writing is poor | The "Condition Writing Tips" section helps the agent write better conditions |
| Error messages are confusing | The `remediation` field from the API gives actionable guidance |
Confidence
80% confidence
Finding
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

External Script Fetching

High
Category
Supply Chain
Content
Ask a yes/no question about what's currently visible on a stream. Costs 1 credit ($0.01).

```bash
curl -s -X POST "https://trio.machinefi.com/api/check-once" \
  -H "Authorization: Bearer $TRIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
Monitor a stream continuously and get alerted when a condition becomes true. Costs 2 credits/min ($0.02/min).

```bash
curl -s -X POST "https://trio.machinefi.com/api/live-monitor" \
  -H "Authorization: Bearer $TRIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
Get narrative summaries of what's happening on a stream at regular intervals. Costs 2 credits/min ($0.02/min).

```bash
curl -s -X POST "https://trio.machinefi.com/api/live-digest" \
  -H "Authorization: Bearer $TRIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
### 4. Check Job Status

```bash
curl -s "https://trio.machinefi.com/api/jobs/JOB_ID_HERE" \
  -H "Authorization: Bearer $TRIO_API_KEY" | python3 -m json.tool
```
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
### 5. List All Jobs

```bash
curl -s "https://trio.machinefi.com/api/jobs?limit=20&offset=0" \
  -H "Authorization: Bearer $TRIO_API_KEY" | python3 -m json.tool
```
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
### 6. Cancel a Job

```bash
curl -s -X DELETE "https://trio.machinefi.com/api/jobs/JOB_ID_HERE" \
  -H "Authorization: Bearer $TRIO_API_KEY" | python3 -m json.tool
```
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- `NOT_LIVESTREAM` — URL is not a live stream. Confirm it's actively broadcasting.
- `STREAM_FETCH_FAILED` — Cannot reach the stream. Check URL and network.
- `STREAM_OFFLINE` — Stream exists but is offline. Wait for it to go live.
- `MAX_JOBS_REACHED` — Too many concurrent jobs. Cancel old ones with DELETE /jobs/{id}.

If you get an error, always show the `remediation` field to the user — it contains actionable guidance.
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The document explicitly states that frames are sent to Trio's servers and then to a vision model, but the recommended public description omits this privacy-critical disclosure. For a skill handling live security cameras, baby monitors, home interiors, and workplace streams, failing to warn users about cloud transmission can lead to uninformed consent, exposure of sensitive footage, and regulatory or policy issues around third-party data processing.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The recommended description uses broad, natural-language phrasing like 'turn any live camera into a smart camera' and 'ask questions about any live stream,' which can cause an agent framework to invoke the skill for vague everyday requests without clear scope boundaries. In a camera-monitoring skill, over-broad activation increases the chance of unintended access to surveillance feeds or accidental processing of sensitive visual data when the user did not explicitly intend to use this capability.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The document promotes analysis of live video streams, security cameras, and monitoring workflows without an explicit privacy, consent, and lawful-use warning. In this context, the omission increases the risk of the skill being used to surveil people or process camera feeds without adequate notice, authorization, or user understanding.

Session Persistence

Medium
Category
Rogue Agent
Content
1. Go to https://console.machinefi.com
2. Sign up (free, gives you 100 credits / $1.00)
3. Navigate to the API Keys section
4. Create and copy your API key

### 2b. Set the Environment Variable
Confidence
90% confidence
Finding
The guide instructs users to persist the API key in shell startup files such as ~/.zshrc. Persisting secrets in broadly reused shell profiles increases the chance of accidental disclosure through dotfile sync, backups, screenshots, support bundles, or later shell-command leakage from other tools.

Skill Enumeration

Medium
Category
Agent Snooping
Content
```bash
# Option 1: User-level skills directory
mkdir -p ~/.openclaw/skills/trio-vision
cp trio-vision-skill/SKILL.md ~/.openclaw/skills/trio-vision/SKILL.md

# Option 2: Project-level skills directory (higher precedence)
mkdir -p ./skills/trio-vision
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
```bash
# Option 1: User-level skills directory
mkdir -p ~/.openclaw/skills/trio-vision
cp trio-vision-skill/SKILL.md ~/.openclaw/skills/trio-vision/SKILL.md

# Option 2: Project-level skills directory (higher precedence)
mkdir -p ./skills/trio-vision
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
```bash
# Option 1: User-level skills directory
mkdir -p ~/.openclaw/skills/trio-vision
cp trio-vision-skill/SKILL.md ~/.openclaw/skills/trio-vision/SKILL.md

# Option 2: Project-level skills directory (higher precedence)
mkdir -p ./skills/trio-vision
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
```bash
# Option 1: User-level skills directory
mkdir -p ~/.openclaw/skills/trio-vision
cp trio-vision-skill/SKILL.md ~/.openclaw/skills/trio-vision/SKILL.md

# Option 2: Project-level skills directory (higher precedence)
mkdir -p ./skills/trio-vision
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The guide recommends very broad natural-language invocation examples like asking generally 'What's happening on this YouTube live stream?'. In agent systems, overly broad trigger phrasing can cause accidental invocation during ordinary conversation, which may lead to unintended external API calls, stream analysis, and surprise cost or privacy impact.

Session Persistence

Medium
Category
Rogue Agent
Content
### 6a. GitHub Repository

Create a public GitHub repo for the skill:

```bash
cd trio-vision-skill
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Vague Triggers

Medium
Confidence
85% confidence
Finding
The README says users can 'Ask your cameras questions in plain English' but does not define specific trigger phrases, scope limits, or exclusion conditions. This creates ambiguity about when the skill should activate versus when a general conversational request about cameras should not invoke it.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README promotes continuous monitoring of live cameras and delivery of alerts to chat platforms, but does not warn users that video frames and metadata may be transmitted to a third-party API and messaging services. In a surveillance-oriented skill, missing privacy and data-handling disclosures materially increase the risk of accidental exposure of sensitive household, workplace, or bystander information.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill repeatedly instructs users to send live camera streams, security camera feeds, and RTSP sources to a third-party API, but it does not clearly warn that potentially sensitive visual data will leave the local environment and be processed externally. In a surveillance-oriented skill, omission of explicit privacy and consent guidance increases the risk of exposing private spaces, bystanders, or regulated data without informed approval.

External Transmission

Medium
Category
Data Exfiltration
Content
Ask a yes/no question about what's currently visible on a stream. Costs 1 credit ($0.01).

```bash
curl -s -X POST "https://trio.machinefi.com/api/check-once" \
  -H "Authorization: Bearer $TRIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
93% confidence
Finding
This endpoint use transmits a user-provided stream URL and condition to an external third-party service for analysis. While expected for the product's function, it is still a genuine external data transfer that can expose private camera content if users are not adequately informed or if the stream contains sensitive scenes.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill offers include_frame/base64 image return options without warning that captured frames may contain sensitive visual information such as faces, interiors, documents, or screens. Returning image data to chat logs, clients, or downstream tooling increases the chance of accidental retention and secondary disclosure.

External Transmission

Medium
Category
Data Exfiltration
Content
Monitor a stream continuously and get alerted when a condition becomes true. Costs 2 credits/min ($0.02/min).

```bash
curl -s -X POST "https://trio.machinefi.com/api/live-monitor" \
  -H "Authorization: Bearer $TRIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
95% confidence
Finding
Continuous monitoring sends recurring stream data to the external API over time, increasing both the amount and sensitivity of transmitted content compared with a one-time snapshot. Persistent third-party access to live feeds amplifies privacy risk, especially for home or workplace cameras.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The webhook feature documents automatic POST delivery to an arbitrary user-supplied endpoint but does not warn that trigger events, summaries, or related metadata may be forwarded outside the original system boundary. This can lead to unintended disclosure if the webhook target is misconfigured, third-party hosted, or controlled by an attacker.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
IMPLEMENTATION_GUIDE.md:324