Back to skill

Security audit

Reliable Bitcoin Price Feed

Security checks for vulnerabilities and agentic risk

Overview

This skill provides a disclosed Bitquery-based live Bitcoin price stream, with manageable credential and dependency risks users should understand before running it.

Install only if you are comfortable giving the skill a Bitquery API key and making outbound WebSocket calls to Bitquery. Use a dedicated low-privilege API token, keep WebSocket/client debug logging off, run it in a virtual environment, and prefer pinned dependencies or a lockfile before production use.

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
requirements.txt:1
Finding
Unpinned Third-Party Dependency Allows Unreviewed Package Updates<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```text gql[websockets]>=3.5.0 ``` The installation instructions in `SKILL.md:52-56` repeat the same unpinned installation pattern: ```bash pip install 'gql[websockets]' ``` ### Technical Analysis The requirement specifies only a minimum version and does not impose an upper bound, lock transitive dependencies, or verify package hashes. Consequently, future versions of `gql` and its WebSocket-related dependencies can be installed automatically without having been reviewed as part of this audit. This does not establish that the current package is malicious. The security issue is that the effective code installed by users can change after the skill has been reviewed. If an allowed future release or one of its transitive dependencies is compromised, malicious code could execute during package installation, import, or normal use. ### Attack Path 1. An attacker compromises the publishing account, build process, or distribution channel of `gql` or an allowed transitive dependency. 2. The attacker publishes a malicious version satisfying `>=3.5.0`. 3. A user follows the documented installation command or installs from `requirements.txt`. 4. `pip` resolves and downloads the malicious version because no exact version or hash is required. 5. Attacker-controlled code executes during installation, module import, or WebSocket client initialization. ### Impact Assessment Successful exploitation would execute code with the privileges of the user installing or running the skill. Depending on those privileges and the malicious package payload, this could expose environment variables—including `BITQUERY_API_KEY`—read or alter user-accessible files, make arbitrary network requests, or modify the Python environment. The project itself does not request elevated privileges, so the direct scope is limited ...[truncated 152 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `gql` to a specific, reviewed version rather than using an open-ended lower bound. 2. Generate and commit a lock file that pins every transitive dependency. 3. Use package hashes and install with `pip --require-hashes` so altered distributions are rejected. 4. Review dependency updates before changing the lock file, including release notes, ownership changes, and vulnerability advisories. 5. Install dependencies in an isolated virtual environment under a non-privileged account. 6. Keep the installation instructions in `SKILL.md` consistent with the locked dependency process rather than recommending an unconstrained `pip install`. A hardened requirements entry should use a reviewed exact version, with hashes maintained by a lock-generation tool: ```text gql[websockets]==<reviewed-version> \ --hash=sha256:<verified-distribution-hash> ``` ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/stream_bitquery.py:151
Finding
Bitquery API Token Is Embedded in the WebSocket URL<![CDATA[ ## Vulnerability Details **File Location**: `scripts/stream_bitquery.py:151-156` **Vulnerability Type**: `T09: Insecure Skill Coding Practices` **Risk Level**: Low ### Vulnerable Code ```python async def run_stream(timeout_seconds: int | None = None) -> None: api_key = get_api_key() url = f"{BITQUERY_WS_BASE}?{urlencode({'token': api_key})}" transport = WebsocketsTransport( url=url, headers={"Sec-WebSocket-Protocol": "graphql-ws"}, ) ``` ### Technical Analysis The API credential is inserted into the query component of the WebSocket URI. The application does not intentionally print this URI, uses encrypted `wss://` transport, and the documentation explicitly warns users about the exposure risk. Nevertheless, credential-bearing URLs may be recorded by verbose dependency logs, exception telemetry, debugging tools, proxy infrastructure, or monitoring systems. URL encoding prevents query-string syntax injection but does not provide confidentiality once the complete URL is captured. Anyone who obtains the `token` value may be able to authenticate to Bitquery as the affected user until the token expires or is revoked. The project documentation states that this Bitquery endpoint requires URL-based authentication and does not support header-based authentication. Therefore, this risk cannot be completely eliminated in the current integration, but its exposure can be reduced. ### Attack Path 1. A user exports a valid `BITQUERY_API_KEY` and starts the streaming script. 2. The script constructs a WebSocket URL containing the token as the `token` query parameter. 3. Debug logging, error reporting, proxy telemetry, or another monitoring component records the complete connection URL. 4. An attacker or unauthorized operator obtains access to those records. 5. The attacker extracts the query parameter and reuses the token against Bitquery. 6. The token remains usable until it expires, is revoked, or is rotated. ### Impact Assess ...[truncated 544 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Prefer authorization headers if Bitquery adds header-based authentication support. 2. Keep WebSocket and HTTP client debug logging disabled in production. 3. Add logging and telemetry filters that redact the `token` query parameter before URLs are stored or transmitted. 4. Avoid including connection URLs in exception messages, diagnostics, shell history, screenshots, or support tickets. 5. Use a dedicated token with the minimum available permissions and suitable usage limits. 6. Rotate the token immediately if a credential-bearing URL may have entered logs or telemetry. 7. Restrict access to proxy, observability, and crash-reporting records and configure short retention periods. 8. Preserve TLS certificate validation and continue using only the `wss://` endpoint. 9. Consider constructing and retaining the credential-bearing URL only immediately before transport initialization, then deleting unnecessary references where practical. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill performs network access and reads environment secrets, but it does not declare any explicit tool scope or permission boundaries. That creates a mismatch between documented metadata and actual behavior, increasing the chance of unintended secret access or network use without installer awareness or policy enforcement.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger instructions are broad enough to capture generic streaming crypto-price requests, and they strongly instruct the agent to ALWAYS use this skill. Overbroad invocation can cause the agent to route unrelated requests into a networked skill unnecessarily, exposing secrets or causing external calls when a simpler or safer response would suffice.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The Bitquery API token is embedded directly into the WebSocket URL query string. Query-string credentials are commonly exposed through logs, debugging output, telemetry, proxy infrastructure, browser or client diagnostics, and error traces, which increases the chance of credential disclosure even when the connection itself uses WSS/TLS. In this skill’s context, the code is intended to be run by users as-is, so normal operational logging or troubleshooting could leak the token without the user realizing it.

Static analysis

No suspicious patterns detected.