Back to skill

Security audit

Kubernetes Skills

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only Kubernetes autoscaling skill with purpose-aligned examples, though users should treat credential examples carefully before copying them.

Review generated autoscaling manifests before applying them to a cluster, especially replica limits, scale-to-zero settings, and VPA update mode. Do not put real credentials directly in trigger metadata or connection URIs; use Kubernetes Secrets, KEDA TriggerAuthentication, external secret management where available, and least-privilege access controls.

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
KEDA-TRIGGERS.md:39
Finding

Plaintext RabbitMQ Credentials Embedded in Trigger Configuration

Content
View full analysis

Vulnerability Details

File Location: KEDA-TRIGGERS.md, lines 31–40; the vulnerable credential-bearing URI is on line 39.
Vulnerability Type: Plaintext credentials in configuration
Risk Level: Medium

Complete Code Snippet:

yaml
triggers:
- type: rabbitmq
  metadata:
    protocol: amqp
    queueName: my-queue
    mode: QueueLength
    value: "10"
    host: amqp://user:pass@rabbitmq.default.svc:5672

Technical Analysis

The RabbitMQ example places a username and password directly inside the AMQP connection URI. Although user:pass appears to be illustrative rather than a real credential, the example promotes an insecure deployment pattern that users may copy and replace with production credentials.

KEDA trigger metadata is stored in Kubernetes resources and can be exposed through source repositories, GitOps history, manifest archives, CI/CD logs, Kubernetes API queries, diagnostic output, and administrative tooling. Embedding credentials in a URI may also cause them to appear in error messages or logs produced while validating or connecting to RabbitMQ.

Sensitive authentication material should instead be held in a Kubernetes Secret and accessed through a KEDA TriggerAuthentication resource. Access to that Secret should be constrained through namespace isolation and least-privilege RBAC.

Attack Path

  1. An operator copies the documented RabbitMQ trigger example into a deployment manifest.
  2. The placeholder username and password are replaced with valid RabbitMQ credentials while preserving the inline URI pattern.
  3. The manifest is committed to source control, processed by a CI/CD pipeline, or submitted to the Kubernetes API.
  4. An attacker with read access to the repository, pipeline output, manifest history, Kubernetes resource, or relevant diagnostic logs extracts the connection URI.
  5. The attacker connects to the reachable RabbitMQ service using the disclosed credentials ...[truncated 945 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove credentials from the RabbitMQ connection URI in trigger metadata.

  2. Store the RabbitMQ connection string or individual authentication values in a Kubernetes Secret.

  3. Define a KEDA TriggerAuthentication resource that references the Secret and attach it to the RabbitMQ trigger with authenticationRef.

  4. Update the documentation with a secure example, such as:

    yaml
    apiVersion: v1
    kind: Secret
    metadata:
      name: rabbitmq-credentials
    type: Opaque
    stringData:
      host: amqp://user:replace-with-secure-password@rabbitmq.default.svc:5672
    ---
    apiVersion: keda.sh/v1alpha1
    kind: TriggerAuthentication
    metadata:
      name: rabbitmq-auth
    spec:
      secretTargetRef:
      - parameter: host
        name: rabbitmq-credentials
        key: host
    ---
    triggers:
    - type: rabbitmq
      metadata:
        protocol: amqp
        queueName: my-queue
        mode: QueueLength
        value: "10"
      authenticationRef:
        name: rabbitmq-auth
    
  5. In production, create the Secret through an external secret manager or a protected deployment mechanism rather than committing the populated Secret manifest to source control.

  6. Apply least-privilege RabbitMQ permissions and Kubernetes RBAC so the KEDA operator and authorized workloads are the only principals able to access the secret.

  7. Rotate any real credentials that may already have been deployed or committed using the documented inline pattern, and remove them from repository and CI/CD history where feasible.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file provides authentication examples referencing AWS access key identifiers and secret access keys in TriggerAuthentication and ClusterTriggerAuthentication manifests. The document does not include any warning or guidance about securely storing credentials in Kubernetes secrets, avoiding hardcoded secrets, or limiting exposure, even though the content affects privacy and system integrity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The cron example hardcodes the timezone to America/New_York, which imposes a specific locale in natural-language configuration without explaining that it is only an example or advising users to choose their own timezone. This can conflict with organizational language/locale policy when examples are reused directly.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.