Back to skill

Security audit

Energy App Middle Integration

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only integration guide with one security-sensitive plaintext gRPC configuration note, but no hidden execution or persistence behavior.

Install only if this internal energy-platform reference is intended for your environment. Before reusing the gRPC example, confirm whether plaintext transport is acceptable inside your cluster; prefer TLS or mTLS for traffic that may carry tokens, tenant context, or user identifiers.

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
SKILL.md:82
Finding

Plaintext gRPC Transport May Expose Sensitive Service Traffic

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:82-89
Vulnerability Type: Plaintext transport of potentially sensitive authentication and tenant context
Risk Level: Medium

Complete Code Snippet:

yaml
grpc:
  client:
    energy-app-middle:
      address: dns:///energy-app-middle.${K8S_POD_NS}.svc.cluster.local:9090
      negotiationType: PLAINTEXT
      enableKeepAlive: true

Technical Analysis

The documented gRPC client configuration explicitly uses negotiationType: PLAINTEXT, which provides neither transport confidentiality nor TLS-based peer authentication. Elsewhere in the same document, service requests are described as carrying JWT access tokens, tenant identifiers, and user identifiers through headers such as X-ACCESS-TOKEN, X-Tenant, X-UID, and X-PUID.

If this authentication or identity context is propagated over the configured gRPC channel, any attacker capable of observing or intercepting the relevant cluster network path could read sensitive metadata. An active network attacker could potentially alter requests or responses because the transport does not provide TLS integrity protection or authenticated service identity.

The cluster-local DNS address limits direct external exposure, but it does not eliminate threats from compromised pods, nodes, sidecars, proxies, cluster networking components, or excessively privileged internal workloads.

Attack Path

  1. An attacker compromises a pod, node, proxy, or networking component with access to the internal service traffic.
  2. The attacker observes or intercepts the plaintext gRPC connection to port 9090.
  3. If authentication or tenant metadata is forwarded on this connection, the attacker captures JWTs, tenant codes, or user identifiers.
  4. The attacker may replay reusable credentials against accessible services or inspect tenant-scoped requests and responses.
  5. If positioned for active interception, the attacker m ...[truncated 843 chars]
Remediation
View remediation

Remediation Suggestions

  • Replace negotiationType: PLAINTEXT with TLS-enabled gRPC transport.
  • Prefer mutual TLS so both client and server authenticate their service identities.
  • Validate server certificates and service names; do not disable hostname or certificate verification.
  • Provision and rotate certificates through the platform's approved secret-management mechanism rather than storing private keys in the Skill or source repository.
  • Apply Kubernetes NetworkPolicies or equivalent controls to restrict access to port 9090 to explicitly authorized workloads.
  • Avoid forwarding reusable end-user bearer tokens where scoped, short-lived service credentials or token exchange can satisfy the use case.
  • Preserve application-level authorization and tenant-boundary validation even after transport encryption is enabled.
  • Monitor for anomalous internal gRPC connections and credential replay attempts.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.