Back to skill

Security audit

ThingsBot

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a straightforward ThingsBoard API helper, but it ships default credentials and documents high-impact operations without enough safeguards.

Review this skill before installing. Use it only against a ThingsBoard server you control, replace the bundled credentials with unique least-privilege credentials, avoid committing credentials.json, use HTTPS for any non-local server, and require explicit confirmation before deleting telemetry or making dashboards public.

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

Error
Location
credentials.json:1
Finding
Plaintext Default Administrative Credentials and Insecure Authentication Transport<![CDATA[ ## Vulnerability Details **File Location**: `credentials.json:1-20`; related insecure setup instructions in `SKILL.md:13-46` and `SKILL.md:231-245` **Vulnerability Type**: Hardcoded weak credentials and plaintext transmission of authentication secrets **Risk Level**: High ### Vulnerable Code `credentials.json:1-20`: ```json [ { "name": "Server Thingsboard", "url": "http://localhost:8080", "account": [ { "sysadmin": { "email": "sysadmin@thingsboard.org", "password": "sysadmin" } }, { "tenant": { "email": "tenant@thingsboard.org", "password": "tenant" } } ] } ] ``` Related instructions in `SKILL.md:13-46`: ```markdown 1. Configure your ThingsBoard server in `credentials.json`: ```json [ { "name": "Server Thingsboard", "url": "http://localhost:8080", "account": [ { "sysadmin": { "email": "sysadmin@thingsboard.org", "password": "sysadmin" } }, { "tenant": { "email": "tenant@thingsboard.org", "password": "tenant" } } ] } ] ``` 2. Set environment variables: ```bash export TB_URL="http://localhost:8080" export TB_USERNAME="tenant@thingsboard.org" export TB_PASSWORD="tenant" ``` 3. Get authentication token: ```bash export TB_TOKEN=$(curl -s -X POST "$TB_URL/api/auth/login" \ -H "Content-Type: application/json" \ -d "{\"username\":\"$TB_USERNAME\",\"password\":\"$TB_PASSWORD\"}" | jq -r '.token') ``` ``` ### Technical Analysis The distributed project contains plaintext credentials for the ThingsBoard system administrator and tenant accounts. The passwords are predictable defaults matching their account roles. The ...[truncated 2644 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `credentials.json` containing usable passwords from the distributed package and source-control history. 2. Replace it with a redacted template such as `credentials.example.json`, using placeholders rather than valid-looking defaults. 3. Add `credentials.json`, token files, and other local secret files to `.gitignore` and packaging exclusion rules. 4. Require unique, randomly generated passwords during installation. Do not permit the documented defaults to remain active. 5. Rotate both listed passwords and revoke all JWTs or refresh tokens issued from them. 6. Store production secrets in an operating-system credential store, deployment secret manager, or restricted runtime secret injection mechanism. 7. Avoid persistent plaintext environment variables where stronger secret-injection facilities are available. Never print credentials or JWTs to logs. 8. Require HTTPS for all non-loopback ThingsBoard URLs. Validate `TB_URL` and reject remote `http://` endpoints rather than merely recommending HTTPS. 9. Validate TLS certificates and do not introduce options such as `curl -k` that disable certificate verification. 10. Use a least-privileged tenant or service account for routine operations; reserve sysadmin credentials for explicit administrative tasks. 11. Require explicit user confirmation before destructive or exposure-changing operations, including telemetry deletion and making dashboards public. 12. Add automated secret scanning and configuration checks to CI to prevent future commits containing passwords, tokens, or insecure remote HTTP endpoints. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (8)

Credential Access

High
Category
Privilege Escalation
Content
## Setup

1. Configure your ThingsBoard server in `credentials.json`:
   ```json
   [
     {
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

External Transmission

Medium
Category
Data Exfiltration
Content
3. Get authentication token:
   ```bash
   export TB_TOKEN=$(curl -s -X POST "$TB_URL/api/auth/login" \
     -H "Content-Type: application/json" \
     -d "{\"username\":\"$TB_USERNAME\",\"password\":\"$TB_PASSWORD\"}" | jq -r '.token')
   ```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
3. Get authentication token:
   ```bash
   export TB_TOKEN=$(curl -s -X POST "$TB_URL/api/auth/login" \
     -H "Content-Type: application/json" \
     -d "{\"username\":\"$TB_USERNAME\",\"password\":\"$TB_PASSWORD\"}" | jq -r '.token')
   ```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Usage

All commands use curl to interact with the ThingsBoard REST API.

### Authentication
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**Refresh token (when expired):**
```bash
curl -s -X POST "$TB_URL/api/auth/token" \
  -H "Content-Type: application/json" \
  -d "{\"refreshToken\":\"$TB_REFRESH_TOKEN\"}" | jq -r '.token'
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**Save device attributes:**
```bash
curl -s -X POST "$TB_URL/api/plugins/telemetry/DEVICE/{deviceId}/attributes/SERVER_SCOPE" \
  -H "X-Authorization: Bearer $TB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"attribute1":"value1","attribute2":"value2"}' | jq
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill documents a destructive telemetry deletion operation without any warning that the action may be irreversible or data-destructive. In an agent context, this increases the chance of accidental deletion of production telemetry or historical records by users who may treat examples as safe defaults.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill describes making dashboards public and retrieving public dashboard info without warning that this may expose sensitive operational, telemetry, or tenant information to unauthenticated users. In an automation setting, users may unknowingly publish internal dashboards and create unintended public access.

Static analysis

No suspicious patterns detected.