# K8s & Dockerfile Linter

> K8s & Dockerfile Linter is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-20).

Lints Dockerfile or Kubernetes YAML content and returns a list of rule violations with severity, line number, and description.

## Facts

- Endpoint: GET https://fastx402.tools/k8s-dockerfile-lint?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/k8s-dockerfile-linter-4608d70b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UG1WmFqKHNDXVFe1__HU3

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 k8s-dockerfile-linter-4608d70b
```

Example prompt: Can you lint this Dockerfile for me and flag any best practice violations? Here's the content: FROM ubuntu:latest\nRUN apt-get install curl\nUSER root — scan it as a dockerfile type.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically lint Dockerfile or Kubernetes YAML content without requiring a developer account or API key, paying only $0.002 per scan via USDC micropayment. Ideal for CI/CD automation pipelines, agent-driven code review workflows, or ad-hoc container configuration audits where a lightweight, no-signup linting check is needed.

## Known failure modes

- Missing 'content' or 'type' query parameter returns an error
- Invalid 'type' value (not 'dockerfile' or 'kubernetes') may return an error or no violations
- Malformed YAML/Dockerfile that cannot be parsed may return zero violations or an error
- Payment failure via x402 results in 402 status and no scan result
- Very large files may time out or be rejected

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

A JSON object containing the content type scanned, an array of violations (each with line number, rule ID, human-readable message, and severity level), and a total violation count. Severity levels indicate criticality (e.g. high, medium, low).

## Request schema (JSON Schema)

```json
{
 "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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "content",
      "type"
     ],
     "properties": {
      "type": {
       "type": "string",
       "description": "Content type: 'dockerfile' or 'kubernetes'"
      },
      "content": {
       "type": "string",
       "description": "Dockerfile or Kubernetes YAML content to scan"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "type": {
       "type": "string"
      },
      "violations": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "line": {
          "type": "integer"
         },
         "rule": {
          "type": "string"
         },
         "message": {
          "type": "string"
         },
         "severity": {
          "type": "string"
         }
        }
       }
      },
      "violation_count": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "type": "dockerfile",
  "violations": [
   {
    "line": 1,
    "rule": "no-latest-tag",
    "message": "Image uses 'latest' tag which is not reproducible",
    "severity": "high"
   },
   {
    "line": 3,
    "rule": "no-root-user",
    "message": "Container runs as root user (USER root or no USER directive)",
    "severity": "medium"
   }
  ],
  "violation_count": 2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/k8s-dockerfile-linter-4608d70b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
