Back to skill

Security audit

Bardi Smart Home - Tuya Devices Compatible

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but it gives an agent broad smart-home control and raw device-command ability while recommending persistent plaintext credential setup.

Install only if you are comfortable giving this skill cloud access to enumerate and control Tuya-linked devices. Use a dedicated least-privilege Tuya project, avoid placing secrets in global shell startup files, prefer a vault or per-process environment file with restricted permissions, and be especially careful with raw/batch DP commands because they can change real device state.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SETUP.md:3
Finding

Unpinned Third-Party Dependency with Access to Cloud Credentials

Content
View full analysis
Remediation
View remediation
``` 2. Generate and enforce cryptographic hashes: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Use a lockfile that captures transitive dependencies so indirect package changes are also controlled. 4. Install only from the official Python Package Index or a controlled internal package mirror. 5. Review dependency release notes and security advisories before updating the pinned version. 6. Run the controller in an isolated virtual environment under a dedicated, unprivileged account. 7. Scope the Tuya cloud project to only the APIs and devices required by this Skill. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SETUP.md:18
Finding

Long-Lived Tuya Secret Stored in Plaintext Shell Startup Files

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

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 32)May include surrounding context.

md
},
            "TUYA_ACCESS_SECRET":
              {
                "label": "Tuya Access Secret",
                "description": "Cloud project Access Secret from Tuya IoT Platform (iot.tuya.com)",
                "placeholder": "your-access-secret",
                "required": true

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 39)May include surrounding context.

md
},
            "TUYA_ACCESS_SECRET":
              {
                "label": "Tuya Access Secret",
                "description": "Cloud project Access Secret from Tuya IoT Platform (iot.tuya.com)",
                "placeholder": "your-access-secret",
                "required": true

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 24)May include surrounding context.

md
},
            "TUYA_ACCESS_SECRET":
              {
                "label": "Tuya Access Secret",
                "description": "Cloud project Access Secret from Tuya IoT Platform (iot.tuya.com)",
                "placeholder": "your-access-secret",
                "required": true

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 25)May include surrounding context.

md
},
            "TUYA_ACCESS_SECRET":
              {
                "label": "Tuya Access Secret",
                "description": "Cloud project Access Secret from Tuya IoT Platform (iot.tuya.com)",
                "placeholder": "your-access-secret",
                "required": true

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 50)May include surrounding context.

md
},
            "TUYA_ACCESS_SECRET":
              {
                "label": "Tuya Access Secret",
                "description": "Cloud project Access Secret from Tuya IoT Platform (iot.tuya.com)",
                "placeholder": "your-access-secret",
                "required": true

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 · references/api-reference.md (reported line 9)May include surrounding context.

md
Environment variables:
- `TUYA_ACCESS_ID` — Cloud project access ID
- `TUYA_ACCESS_SECRET` — Cloud project access secret
- `TUYA_API_REGION` — Data center region (sg, cn, us, eu, in)

## API Response Format

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 · scripts/devices_control.py (reported line 13)May include surrounding context.

python
Environment variables:
- `TUYA_ACCESS_ID` — Cloud project access ID
- `TUYA_ACCESS_SECRET` — Cloud project access secret
- `TUYA_API_REGION` — Data center region (sg, cn, us, eu, in)

## API Response Format

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares required environment-variable access but does not define an explicit tool/permission scope. That creates unclear security boundaries for secret access and makes it harder for users or the platform to understand what privileged capabilities the skill needs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill advertises local network scanning without a clear user-facing warning that it will discover devices on the user's network. Network discovery can reveal internal device inventory and topology information, so omitting disclosure undermines informed consent and can surprise users in sensitive environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This script issues real-world device actions immediately based solely on CLI arguments, including turning devices on/off and sending arbitrary DP commands, with no confirmation, dry-run mode, authorization gate, or safety interlock. In the context of a smart-home control skill, that means an accidental invocation, prompt-injection-driven invocation by an upstream agent, or misuse of the raw/batch commands can directly change physical device state.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.