# Dockerfile Security & Quality Audit (`unbearable_dev/dockerfile-audit`) Actor

Hadolint-grade Dockerfile audit, MCP-native. 18+ checks across 5 categories (base image, instructions, security, efficiency, secrets) with severity, line numbers, remediation, and fix snippets. Pay-per-event. Call from Claude Desktop, Cursor, n8n, or any MCP client. Built by Unbearable Labs.

- **URL**: https://apify.com/unbearable\_dev/dockerfile-audit.md
- **Developed by:** [Noel Himer](https://apify.com/unbearable_dev) (community)
- **Categories:** Developer tools, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 docker file audit calls

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Dockerfile Security & Quality Audit

> Hadolint-grade Dockerfile audit as an MCP server. 19 checks across 5 categories, every finding ships with severity, line number, remediation text, and a copy-paste Dockerfile snippet.

**Built by [Unbearable Labs](https://github.com/UnbearableDev). Free to use — bring your own Apify token.**

***

### Available on

- [Apify Actor Store](https://apify.com/unbearable_dev/dockerfile-audit) — primary
- [Smithery](https://smithery.ai/servers/unbearabledev/dockerfile-audit)

**Newsletter:** [Unbearable TechTips Weekly](https://unbearabletechtips.beehiiv.com) · **All Actors:** [github.com/UnbearableDev](https://github.com/UnbearableDev)

### What it does

Point any MCP-capable client (Claude Desktop, Cursor, n8n, Make, Zapier, custom agents) at this server, hand it a Dockerfile, get back a structured report:

- **Severity** — high / medium / low / info
- **Line number** — exact location in the file
- **Description** — what's wrong and why it matters
- **Remediation** — what to do about it
- **Fix snippet** — Dockerfile syntax you can paste directly

### Tools

| Tool | Purpose |
|------|---------|
|  | Run all checks |
|  | FROM/tag/digest/registry checks only |
|  | CMD form, ADD vs COPY, MAINTAINER, etc. |
|  | USER, sudo, chmod 777, curl|bash, hardcoded secrets, HEALTHCHECK |
|  | apt cache hygiene, pip caching |
|  | ARG with secret-pattern names |
|  | Browse the full check catalog |

Provide exactly one of  (paste the file) or  (HTTPS URL — e.g. GitHub raw).

### Example

Input:
ProgramFiles(x86)=C:\Program Files (x86)
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
asl.log=Destination=file
SENTRY-TRACE=06ea796177f94c4593621a741c6ed73e-9d252fe87994f826
SHELL=/bin/bash.exe
COREPACK\_ENABLE\_AUTO\_PIN=0
NUMBER\_OF\_PROCESSORS=12
PROCESSOR\_LEVEL=6
CLAUDE\_CODE\_EMIT\_TOOL\_USE\_SUMMARIES=false
CLAUDE\_CODE\_ENABLE\_ASK\_USER\_QUESTION\_TOOL=true
ACSvcPort=17532
AI\_AGENT=claude-code\_2-1-165\_agent
USERDOMAIN\_ROAMINGPROFILE=DESKTOP-UT0RIBG
CLAUDE\_CODE\_SESSION\_ID=f3773db0-14ba-4d13-a402-cb5b030e94c9
PROGRAMFILES=C:\Program Files
MSYSTEM=MINGW64
ChocolateyInstall=C:\ProgramData\chocolatey
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
CLAUDE\_EFFORT=high
OS=Windows\_NT
HOMEDRIVE=C:
USERDOMAIN=DESKTOP-UT0RIBG
CLAUDE\_CODE\_SDK\_HAS\_HOST\_AUTH\_REFRESH=1
PWD=/c/Users/noelh/Claude
USERPROFILE=C:\Users\noelh
OneDriveConsumer=C:\Users\noelh\OneDrive
NoDefaultCurrentDirectoryInExePath=1
CLAUDECODE=1
ALLUSERSPROFILE=C:\ProgramData
CommonProgramW6432=C:\Program Files\Common Files
HOME=/c/Users/noelh
USERNAME=noelh
CLAUDE\_AGENT\_SDK\_VERSION=0.3.165
GITHUB\_TOKEN=ghp\_QVmtN9kxhvJVm6cDvUv6xHSAYqK7Pm1AWZ8P
PLINK\_PROTOCOL=ssh
OneDrive=C:\Users\noelh\OneDrive
COMSPEC=C:\Windows\system32\cmd.exe
CLAUDE\_CODE\_DISABLE\_CRON=
APPDATA=C:\Users\noelh\AppData\Roaming
SYSTEMROOT=C:\Windows
ANTHROPIC\_BASE\_URL=https://api.anthropic.com
LOCALAPPDATA=C:\Users\noelh\AppData\Local
COMPUTERNAME=DESKTOP-UT0RIBG
TERM=xterm-256color
LOGONSERVER=\DESKTOP-UT0RIBG
CLAUDE\_CODE\_EXPERIMENTAL\_AGENT\_TEAMS=1
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
RlsSvcPort=22112
CLICKUP\_API\_TOKEN=pk\_4562450\_TIM2IE2O90NT3GJWKYL1LV7VQN2266L0
BESIEGE\_UNITY\_ASSEMBLIES=C:/Program Files/WindowsApps/SpiderlingStudios.5821136CAA5A2\_1.0.18.0\_x64\_\_a408ere9ra7h8/Besiege\_Data\Managed/
TEMP=C:\Users\noelh\AppData\Local\Temp
SHLVL=1
PROCESSOR\_REVISION=9e0a
GIT\_EDITOR=true
DriverData=C:\Windows\System32\Drivers\DriverData
COMMONPROGRAMFILES=C:\Program Files\Common Files
USE\_LOCAL\_OAUTH=
DISABLE\_AUTOUPDATER=1
EXEPATH=C:\Program Files\Git\bin
PROCESSOR\_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
CLAUDE\_CODE\_ENTRYPOINT=claude-desktop
NODE\_USE\_SYSTEM\_CA=1
API\_TIMEOUT\_MS=900000
MCP\_CONNECTION\_NONBLOCKING=true
CHROME\_CRASHPAD\_PIPE\_NAME=\\.\pipe\crashpad\_29500\_POUXYTDLVUULVKGG
HOMEPATH=\Users\noelh
CLAUDE\_CODE\_EXECPATH=C:\Users\noelh\AppData\Local\Packages\Claude\_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude-code\2.1.165\claude.exe
TMP=C:\Users\noelh\AppData\Local\Temp
PATH=/c/Users/noelh/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/noelh/bin:/c/Python314/Scripts:/c/Python314:/c/ProgramData/Oracle/Java/javapath:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files/Intel/WiFi/bin:/c/Program Files/Common Files/Intel/WirelessCommon:/c/Windows/SysWOW64:/c/Program Files/dotnet:/cmd:/c/Program Files/NVIDIA Corporation/NVIDIA App/NvDLISR:/c/Program Files/nodejs:/c/ProgramData/chocolatey/bin:/c/Program Files/Mullvad VPN/resources:/c/Program Files/GitHub CLI:/c/Program Files/Tailscale:/c/Users/noelh/AppData/Local/Microsoft/WindowsApps:/c/Users/noelh/AppData/Local/atom/bin:/c/Users/noelh/AppData/Local/Programs/Microsoft VS Code/bin:/c/Users/noelh/AppData/Roaming/npm:/c/Users/noelh/.local/bin:/c/Users/noelh/.dotnet/tools:/c/Users/noelh/AppData/Local/Microsoft/WinGet/Packages/Gyan.FFmpeg\_Microsoft.Winget.Source\_8wekyb3d8bbwe/ffmpeg-8.1.1-full\_build/bin:/c/Users/noelh/AppData/Local/Programs/Python/Python311:/c/Program Files/nodejs:/c/Python314:/mingw64/bin:/usr/bin/vendor\_perl:/usr/bin/core\_perl:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/skills-plugin/9458e948-904e-4e31-a5ee-0b93c13edac4/512bbb06-40f6-479b-95e1-2991562b4b71/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_019XQ3kYMHjpnY1RcxCZttGb/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_0155zZVATbJU3jHUmPP9NvMC/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_01XXJmxLXPEhPMmnxmrgntNw/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_01FTLa86dhbVJ3HB1LdHdhN7/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_014WxCYbLf7f3uw2isHFR9US/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_01KmRfL8EXGF3PeqMRzef1TR/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_012ABz1xjgtJYWKrcJkXW6ad/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_011v5h6QUzBZvas64y44XLhy/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_01Eeb9y5m4iFuY3yRtytYfdc/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_01AYHYqVLaZRH2Vi6aHgDwEw/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_01VyNDLNYUZHHyKf7A691D7V/bin:/c/Users/noelh/AppData/Roaming/Claude/local-agent-mode-sessions/512bbb06-40f6-479b-95e1-2991562b4b71/9458e948-904e-4e31-a5ee-0b93c13edac4/rpm/plugin\_01SfWJSiw6JtGbsuW75PKvPK/bin:/c/Users/noelh/.claude/plugins/cache/obsidian-skills/obsidian/1.0.1/bin:/c/Users/noelh/.claude/plugins/cache/claude-plugins-official/security-guidance/2.0.3/bin:/c/Users/noelh/.claude/plugins/cache/claude-plugins-official/code-review/71f9f2af276d/bin:/c/Users/noelh/.claude/plugins/cache/awesome-claude-plugins/debugger/1.0.0/bin:/c/Users/noelh/.claude/plugins/cache/awesome-claude-plugins/mcp-builder/9ef49d0f2a27/bin:/c/Users/noelh/.claude/plugins/cache/awesome-claude-plugins/artifacts-builder/9ef49d0f2a27/bin:/c/Users/noelh/.claude/plugins/cache/awesome-claude-plugins/bug-fix/1.0.0/bin:/c/Users/noelh/.claude/plugins/cache/awesome-claude-plugins/documentation-generator/1.0.0/bin:/c/Users/noelh/.claude/plugins/cache/awesome-claude-plugins/backend-architect/1.0.0/bin:/c/Users/noelh/.claude/plugins/cache/awesome-claude-plugins/frontend-design/9ef49d0f2a27/bin:/c/Users/noelh/.claude/plugins/cache/awesome-claude-plugins/senior-frontend/9ef49d0f2a27/bin:/c/Users/noelh/.claude/plugins/cache/awesome-claude-plugins/connect-apps/9ef49d0f2a27/bin:/c/Users/noelh/.claude/plugins/cache/awesome-claude-plugins/audit-project/3.7.2/bin:/c/Users/noelh/.claude/plugins/cache/awesome-claude-plugins/security-guidance/1.0.0/bin:/c/Users/noelh/.claude/plugins/cache/claude-plugins-official/cloudflare/1.0.0/bin
ProgramW6432=C:\Program Files
BESIEGE\_GAME\_ASSEMBLIES=C:/Program Files/WindowsApps/SpiderlingStudios.5821136CAA5A2\_1.0.18.0\_x64\_\_a408ere9ra7h8/Besiege\_Data\Managed/
BAGGAGE=sentry-environment=production,sentry-release=Claude%401.11187.4,sentry-public\_key=2f98127cbffe4740b1f767a2de77d23b,sentry-trace\_id=06ea796177f94c4593621a741c6ed73e,sentry-org\_id=1158394
WINDIR=C:\Windows
PROCESSOR\_ARCHITECTURE=AMD64
PUBLIC=C:\Users\Public
DISABLE\_MICROCOMPACT=1
SYSTEMDRIVE=C:
USE\_STAGING\_OAUTH=
CLAUDE\_CODE\_SDK\_HAS\_OAUTH\_REFRESH=1
ProgramData=C:\ProgramData
ChocolateyLastPathUpdate=134222221138500739
\_=/usr/bin/ENV
TOKEN=

Output:

### Check catalog (v1: 19 checks across 5 categories)

| ID | Category | Severity | Title |
|----|----------|----------|-------|
| DFA-001 | base\_image | medium | Image uses :latest tag or no tag |
| DFA-002 | base\_image | info | No SHA256 digest pin on FROM |
| DFA-003 | base\_image | medium | Untrusted registry |
| DFA-010 | instructions | low | CMD in shell form |
| DFA-011 | instructions | low | ENTRYPOINT in shell form |
| DFA-012 | instructions | info | MAINTAINER instruction is deprecated |
| DFA-013 | instructions | medium | ADD used where COPY would suffice |
| DFA-020 | security | medium | No USER directive (runs as root) |
| DFA-021 | security | high | USER root set explicitly |
| DFA-022 | security | high | sudo invoked in RUN |
| DFA-023 | security | high | chmod 777 in RUN |
| DFA-024 | security | medium | curl|bash pattern in RUN |
| DFA-025 | security | high | Hardcoded secret in ENV |
| DFA-027 | security | low | No HEALTHCHECK |
| DFA-030 | efficiency | low | apt-get update without install |
| DFA-031 | efficiency | low | apt-get install without --no-install-recommends |
| DFA-032 | efficiency | low | pip install without --no-cache-dir |
| DFA-040 | secrets | medium | ARG with secret-pattern name |

Use  to get the canonical, up-to-date catalog.

### Pricing

Free to use — hosted on Apify, bring your own Apify token.

### Connecting from Claude Desktop

### Limits

- **Dockerfile size:** 200 KB cap per audit
- **URL fetch:** 5s timeout, max 3 redirects, HTTPS only
- **Session timeout:** 5 minutes of inactivity

### What's NOT covered (yet)

- Live image vulnerability scanning (use Trivy / Grype for that)
- Multi-stage build optimization analysis (DFA-004 / DFA-005 — roadmapped)
- Compose-file audit (separate MCP: [](https://apify.com/unbearable_dev/docker-compose-audit))

### Sibling MCPs from Unbearable Labs

- **[](https://apify.com/unbearable_dev/docker-compose-audit)** — same pattern for
- **[](https://apify.com/unbearable_dev/k8s-manifest-audit)** — Kubernetes manifest security audit
- **[](https://apify.com/unbearable_dev/hu-postcode-validator)** — Hungarian postcode lookup

### Source / contact

Issues and ideas:  or the GitHub org [](https://github.com/UnbearableDev).

***

Built by Noel @ Unbearable Labs — more like this in the weekly newsletter: https://unbearabletechtips.beehiiv.com

# Actor input Schema

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("unbearable_dev/dockerfile-audit").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("unbearable_dev/dockerfile-audit").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call unbearable_dev/dockerfile-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,unbearable_dev/dockerfile-audit"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pA3MMGCeOfz765MdY/builds/bfFhxeYaoVPAXvqk3/openapi.json
