Back to skill

Security audit

Tuya Smart

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Tuya Smart API helper that discloses its credential, cloud API, local note, and device-control behavior.

Install only if you intend to let an agent help with Tuya cloud operations. Keep Tuya credentials in local environment variables, review any proposed device write or automation plan before approval, and treat ~/tuya as a local operational notebook that may contain device IDs, endpoint choices, and automation constraints.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

Memory Manipulation

High
Category
Memory Poisoning
Confidence
90% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · orchestration-playbooks.md (reported line 20)May include surrounding context.

md
- Define desired end state per device.
- Sort execution order by dependency.
- Write idempotent steps so re-run does not corrupt state.
- After each phase, verify aggregate state before next phase.

## Playbook 3: Incident Containment

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 49)May include surrounding context.

md
## Symptom: Authentication Fails Immediately

Checks:
- Confirm Access ID and Access Secret are from the active project.
- Confirm endpoint region matches project data center.
- Confirm request timestamp is current.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · auth-signing.md (reported line 8)May include surrounding context.

md
## Symptom: Authentication Fails Immediately

Checks:
- Confirm Access ID and Access Secret are from the active project.
- Confirm endpoint region matches project data center.
- Confirm request timestamp is current.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · setup.md (reported line 57)May include surrounding context.

md
## Symptom: Authentication Fails Immediately

Checks:
- Confirm Access ID and Access Secret are from the active project.
- Confirm endpoint region matches project data center.
- Confirm request timestamp is current.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · troubleshooting.md (reported line 8)May include surrounding context.

md
## Symptom: Authentication Fails Immediately

Checks:
- Confirm Access ID and Access Secret are from the active project.
- Confirm endpoint region matches project data center.
- Confirm request timestamp is current.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 55)May include surrounding context.

md
- Device permissions enabled in the project (Cloud Authorization and required API groups)
- For account-based device binding: configured user permission package and app account flow

Never ask users to paste production secrets into chat logs. Prefer local environment variables and redacted examples.

## Data Storage

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 103)May include surrounding context.

md
## Common Traps

- Choosing the wrong regional endpoint -> valid credentials fail and device lookup appears empty.
- Sending commands without checking function schema -> invalid `code/value` pairs and rejected writes.
- Mixing app-account and cloud-account assumptions -> users appear linked but device control fails.
- Retrying signed requests with stale timestamps/nonces -> repeated signature errors.
- Running bulk commands without staged verification -> large-scale bad state transitions.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · setup.md (reported line 34)May include surrounding context.

bash
mkdir -p ~/tuya
touch ~/tuya/{memory.md,environments.md,devices.md,automations.md,incidents.md}
chmod 700 ~/tuya
chmod 600 ~/tuya/{memory.md,environments.md,devices.md,automations.md,incidents.md}

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · setup.md (reported line 35)May include surrounding context.

mkdir -p ~/tuya touch ~/tuya/{memory.md,environments.md,devices.md,automations.md,incidents.md} chmod 700 ~/tuya chmod 600 ~/tuya/{memory.md,environments.md,devices.md,automations.md,incidents.md}

text

5. If `memory.md` is empty, initialize it from `memory-template.md`.