Back to skill

Security audit

Bluetooth

Security checks for vulnerabilities and agentic risk

Overview

This Bluetooth skill is useful but needs review because it can persist sensitive device and health data, store pairing details, run packet captures, and trigger high-impact device or app actions without enough scoping.

Install only if you are comfortable letting the agent control local Bluetooth devices and maintain a `~/bluetooth/` history. Before use, require confirmations for smart-home actions, health-data export/sync, and packet capture; avoid storing PINs or passkeys in profile files; keep the profile directory private or encrypted; run `btmon` with sudo only for authorized diagnostics; and install Bluetooth libraries in an isolated, pinned environment.

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
tools.md:95
Finding
Unpinned Third-Party Python Dependency Installation## Vulnerability Details **File Location**: `tools.md`, lines 95-98 **Vulnerability Type**: Unpinned dependency and insufficient supply-chain verification **Risk Level**: Medium **Vulnerable Code Snippet**: ```markdown ### Bleak (Python) — Recommended ```bash pip install bleak ``` ``` ### Technical Analysis The Skill recommends installing `bleak` directly from the package index without specifying an exact version, verifying package hashes, using a lockfile, or documenting the expected source and publisher. The installed code can therefore change independently of the reviewed Skill. Although no malicious package or dependency is embedded in the project, following this instruction resolves and installs whichever release is selected at installation time. A compromised publisher account, malicious upstream release, or compromised transitive dependency could introduce arbitrary package code. Depending on the package format and installer behavior, attacker-controlled code could execute during installation or when the Agent later imports and uses the library. ### Attack Path 1. An attacker compromises the upstream package publisher, distribution channel, or a transitive dependency. 2. The attacker publishes a malicious version that remains compatible with the unrestricted package name. 3. A user or Agent follows the documented `pip install bleak` instruction. 4. The package installer resolves the malicious or compromised release because no trusted version or hash is enforced. 5. Malicious code executes during installation or when the Bluetooth library is imported. 6. The code operates with the privileges of the user running `pip` or the consuming Agent process. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the installing user's privileges. This may permit access to files available to that account, including Bluetooth profiles, device identifiers, interaction history, packet ...[truncated 343 chars]
Remediation
## Remediation Suggestions 1. Pin `bleak` to a specifically reviewed version rather than installing an unrestricted latest release. 2. Use a lockfile or requirements file containing cryptographic hashes, and install with hash enforcement. 3. Document the expected official package index, project URL, and publisher so users can validate package provenance. 4. Install the dependency in an isolated virtual environment instead of the global Python environment. 5. Review and pin transitive dependencies where practical. 6. Incorporate dependency vulnerability and integrity scanning into the release process. 7. Update pinned versions through an explicit review process rather than allowing silent upstream changes.

T09 · Insecure Skill Coding Practices

Warning
Location
security.md:17
Finding
Plaintext Storage of Static Bluetooth Pairing Credentials## Vulnerability Details **File Location**: `security.md`, lines 17-21; supporting profile example in `profiles.md`, lines 17-20 **Vulnerability Type**: Plaintext storage of authentication material **Risk Level**: Medium **Vulnerable Code Snippets**: ```markdown ### 3. Pairing Confirmation - **Never auto-accept pairing requests** - Display pairing code to user for verification - Require explicit "yes" before completing pair - Document PIN/passkey in profile (if static) ``` ```markdown ## Connection - **Protocol:** A2DP (Classic Bluetooth) - **Pairing:** PIN required (0000) - **Auto-connect:** yes ``` ### Technical Analysis The Skill explicitly directs the Agent to document a static Bluetooth PIN or passkey in a device profile. The profile example demonstrates that the credential is stored directly in Markdown. These profiles are placed under `~/bluetooth/profiles/`, but the Skill does not require encryption, restrictive file permissions, secret-store integration, access auditing, or credential redaction. A static pairing PIN is authentication material. Persisting it in an ordinary text file makes it accessible to any local process, user, backup service, synchronization utility, indexing service, or diagnostic collector that can read the profile. The exposure may persist after the Bluetooth interaction has ended and may be propagated into backups. ### Attack Path 1. The Agent pairs with a device that uses a static PIN or passkey. 2. Following `security.md`, the Agent writes the credential into a Markdown profile under `~/bluetooth/profiles/`. 3. The file is read by another local account or process, included in a backup, synchronized, indexed, or collected in diagnostic output. 4. An attacker obtains the static PIN from the exposed profile. 5. If the device remains pairable and accepts that credential, the attacker uses it to attempt unauthorized pairing or device impersonation. 6. The attacker gains wh ...[truncated 911 chars]
Remediation
## Remediation Suggestions 1. Remove the instruction to record PINs or passkeys in device profile files. 2. Store only non-sensitive status such as `Pairing: PIN required`, without the credential value. 3. If credential persistence is strictly necessary, use the operating system credential manager or another encrypted secret store. 4. Restrict profile directory and file permissions to the owning user, while recognizing that permissions alone do not make plaintext credential storage safe. 5. Prevent profile files from being synchronized, indexed, committed to source control, or included in unencrypted backups. 6. Redact credentials from logs, command histories, support bundles, and error messages. 7. Prefer authenticated pairing methods with user verification and device-specific, rotating, or one-time passkeys where supported. 8. Provide migration guidance to remove any credentials already saved in existing profiles and rotate them where the device permits.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (12)

