Back to skill

Security audit

Dockerfile Optimizer

Security checks for vulnerabilities and agentic risk

Overview

This is a benign Dockerfile optimization guide; the flagged command is a normal container image cleanup example, not hidden host-destructive behavior.

Installers should expect this skill to inspect Dockerfiles and Docker image metadata when asked. Review any generated Dockerfile changes before applying them, especially base image changes, .dockerignore exclusions, and cache or secret mount recommendations.

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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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 (4)

Tool Parameter Abuse

Low
Category
Tool Misuse
Content
**Layer optimization:**
- Combine RUN statements to reduce layers
- Remove package manager caches in the same layer: `apt-get clean && rm -rf /var/lib/apt/lists/*`
- Remove build dependencies after compilation
- Use `.dockerignore` to exclude `node_modules`, `.git`, tests, docs
Confidence
15% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

Low
Category
Tool Misuse
Content
**Layer optimization:**
- Combine RUN statements to reduce layers
- Remove package manager caches in the same layer: `apt-get clean && rm -rf /var/lib/apt/lists/*`
- Remove build dependencies after compilation
- Use `.dockerignore` to exclude `node_modules`, `.git`, tests, docs
Confidence
15% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

Low
Category
Tool Misuse
Content
**Layer optimization:**
- Combine RUN statements to reduce layers
- Remove package manager caches in the same layer: `apt-get clean && rm -rf /var/lib/apt/lists/*`
- Remove build dependencies after compilation
- Use `.dockerignore` to exclude `node_modules`, `.git`, tests, docs
Confidence
15% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Chaining Abuse

Low
Category
Tool Misuse
Content
**Layer optimization:**
- Combine RUN statements to reduce layers
- Remove package manager caches in the same layer: `apt-get clean && rm -rf /var/lib/apt/lists/*`
- Remove build dependencies after compilation
- Use `.dockerignore` to exclude `node_modules`, `.git`, tests, docs
Confidence
15% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Static analysis

No suspicious patterns detected.