dockerfile

dockerfile is a skill for Claude Code, Codex from andypitcher/ponytail-sec. It costs 51 tokens per session (363 once invoked), scanned A, original, MIT.

A strict checklist for reviewing Dockerfiles, the recipes used to build container images. It checks how images are built, what they contain, and whether dependencies can be reproduced.

In plain words
What is it for?
Use it to check non-root runtime users, multi-stage builds, lean production images, pinned base images, and lockfiles or other fixed dependency inputs.
Why use it?
It gives a clear pass-or-fail result for common image-build security and reproducibility problems.

Skill for Claude CodeCodex

Part of the ponytail-sec plugin — 4 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/andypitcher/ponytail-sec/dockerfile
Any agent
npx skills add andypitcher/ponytail-sec --skill dockerfile
Clone the repo
git clone --depth 1 https://github.com/andypitcher/ponytail-sec

Made for: Claude Code, Codex.

Or install ponytail-sec, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dockerfile

README.md
[![agentmods](https://agentmods.dev/badge/skills/andypitcher/ponytail-sec/dockerfile.svg)](https://agentmods.dev/skills/andypitcher/ponytail-sec/dockerfile)
Your own site
<a href="https://agentmods.dev/skills/andypitcher/ponytail-sec/dockerfile"><img src="https://agentmods.dev/badge/skills/andypitcher/ponytail-sec/dockerfile.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 363 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00051 $0.00363
Opus 5 $0.00026 $0.00181
Sonnet 5 $0.00010 $0.00073
Haiku 4.5 $0.00005 $0.00036

Measured 4d ago against content hash 6381a3e07e43, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dockerfile scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dockerfile/SKILL.md · 50 lines

What it actually says

Ask once before enforcing:

Enforce dockerfile skill? (yes / no)

If no: stop.

If yes: inspect locally. Do not web-search by default. Web-search only if the user asks or the Dockerfile uses a platform feature whose semantics are unknown.

Contract

Return exactly one line:

  • OK
  • NOT_OK: RULE, RULE

No severity. No advisory text. No maybes. If a rule cannot be verified, it is not OK.

Rules

All rules are mandatory.

  • NON_ROOT — final image must set USER to a non-root user or numeric UID that is not 0.
  • MULTI_STAGE — production Dockerfile must use more than one FROM and copy only the runtime result into the final stage.
  • LEAN_FINAL — final stage must not install or retain package managers, compilers, build tools, caches, or test tooling.
  • PIN_BASE — every FROM must be pinned to a non-floating tag or digest; no latest, no untagged images. Digest wins.
  • REPRO_DEPS — dependency installation must use reproducible inputs: lockfile, hash-pinned requirements, vendor directory, or equivalent. Raw manifest-only installs are not OK.

Output examples

OK

NOT_OK: NON_ROOT, PIN_BASE, REPRO_DEPS

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 50 lines · 51 tokens per session scan A 6381a3e07e43

Subscribe to this mod's changes

dockerfile is a skill published in the GitHub repository andypitcher/ponytail-sec (8 stars, last pushed 5d ago), licensed MIT. It adds 51 tokens to every session and 363 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

prowler-compliance

Creates, syncs, audits and manages Prowler compliance frameworks end-to-end. Covers the two supported JSON schemas (universal multi-provider and legacy per-provider), the SDK model tree (legacy attribute classes, universal ComplianceFramework, ConfigRequirements guardrails), output formatters (legacy per-framework +…

prowler-cloud/prowler · 227 tokens

prowler-attack-paths-query

Creates Prowler Attack Paths openCypher queries using the Cartography schema as the source of truth for node labels, properties, and relationships. Covers Prowler-specific additions (Internet node, ProwlerFinding, internal isolation labels), $provideruid scoping, and list-property item nodes with typed HAS edges that…

prowler-cloud/prowler · 97 tokens

django-migration-psql

Reviews Django migration files for PostgreSQL best practices specific to Prowler. Trigger: When creating migrations, running makemigrations/pgmakemigrations, reviewing migration PRs, adding indexes or constraints to database tables, modifying existing migration files, or writing data backfill migrations. Always use…

prowler-cloud/prowler · 96 tokens

django-drf

Django REST Framework patterns. Trigger: When implementing generic DRF APIs (ViewSets, serializers, routers, permissions, filtersets). For Prowler API specifics (RLS/RBAC/Providers), also use prowler-api.

prowler-cloud/prowler · 51 tokens

postgresql-indexing

PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing…

prowler-cloud/prowler · 108 tokens

prowler-api

Prowler API patterns: RLS, RBAC, providers, Celery tasks. Trigger: When working in api/ on models/serializers/viewsets/filters/tasks involving tenant isolation (RLS), RBAC, or provider lifecycle.

prowler-cloud/prowler · 53 tokens