# Dockerfile Security & Size Linter

> Dockerfile Security & Size Linter is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-20).

Analyzes a Dockerfile for security vulnerabilities and image-size inefficiencies, returning per-line findings with severity ratings and a score.

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/dockerfile/lint?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dockerfile-security-size-linter-7735bd89
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_w_J8VNs1RCcL5F7hW9NNW

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability dockerfile-security-size-linter-7735bd89
```

Example prompt: Can you check this Dockerfile for security problems and size issues — look for things like running as root, unpinned base images, secrets baked into ENV, or apt cache left in layers, and give me a score?

## When to prefer this

Choose this endpoint when you need fast, automated Dockerfile security and size analysis prior to building or shipping a container image. Ideal for CI/CD pipelines, pre-commit hooks, or one-off audits where you want per-line findings with severity and fix guidance rather than a full container scanning suite. Best for Dockerfiles under 8,000 characters.

## Known failure modes

- Dockerfile content exceeds 8,000 character limit — request rejected
- Missing required 'dockerfile' parameter — validation error returned
- Dockerfile is valid but empty — may return zero findings with a perfect score
- False negatives for complex multi-stage builds with unusual syntax
- Payment required (x402) if free call quota of 25 is exhausted

## How this service works

Check a Dockerfile (up to 8,000 characters) for common security and image-size problems: unpinned or :latest base images, running as root, piping downloads into a shell, sensitive values baked into ENV or ARG, ADD from URLs, apt and pip cache left in layers, sudo, chmod 777 and an exposed SSH port. Returns each finding with its line, a severity and a fix, plus a score. Use before building or shipping an image.

## Output

Returns a numeric overall score, a count of findings by severity (low/medium/high), and an array of findings each containing the line number, rule name, human-readable message, and severity level. Covers issues like unpinned base images, root execution, shell-piped downloads, secrets in ENV/ARG, URL-based ADD, uncleaned apt/pip caches, sudo, chmod 777, and exposed SSH port.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "dockerfile"
 ],
 "properties": {
  "dockerfile": {
   "type": "string",
   "description": "Dockerfile contents (up to 8,000 characters)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "score": {
   "type": "number"
  },
  "counts": {
   "type": "object",
   "properties": {
    "low": {
     "type": "number"
    },
    "high": {
     "type": "number"
    },
    "medium": {
     "type": "number"
    }
   }
  },
  "findings": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "line": {
      "type": "number"
     },
     "rule": {
      "type": "string"
     },
     "message": {
      "type": "string"
     },
     "severity": {
      "type": "string"
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dockerfile-security-size-linter-7735bd89/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
