Back to skill

Security audit

Texas Electricity Savings Monitor

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for Texas electricity shopping, but it sends residential address and usage data to an external service while shipping an exposed API token, so it needs review before installation.

Install only if you are comfortable with Texas service address and usage-related information being sent to Personalized Energy or PowerLego services for plan lookup. The publisher should rotate and remove the exposed bearer token, move authentication behind a protected service or secret store, and add clear privacy disclosure before user address data is transmitted.

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

Warning
Location
scripts/powerlego_api.py:13
Finding

Hard-Coded Bearer Token in Distributed Source Code

Content
View full analysis

Vulnerability Details

File Location: scripts/powerlego_api.py, lines 13–18
Vulnerability Type: Hard-coded authentication credential
Risk Level: Medium

python
API_TOKEN = "Bearer 679b742f444ac4121368dfd32e504119"
DEFAULT_HEADERS = {
    "Accept": "*/*",
    "Authorization": API_TOKEN,
    "Origin": "https://www.personalized.energy",
    "Referer": "https://www.personalized.energy/",
}

Technical Analysis

A reusable bearer token is embedded directly in the distributed Skill source. Anyone with access to the package can extract this credential without executing the Skill. The token is assigned to the Authorization header and is automatically included in requests to the PowerLego endpoints.

The implementation provides no runtime secret retrieval, credential rotation, per-user authorization, or separation between distributable client code and privileged service credentials. Any restrictions claimed through the Origin and Referer headers are not effective authentication controls because an independent client can reproduce those headers.

The outbound requests serve the declared electricity-shopping workflow and use HTTPS. However, embedding the credential is unnecessary: privileged authentication should remain in an owner-controlled service or approved runtime secret store.

Attack Path

  1. Obtain or inspect the Skill package.
  2. Open scripts/powerlego_api.py.
  3. Copy the bearer token declared on line 13.
  4. Construct independent requests to the PowerLego endpoints listed in the same file.
  5. Include the copied token in the Authorization header and reproduce the public Origin and Referer values if required.
  6. Continue making requests within the token's permissions until the credential is revoked, expires, or is blocked.

Impact Assessment

An attacker may impersonate this integration and exercise whatever API privileges are granted to the exposed token. Depending on ...[truncated 637 chars]

Remediation
View remediation

Remediation Suggestions

  1. Revoke and rotate the exposed token immediately, treating it as compromised.
  2. Remove the token from source code and repository history.
  3. Route authenticated requests through an owner-controlled backend so the credential is never distributed with the Skill.
  4. If direct runtime authentication is unavoidable, retrieve the credential from an approved secret manager rather than a committed file.
  5. Use short-lived, narrowly scoped credentials restricted to the necessary endpoints and operations.
  6. Apply server-side rate limits, usage monitoring, audience restrictions, and anomaly alerts.
  7. Do not rely on client-controlled Origin or Referer headers as authorization controls.
  8. Ensure logs, exceptions, diagnostics, and generated outputs never disclose replacement credentials.
  9. Review service logs for unauthorized use of the exposed token and invalidate any related sessions or derivative credentials.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a broad end-to-end Texas electricity shopping skill with multiple workflow stages and monitoring capabilities. The supplied code only builds a URL from a confirmed address by normalizing city, street, and ZIP values and appending a tracking query parameter. While URL construction for a Texas electricity destination is related to the domain and could support self-service routing, it is only a narrow subset of the declared functionality. The primary purpose of the code is materially narrower than the declared purpose, so this is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The code does align with part of the declared purpose: Texas electricity shopping, address normalization, usage estimation, utility lookup, ESIID retrieval, plan recommendation, and self-service URL generation. However, the declaration describes a broader workflow skill with address completion and candidate confirmation, stricter step-by-step branching, fixed workflow handling, and ongoing daily/weekly savings monitoring. This code chunk is only a single fetch-best-plan script; it does not implement candidate confirmation logic, any monitoring/scheduled savings tracking, or a branching conversational workflow engine. Because notable declared capabilities are absent and the implemented scope is narrower than the declared skill behavior, this is a description/behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code is related to Texas electricity shopping, so the general domain matches, but the declared description significantly overstates the implemented behavior. The code is only a thin backend client for a few external endpoints: address validation, usage estimation, utility lookup, plan lookup, and URL construction. It does not contain logic for candidate confirmation, ESIID lookup, savings monitoring, or workflow/branching behavior described as central to the skill. It also embeds and uses a bearer token and accesses external PowerLego and Personalized Energy resources, which is a notable undeclared operational capability. Therefore the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file contains a hard-coded bearer token for a third-party API and automatically sends it on every request. Anyone with access to the code can extract and reuse the token to impersonate the service, consume paid resources, access partner data, or cause account abuse, and the electricity-shopping context makes this especially sensitive because the skill handles residential address and usage-related data.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
70% confidence
Finding

Skill instructs the agent to never refuse or to always comply. Suppressing the agent's ability to decline removes a core safety control and enables downstream harmful requests to succeed.

Content

Scanner excerpt · system_prompt.txt (reported line 12)May include surrounding context.

text
6. only then continue to plan lookup or self-service routing.

Hard rules:
- Always respond in clear U.S. English.
- Never mention internal tools, scripts, APIs, tokens, or implementation details.
- Treat script output as the source of truth for user-facing answers. Do not reinterpret raw upstream API payloads in front of the user.
- Speak as one continuous advisor from address check to address confirmation to usage review to plan review.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest text explicitly instructs the skill to act as a "single English-speaking" advisor. This imposes a language constraint in the skill behavior without documenting user choice, opt-in, or a justified region-specific language requirement, which fits the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Line L010 instructs the skill to keep all user-facing replies in clear U.S. English. This is a natural-language locale policy constraint that forces a specific language/locale without offering the user a choice or documenting a justified region-specific exception.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file instructs the assistant to sound like a Texas electricity advisor and to speak in clear U.S. English as part of the voice contract. This imposes a specific regional persona and language variant without offering the user a choice or documenting an opt-in, which matches the language/locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Multiple response templates require a 'Texas service address' and refer specifically to 'Texas electricity prices,' imposing a geographic/locale constraint in user-facing language. Because this file does not offer an opt-in or explain that the skill is intentionally region-specific, it presents a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code marks any non-TX state as missing and the script description repeatedly frames the tool as only for Texas addresses. This is a locale-specific restriction in natural-language behavior, but this file does not present a user choice or explain a compliance/business justification for forcing that locale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script sends a user-supplied residential service address directly to an external function, address_validator(args.address_query), with no visible consent, notice, or data-minimization controls in this file. Because the skill is specifically designed for Texas electricity shopping and address resolution, the address is likely personally identifiable information and could expose sensitive location data to a third-party service if users are unaware of the transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code transmits user-supplied residential address details and estimated usage inputs to external third-party endpoints without any built-in consent, notice, minimization, or privacy guardrails. Even though the transport is HTTPS, this still creates a data-sharing/privacy risk because sensitive household location and energy-consumption information is sent off-platform in a consumer electricity workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest explicitly requires all user-facing replies to remain in English, and the persona also instructs the advisor to respond in clear U.S. English. This is a language policy constraint presented as mandatory behavior, with no user choice or opt-in described.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Line L12 instructs the skill to always respond in clear U.S. English. This is a natural-language locale policy constraint applied unconditionally, and the file does not offer the user any language or locale choice or document a justified region-specific exception for response language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instruction 'Speak in plain U.S. English' imposes a specific language/locale on all user-facing responses. The file does not offer the user a language choice or indicate that this locale restriction is optional or region-justified as a communication preference.

Content

No source excerpt is available for this finding.