Dockerfile Audit

io.github.UnbearableDev由 GitHub 账号 UnbearableDev 发布v1.0.0更新于 Oct 24, 2026

Hadolint-grade Dockerfile audit — 19 checks: secrets, privileges, supply chain, hygiene.

发布方自己的服务:audit.domains - Domain Valuation

已验证Streamable HTTP可网页运行云端与基础设施开发者工具安全与监控

概览

AI 生成的概览

远程 MCP 服务器,用于审计 Dockerfile 的安全、基础镜像、指令、效率与密钥问题,返回按严重程度排序的发现及修复建议。

可以做什么
  • 对粘贴的 Dockerfile 内容或 HTTPS 链接执行完整审计,可按最低严重程度过滤
  • 检查基础镜像的 :latest 标签、缺少摘要固定和不受信任的镜像仓库
  • 检查指令写法,如 CMD/ENTRYPOINT 形式、ADD 与 COPY 的取舍、已弃用的 MAINTAINER
  • 检查安全问题:root 用户、sudo、chmod 777、curl|bash、ENV 中硬编码密钥、缺少 HEALTHCHECK
  • 检查效率与密钥:apt/pip 缓存清理,以及名称疑似密钥的 ARG
  • 按类别浏览完整检查清单
适用场景
适合在提交或发布 Dockerfile 之前让助手做一次审查,或解释并修复以 root 运行、基础镜像未固定版本等具体加固问题。它属于静态规则检查,并非对镜像做实时漏洞扫描。
运行要求
远程 streamable HTTP 端点,无需本地安装。需要 Apify API 令牌,通过 Authorization 请求头以 bearer 形式发送。审计可接受粘贴内容或 HTTPS 链接(抓取超时 5 秒、最多 3 次重定向);Dockerfile 上限 200 KB,会话闲置 5 分钟后超时。
安装前请注意
按事件计费:每次审计或检查调用 0.02 美元,清单查询 0.005 美元,重复调用会产生费用。Apify API 令牌属于敏感凭据。Dockerfile 内容或链接会发送到第三方 Apify 托管服务,而粘贴的文件本身可能含有审计要标记的硬编码密钥。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Dockerfile Audit,将其添加到工作区。
  2. 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.UnbearableDev%2Fdockerfile-audit/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "dockerfile-audit": {
      "type": "http",
      "url": "https://unbearable-dev--dockerfile-audit.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

Dockerfile Security & Quality Audit

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

Built by Unbearable Labs. Pay-per-event pricing — only billed when a tool is actually called.


Available on

  • Apify Actor Store — primary, metered usage (PPE)
  • MCPize — pending submission
  • MCP.so — pending submission
  • PulseMCP — pending submission
  • Smithery — pending submission
  • Glama — pending submission

Newsletter: Unbearable TechTips Weekly · All Actors: 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

ToolPurpose
audit_dockerfile(dockerfile_content? | dockerfile_url?, min_severity='low')Run all checks
check_base_image(...)FROM/tag/digest/registry checks only
check_instructions(...)CMD form, ADD vs COPY, MAINTAINER, etc.
check_security(...)USER, sudo, chmod 777, curl|bash, hardcoded secrets, HEALTHCHECK
check_efficiency(...)apt cache hygiene, pip caching
check_secrets(...)ARG with secret-pattern names
list_checks(category?)Browse the full check catalog

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

Check catalog (v1: 18 checks across 5 categories)

IDCategorySeverityTitle
DFA-001base_imagemediumImage uses :latest tag or no tag
DFA-002base_imageinfoNo SHA256 digest pin on FROM
DFA-003base_imagemediumUntrusted registry
DFA-010instructionslowCMD in shell form
DFA-011instructionslowENTRYPOINT in shell form
DFA-012instructionsinfoMAINTAINER instruction is deprecated
DFA-013instructionsmediumADD used where COPY would suffice
DFA-020securitymediumNo USER directive (runs as root)
DFA-021securityhighUSER root set explicitly
DFA-022securityhighsudo invoked in RUN
DFA-023securityhighchmod 777 in RUN
DFA-024securitymediumcurl|bash pattern in RUN
DFA-025securityhighHardcoded secret in ENV
DFA-027securitylowNo HEALTHCHECK
DFA-030efficiencylowapt-get update without install
DFA-031efficiencylowapt-get install without --no-install-recommends
DFA-032efficiencylowpip install without --no-cache-dir
DFA-040secretsmediumARG with secret-pattern name

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

Pricing

EventUSD
Any audit / check_* tool call$0.02
list_checks discovery$0.005

Example response (truncated)

json
{  "summary": {    "total_findings": 6,    "by_severity": {"high": 2, "medium": 2, "low": 2, "info": 0}  },  "findings": [    {      "id": "DFA-021",      "category": "security",      "severity": "high",      "instruction": "USER",      "line_number": 3,      "title": "USER root set explicitly",      "description": "...",      "remediation": "Switch to a non-root UID after any root-required RUN steps.",      "fix_dockerfile_snippet": "USER 10001:10001",      "references": ["CIS-Docker-4.1"]    }  ]}

Connecting from Claude Desktop

json
{  "mcpServers": {    "dockerfile-audit": {      "transport": "streamable-http",      "url": "https://YOUR-ACTOR-URL.apify.actor/mcp"    }  }}

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: docker-compose-audit)

Sibling MCPs from Unbearable Labs

Source / contact

Issues and ideas: [email protected] or the GitHub org UnbearableDev.

来源:README.md,提交 6a17768

工具

0
该服务器需要 API 密钥等凭据,因此 SourceWeft 无法在没有凭据的情况下读取其工具,也未收录。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。

其他 Audit 集成