{"uid":"cap_TB9m2cXsL3JZMkHvOfxEi","slug":"dockerfile-linter-1de2193f","name":"Dockerfile Linter","description":"Lint a Dockerfile for security and best practice: unpinned or latest images, running as root, secrets in ENV/ARG, curl piped to sh, ADD of URLs, apt and pip caches, sudo, chmod 777, missing HEALTHCHECK. Scored.","url":"https://bess-x402.onrender.com/v1/dev/dockerfile-lint?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["dockerfile"],"properties":{"dockerfile":{"type":"string","description":"Dockerfile contents"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ezuQbDNWwA8JJOf4lu4Ol","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Lints a Dockerfile for security vulnerabilities and best-practice violations, returning scored findings across multiple checks.","exampleAgentPrompt":"Can you lint this Dockerfile for security issues and best practices — check for things like running as root, unpinned images, secrets in ENV, and missing HEALTHCHECK?\n\nFROM ubuntu:latest\nRUN apt-get install -y curl\nENV SECRET_KEY=abc123\nRUN curl https://example.com/setup.sh | sh","exampleUseCases":[{"title":"Pre-commit Dockerfile security gate","prompt":"Before I commit this Dockerfile to the repo, can you check it for security problems and best-practice violations — I want to know if it runs as root, uses unpinned images, or leaks secrets in ENV or ARG?\n\nFROM python:latest\nENV API_KEY=supersecret\nRUN pip install -r requirements.txt\nCMD [\"python\", \"app.py\"]"},{"title":"CI pipeline quality score check","prompt":"Run a lint and security score on this Dockerfile as part of our CI pipeline and tell me the overall score plus any findings:\n\nFROM node:18\nRUN apt-get install -y wget && wget https://example.com/install.sh | sh\nADD https://example.com/config.tar.gz /app/\nCMD [\"node\", \"server.js\"]"},{"title":"Dockerfile hardening audit for production","prompt":"Audit this Dockerfile for production readiness — flag anything dangerous like chmod 777, sudo, curl piped to shell, or a missing HEALTHCHECK, and give me a security score:\n\nFROM ubuntu:20.04\nRUN chmod 777 /app\nRUN sudo apt-get install -y python3\nEXPOSE 8080\nCMD [\"./start.sh\"]"}],"resultDescription":"A scored report of Dockerfile issues, with findings across checks including: unpinned or 'latest' base images, running as root, secrets exposed in ENV/ARG, curl-piped-to-shell patterns, ADD with URLs, uncleaned apt/pip caches, use of sudo, chmod 777 permissions, and missing HEALTHCHECK directives. Each finding is categorized by severity or best-practice type, and an aggregate score is returned.","failureModes":["Missing 'dockerfile' query parameter returns an error","Malformed or empty Dockerfile content may produce no findings or an error","Very large Dockerfiles may hit request size limits","Service unavailability on Render free tier (cold starts or downtime)","Payment failure for x402 micropayment may block the request"],"whenToPreferThis":"Use this endpoint when you need a fast, scored, multi-check security and best-practice audit of a Dockerfile without setting up a local linting tool like Hadolint. It is especially useful in CI/CD pipelines, pre-commit hooks, or agent workflows where you want a programmatic score and structured findings for a single Dockerfile. Prefer this over general code review endpoints when Docker-specific checks (unpinned images, HEALTHCHECK, curl-to-shell) are the priority.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:34:30.158Z","isFirstParty":false,"canonicalSlug":"dockerfile-linter-1de2193f"}