Back to skill

Security audit

PVPC España

Security checks for vulnerabilities and agentic risk

Overview

This skill provides Spain PVPC electricity price lookup and simple optimization tools using a disclosed public electricity API.

Install only if you are comfortable with the agent making live requests to Red Electrica de Espana's public ESIOS API for Spanish PVPC prices. The tool is Spanish-focused, does not store history, and has a disclosed limitation that national holidays are not automatically detected.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

La descripción y el código coinciden parcialmente en que ambos tratan sobre consulta de precios PVPC en España y permiten ver el precio actual y los precios horarios del día. También puede inferirse la hora más barata mediante las estadísticas calculadas. Sin embargo, varias capacidades centrales declaradas no están implementadas: el código no proporciona contexto cualitativo alto/medio/bajo, no clasifica horas en valle/llano/punta, y no realiza recomendaciones u optimización concreta para electrodomésticos. Por tanto, aunque el propósito general es cercano, la descripción promete funcionalidades analíticas y de optimización más avanzadas de las que realmente ofrece el código.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Hay solapamiento parcial con la parte declarada de 'precio actual con contexto', ya que el script sí consulta datos PVPC y ofrece contexto comparativo del día. Sin embargo, la descripción promete varias capacidades adicionales que este fragmento no implementa: no determina tramos valle/llano/punta, no busca las horas más baratas del día, y no optimiza consumos domésticos. El propósito real del código es mucho más estrecho: clasificar un precio actual o introducido manualmente como alto/medio/bajo y mostrar estadísticas básicas del día. No se observan capacidades sensibles no declaradas, pero sí una diferencia material entre el alcance descrito y el comportamiento real del código.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Hay una discrepancia material entre la descripción y el comportamiento real. La parte de la descripción sobre identificar periodos valle/llano/punta sí coincide con el código. Sin embargo, el propósito principal declarado incluye consultar y optimizar precios PVPC, lo que implicaría obtener o procesar precios horarios reales y derivar recomendaciones de coste. El código no accede a ninguna fuente de datos, no calcula precios, no compara horas del día, y no genera recomendaciones de optimización más allá de indicar el próximo periodo valle. Además, aunque la documentación menciona festivos, la implementación solo distingue fines de semana y días laborables, sin lógica para festivos. Por tanto, la descripción sobrestated significativamente las capacidades reales del código.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 21)May include surrounding context.

md
python scripts/precio_referencia.py --now

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 104)May include surrounding context.

md
python scripts/precio_referencia.py --now

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 36)May include surrounding context.

md
python scripts/tarifa_periodos.py --now

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 39)May include surrounding context.

md
python scripts/tarifa_periodos.py --now

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 119)May include surrounding context.

md
python scripts/tarifa_periodos.py --now

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill clearly instructs the agent to run Python scripts that query a public internet API, but the manifest does not declare any tool scope such as network permissions or allowed tools. This creates an authorization and review gap: hosts or agents may execute undeclared network activity, making the skill less auditable and increasing the risk of unintended data egress or policy bypass.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/get_pvpc.py (reported line 22)May include surrounding context.

python
date_str = datetime.now().strftime('%Y-%m-%d')
    
    # API pública de ESIOS (no requiere token)
    url = f"https://api.esios.ree.es/archives/70/download_json?locale=es&date={date_str}"
    
    try:
        req = Request(url, headers={'User-Agent': 'Mozilla/5.0'})

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file contains user-facing natural language in Spanish in the module docstring, CLI description, help text, and printed output. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The request URL forces locale=es, and the script’s docstrings and CLI output are entirely in Spanish. Under the policy rule for natural-language violations, this is a locale/language constraint without a visible user choice or opt-in mechanism.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains natural-language descriptions and output strings that assume Spanish as the required language for all users. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The docstring and all user-facing text in this script are written only in Spanish. Under the language/locale policy, forcing a specific language without user opt-in or a clearly documented regional justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The natural-language description and later user-facing strings indicate the skill assumes Spanish-language output by default. Under the policy rule, forcing a specific language without user opt-in can be a locale/language policy violation unless the constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The docstring for is_summer_time() says it detects horario de verano using the last Sunday of March to the last Sunday of October, which is a specific DST rule. However, the code simply returns 4 <= month <= 10, treating all of October as summer time and all of March as winter time, so the documentation actively contradicts the implemented logic.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.