Back to skill

Security audit

Redis Manager

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to manage Redis as advertised, but its known default Redis password on a shared Docker network creates a real review-worthy exposure.

Review before installing on any shared machine or multi-container environment. Set a strong REDIS_PASSWORD before starting it, limit which containers can join the Docker network, and treat flush commands as destructive even though they ask for confirmation.

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
docker-compose.yml:5
Finding

Predictable Default Redis Credential Exposes Data on the Shared Docker Network

Content
View full analysis

Vulnerability Details

File Location: docker-compose.yml:5
Vulnerability Type: Predictable default credential and plaintext secret exposure
Risk Level: Medium

Vulnerable Code

yaml
services:
  redis:
    image: redis:7.4-alpine
    container_name: ${REDIS_CONTAINER:-codai_redis}
    restart: unless-stopped
    command: redis-server --requirepass ${REDIS_PASSWORD:-redispass} --maxmemory ${REDIS_MAXMEMORY:-256mb} --maxmemory-policy allkeys-lru

Related credential exposure also appears in the health check at docker-compose.yml:12-14:

yaml
    healthcheck:
      test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-redispass}", "ping"]

The runtime script establishes the same fallback at run.sh:26:

bash
REDIS_PASSWORD="${REDIS_PASSWORD:-redispass}"

Technical Analysis

Redis starts with the fixed, publicly documented fallback password redispass if the operator does not define REDIS_PASSWORD. Although run.sh prints a warning for some operations, it does not prevent Redis from starting with this credential.

The service joins the shared external Docker network nginx-proxy_net. Docker containers attached to the same network can connect directly to Redis on port 6379, bypassing the localhost-only host-port binding. Consequently, the 127.0.0.1 port mapping does not protect Redis from other containers on the shared network.

The password is also passed in Redis process arguments and embedded in Docker health-check configuration. Depending on Docker access and process visibility, it may be recoverable through container inspection or process information. However, the primary weakness is that an attacker does not need to recover it when the predictable default remains active.

Attack Path

  1. An attacker gains control of an existing container on nginx-proxy_net, or starts a container attached to that network where local Docker permissions permit it.
  2. Th ...[truncated 1455 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the fallback credential and make a strong password mandatory:

    yaml
    command:
      - redis-server
      - --requirepass
      - ${REDIS_PASSWORD:?REDIS_PASSWORD must be set}
      - --maxmemory
      - ${REDIS_MAXMEMORY:-256mb}
      - --maxmemory-policy
      - allkeys-lru
    
  2. Prefer Docker secrets or another protected secret-management mechanism over placing credentials directly in Compose interpolation, command arguments, or health-check definitions.

  3. Change the health check so it does not embed the password in inspectable Compose metadata. Use a protected credential file or an authenticated health-check wrapper with appropriately restricted access.

  4. Fail securely in run.sh when no password is supplied instead of assigning redispass:

    bash
    : "${REDIS_PASSWORD:?REDIS_PASSWORD must be set to a strong, unique value}"
    
  5. Rotate the credential immediately for any existing deployment that may have used the default. Restart the service and update all clients atomically.

  6. Restrict Redis to dedicated application networks rather than a broadly shared proxy network. Attach only containers that legitimately require Redis access.

  7. Configure Redis ACLs with application-specific users and least-privilege command/key permissions instead of relying solely on one unrestricted password.

  8. Keep the localhost-only host binding as defense in depth, but do not treat it as isolation from containers attached to the same Docker network.

Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (5)

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
70% confidence
Finding

Shadow Command Trigger: 'start redis' conflicts with built-in command 'start'

Content

No source excerpt is available for this finding.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
70% confidence
Finding

Shadow Command Trigger: 'stop redis' conflicts with built-in command 'stop'

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrase "flush redis" is broad and maps directly to a destructive action that can erase application state. In a shared local-dev environment, an accidental or context-misparsed invocation could wipe data across databases, making unintended data loss plausible even without a malicious actor.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file's comments, usage instructions, prompts, and status messages are written in Portuguese, which imposes a specific language on users. The policy allows locale constraints only when they are justified or optional, but this script provides no opt-in, alternative language, or explanation that it is intentionally region-specific.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

A bare product or skill name is an ambiguous activation condition in a markdown file because it can appear in ordinary references, not just intended invocations. The file does not provide negative examples or explain when mentioning the name should versus should not activate the skill.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.