Back to skill

Security audit

Dockerfile Optimizer

Security checks for vulnerabilities and agentic risk

Overview

This skill only gives Dockerfile optimization advice and does not install code, run commands, persist changes, or access sensitive data.

Before installing, understand that this skill may respond to broad Docker best-practices prompts and may suggest Dockerfile commands that should be reviewed for your specific base image and dependency needs before use.

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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).

Content

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

md
## Important Rules:
- **Do not break the app:** Ensure your optimizations (like using Alpine) won't break common dependencies unless you warn the user (e.g., Alpine uses `musl` instead of `glibc`, which can affect some Python/C++ binaries).
- **Consolidate correctly:** Always chain `apt-get update` and `apt-get install` in the same `RUN` command, followed immediately by `rm -rf /var/lib/apt/lists/*`.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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).

Content

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

md
## Important Rules:
- **Do not break the app:** Ensure your optimizations (like using Alpine) won't break common dependencies unless you warn the user (e.g., Alpine uses `musl` instead of `glibc`, which can affect some Python/C++ binaries).
- **Consolidate correctly:** Always chain `apt-get update` and `apt-get install` in the same `RUN` command, followed immediately by `rm -rf /var/lib/apt/lists/*`.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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).

Content

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

md
## Important Rules:
- **Do not break the app:** Ensure your optimizations (like using Alpine) won't break common dependencies unless you warn the user (e.g., Alpine uses `musl` instead of `glibc`, which can affect some Python/C++ binaries).
- **Consolidate correctly:** Always chain `apt-get update` and `apt-get install` in the same `RUN` command, followed immediately by `rm -rf /var/lib/apt/lists/*`.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger description is broad enough to activate on ordinary conversation about Docker best practices, image size, or build speed, which can cause the skill to run in situations the user did not explicitly intend. This increases the chance of unintended prompt interception or workflow hijacking, though it does not by itself grant code execution or direct data access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instructions require Chinese output for Chinese prompts and English output for English prompts, which imposes a language policy automatically. The file does not indicate that users may choose a different output language or opt in to this behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The expected output explicitly requires 'A Chinese optimization report,' which imposes a language choice independent of user preference or an explicit opt-in mechanism. This can violate language/locale policy guidance because the file encodes a forced language behavior rather than offering or documenting language selection.

Content

No source excerpt is available for this finding.