BD Dockerfile Audit
Dockerfile static security auditor. Scans any Dockerfile for 10 security issues — running as root, unpinned base images, secrets in ENV/ARG, remote ADD fetch, shell-form ENTRYPOINT, sudo installed, missing .dockerignore, privileged port EXPOSE, apt-get without --no-install-recommends, and hardcoded ARG defaults. Zero external dependencies (no hadolint, no Docker daemon, no network). Maps to CIS Docker Benchmark and CWE. CI fail-gate included.
As a process D 44/100 · Unfinished process — weak spots: result and completion, when it triggers, inputs and preconditions
How to improve
- Say in the description WHEN to use the skill ("use when…", example requests): that is the agent's main cue.
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 4
✓ No critical or high findings
Medium and low: 4
-
low Dangerous commands
cmd-privilegescripts/dockerfile_audit.py:282Privilege escalation / world-writable permissions (string literal in code, not executed; documentation of a security skill)fix="Remove sudo from the container. If specific commands need elevated privileges, use gosu or setuid wrapper instead.",
code literalsecurity skill -
low Risky intent
intent-offensive-securitySKILL.md:54Offensive-security / dual-use content (legitimate for authorised testing; review intended use) (detector / deny-list definition)| DF006 | HIGH | sudo installed | CWE-250 | `apt-get install sudo` — privilege escalation |
detector -
low Secrets in code
secret-password-literalSKILL.md:73Hard-coded password / key literal (may be an example) (detector / deny-list definition)- **FAIL (CRITICAL)**: `ENV PASSWORD=actual_value`, `ENV API_KEY=sk-abc123`, `ENV DB_PASSWORD=prod_pass`.
detector -
low Secrets in code
secret-password-literalSKILL.md:152Hard-coded password / key literal (may be an example)Code : ENV API_KEY=sk-p…xyz
Files scanned: 3. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- warning
name-formatname should be kebab-case (lowercase letters, digits, hyphens) - warning
description-no-whendescription does not say WHEN to use the skill (no "use when") - note
frontmatter-keyunknown frontmatter key "homepage"
Process rating: all ten parameters 44/100
- 0Result and completion. Does not say what the result is
- 0Inputs and preconditions. Does not say what the process needs to start
- 0Progress reporting. Says nothing while it works
- 20When it triggers. No condition that starts the skill
- 30Running it twice. 4 mutating operations with no state check
- 40Consistency. Frontmatter name (Dockerfile Audit) differs from the folder (phy-dockerfile-audit)
- 55Failures and branches. 1 branches
- 60Tools and files. Uses tools (bash, web, python) that frontmatter does not declare
- 100Steps. 33 steps
- 100Execution cost. Instruction body is 2169 tokens
- low 10 top-level sections: this looks like several domains in one skill
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Output format is not stated: the model decides each time
- +2Single-language instructions
- +3Description length 446: enough signal without eating the budget
- +4Structure: 21 headings
- +3Step-by-step instructions: 33 items
- +4Has examples (5 code blocks)
- +3All 1 scripts are documented
- +1License stated
Quality base 70; lint remarks subtract, signals add up to 100. Result: 70.