Context Leakage

High
Category
Data Exfiltration
Content
2. Subscribe to heart rate characteristic
3. Stream readings: "Current: 72 bpm"
4. Maintain connection until user says stop
5. Log session for history
```

### Multi-Device Sync
Confidence
92% confidence
Finding
"Log session for history" indicates retention of streamed heart-rate session data, which is sensitive contextual and biometric information. Persisting that data without clear purpose limitation, consent, and access restrictions creates a context-leakage risk where intimate health signals may later be exposed, repurposed, or combined with other records.

Missing User Warnings

High
Confidence
95% confidence
Finding
The bulk sync flow consolidates health data from multiple devices and transmits it to configured external apps without an explicit warning or confirmation. Aggregation plus external transmission amplifies privacy and compliance risk because it creates a richer health profile and broadens disclosure to third-party ecosystems.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill explicitly stores Bluetooth device profiles, discovered devices, and interaction history in a local workspace, which can reveal sensitive information such as nearby device identities, usage patterns, and possibly device-specific commands or states. Even though the file includes operational safety rules, it does not warn about the privacy implications, retention risks, or access control expectations for this logged data, which makes unintended disclosure more likely.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
|--------|---------------|
| Auto-connect to new devices | Could be attacker's device with spoofed name |
| Continuous scanning | Reveals your presence, drains battery, attracts attacks |
| Store pairing keys in plain text | Keys allow reconnection without consent |
| Send credentials over BLE | BLE encryption is weak, often absent |
| Trust device name | Names are trivially spoofed |
| Ignore weak signal devices | Except: -80dBm+ is suspicious (distant attacker) |
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.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
This markdown file includes packet-capture commands using `btmon`, including saving traffic to a file, but does not warn that capturing Bluetooth/HCI traffic can collect data about nearby devices and communications. Under the markdown-specific warning rule, examples that can affect privacy should disclose that behavior to the user.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
### btmon (Packet capture)
```bash
# Capture HCI traffic (requires root)
sudo btmon

# Save to file
sudo btmon -w capture.btsnoop
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
### btmon (Packet capture)
```bash
# Capture HCI traffic (requires root)
sudo btmon

# Save to file
sudo btmon -w capture.btsnoop
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill scope expands from Bluetooth device management into smart-home actuation and cloud fitness syncing, which increases the reachable capability surface beyond the stated purpose. That kind of scope drift can lead users to authorize or invoke actions affecting locks, thermostats, and external services without sufficiently clear boundaries, review points, or least-privilege controls.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The workout export flow collects and saves fitness data, then offers syncing to third-party platforms, but it does not call for explicit user warning or consent around sensitive health-data handling. This creates privacy risk because workout records may reveal medical, behavioral, and location-related information and may be transmitted to external services unexpectedly.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The live heart-rate flow includes continuous streaming and logging of biometric data "for history" without warning, consent, or storage limits. Heart-rate data is sensitive biometric/health information, so silent persistence materially increases privacy exposure and the consequences of unauthorized access or secondary use.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The trigger phrase "Sync everything" is overly broad for an operation that connects to multiple devices, extracts new data, consolidates health information, and pushes it to external apps. Ambiguous bulk-action phrasing raises the risk of over-collection and unintended transmission because users may not realize the full downstream effects of the command.

Context-Inappropriate Capability

Medium
Confidence
84% confidence
Finding
Including a reverse-engineering workflow with btmon/PacketLogger and traffic capture introduces surveillance-style capability that is broader than ordinary Bluetooth management. Capturing HCI/GATT traffic can expose identifiers, device behavior, and potentially sensitive protocol data, especially if used on third-party devices without an explicit, constrained diagnostic purpose.

Static analysis

No suspicious patterns detected.