Browse operation contracts · Static machine index · OpenAPI release reference · Build manifest

Bounded Dockerfile static audit

Inspect one supplied Dockerfile for 14 bounded static risk and hygiene signals with line ranges, rule IDs, redacted evidence and remediation. Understands continuations, escape directives, literal stage inheritance and JSON forms. No execution, image/CVE scan, fetch, variable evaluation or safe-image verdict; heredocs, ONBUILD and custom frontends are rejected.

supply-chain · Operation ID: dockerfile-audit

Choose this operation when

Outside this profile

Exact release references

Static JSON contract · Markdown reference · Fixed example response

Complete input schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "profile": {
      "type": "string",
      "const": "bounded-dockerfile-static-v1"
    },
    "dockerfile": {
      "type": "string",
      "minLength": 1,
      "maxLength": 65536
    }
  },
  "required": [
    "profile",
    "dockerfile"
  ],
  "additionalProperties": false
}

Complete output-envelope schema

{
  "type": "object",
  "required": [
    "operation",
    "version",
    "result",
    "provenance"
  ],
  "properties": {
    "operation": {
      "const": "dockerfile-audit",
      "type": "string"
    },
    "version": {
      "const": "0.29.0",
      "type": "string"
    },
    "result": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "profile": {
          "type": "string",
          "const": "bounded-dockerfile-static-v1"
        },
        "analysis": {
          "type": "string",
          "const": "bounded-static-observations"
        },
        "inputBytes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 65536
        },
        "physicalLines": {
          "type": "integer",
          "minimum": 1,
          "maximum": 2048
        },
        "instructionCount": {
          "type": "integer",
          "minimum": 1,
          "maximum": 512
        },
        "finalStageIndex": {
          "type": "integer",
          "minimum": 0,
          "maximum": 63
        },
        "stages": {
          "minItems": 1,
          "maxItems": 64,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "index": {
                "type": "integer",
                "minimum": 0,
                "maximum": 63
              },
              "fromLine": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "endLine": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "baseKind": {
                "type": "string",
                "enum": [
                  "external-image",
                  "prior-stage",
                  "scratch",
                  "variable-dependent"
                ]
              },
              "digestPinned": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "runtimeUser": {
                "type": "string",
                "enum": [
                  "explicit-root",
                  "explicit-nonroot",
                  "named-user-unknown",
                  "base-unknown",
                  "variable-dependent"
                ]
              },
              "userSourceLine": {
                "anyOf": [
                  {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "index",
              "fromLine",
              "endLine",
              "baseKind",
              "digestPinned",
              "runtimeUser",
              "userSourceLine"
            ],
            "additionalProperties": false
          }
        },
        "rulesEvaluated": {
          "minItems": 14,
          "maxItems": 14,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "DF001",
              "DF002",
              "DF003",
              "DF004",
              "DF005",
              "DF006",
              "DF007",
              "DF008",
              "DF009",
              "DF010",
              "DF011",
              "DF012",
              "DF013",
              "DF014"
            ]
          }
        },
        "findings": {
          "maxItems": 128,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "ruleId": {
                "type": "string",
                "enum": [
                  "DF001",
                  "DF002",
                  "DF003",
                  "DF004",
                  "DF005",
                  "DF006",
                  "DF007",
                  "DF008",
                  "DF009",
                  "DF010",
                  "DF011",
                  "DF012",
                  "DF013",
                  "DF014"
                ]
              },
              "severity": {
                "type": "string",
                "enum": [
                  "info",
                  "warning"
                ]
              },
              "category": {
                "type": "string",
                "enum": [
                  "reproducibility",
                  "security-configuration",
                  "build-hygiene",
                  "portability"
                ]
              },
              "confidence": {
                "type": "string",
                "enum": [
                  "syntactic",
                  "heuristic"
                ]
              },
              "line": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "endLine": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "stageIndex": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "evidence": {
                "type": "string",
                "maxLength": 180
              },
              "message": {
                "type": "string",
                "maxLength": 300
              },
              "remediation": {
                "type": "string",
                "maxLength": 400
              }
            },
            "required": [
              "ruleId",
              "severity",
              "category",
              "confidence",
              "line",
              "endLine",
              "stageIndex",
              "evidence",
              "message",
              "remediation"
            ],
            "additionalProperties": false
          }
        },
        "summary": {
          "type": "object",
          "properties": {
            "totalFindings": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "returnedFindings": {
              "type": "integer",
              "minimum": 0,
              "maximum": 128
            },
            "bySeverity": {
              "type": "object",
              "properties": {
                "info": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "warning": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "info",
                "warning"
              ],
              "additionalProperties": false
            },
            "truncated": {
              "type": "boolean"
            },
            "variableDependentInstructions": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "totalFindings",
            "returnedFindings",
            "bySeverity",
            "truncated",
            "variableDependentInstructions"
          ],
          "additionalProperties": false
        },
        "limitations": {
          "minItems": 1,
          "maxItems": 12,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 350
          }
        }
      },
      "required": [
        "profile",
        "analysis",
        "inputBytes",
        "physicalLines",
        "instructionCount",
        "finalStageIndex",
        "stages",
        "rulesEvaluated",
        "findings",
        "summary",
        "limitations"
      ],
      "additionalProperties": false
    },
    "provenance": {
      "type": "object",
      "required": [
        "inputSha256",
        "outputSha256",
        "deterministic",
        "externalRequests"
      ],
      "properties": {
        "inputSha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "outputSha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "deterministic": {
          "const": true
        },
        "externalRequests": {
          "const": 0
        }
      }
    }
  },
  "additionalProperties": false
}

Fixed example

One accepted fixed example, not a custom-input trial. No operation runs when this static page is requested.

Example input

{
  "profile": "bounded-dockerfile-static-v1",
  "dockerfile": "FROM node:22 AS build\nWORKDIR /app\nCOPY . .\nRUN npm ci\nFROM node:22-slim\nCOPY --from=build /app /app\nUSER 1000:1000\nENTRYPOINT [\"node\", \"/app/server.js\"]\n"
}

Example response

{
  "operation": "dockerfile-audit",
  "version": "0.29.0",
  "result": {
    "profile": "bounded-dockerfile-static-v1",
    "analysis": "bounded-static-observations",
    "inputBytes": 154,
    "physicalLines": 8,
    "instructionCount": 8,
    "finalStageIndex": 1,
    "stages": [
      {
        "index": 0,
        "fromLine": 1,
        "endLine": 4,
        "baseKind": "external-image",
        "digestPinned": false,
        "runtimeUser": "base-unknown",
        "userSourceLine": null
      },
      {
        "index": 1,
        "fromLine": 5,
        "endLine": 8,
        "baseKind": "external-image",
        "digestPinned": false,
        "runtimeUser": "explicit-nonroot",
        "userSourceLine": 7
      }
    ],
    "rulesEvaluated": [
      "DF001",
      "DF002",
      "DF003",
      "DF004",
      "DF005",
      "DF006",
      "DF007",
      "DF008",
      "DF009",
      "DF010",
      "DF011",
      "DF012",
      "DF013",
      "DF014"
    ],
    "findings": [
      {
        "ruleId": "DF002",
        "severity": "info",
        "category": "reproducibility",
        "confidence": "syntactic",
        "line": 1,
        "endLine": 1,
        "stageIndex": 0,
        "evidence": "FROM external image: explicit tag, no sha256 digest",
        "message": "External base image has a tag but no digest pin.",
        "remediation": "Consider pinning a verified digest for reproducibility; arrange updates so pinning does not indefinitely prevent security fixes."
      },
      {
        "ruleId": "DF007",
        "severity": "info",
        "category": "build-hygiene",
        "confidence": "syntactic",
        "line": 3,
        "endLine": 3,
        "stageIndex": 0,
        "evidence": "COPY includes a literal whole-context source; ignore rules not inspected",
        "message": "A local COPY or ADD source includes the context root or a whole-context wildcard.",
        "remediation": "Review .dockerignore and prefer the required paths. Context contents and ignore rules were not supplied, so accidental inclusion is not established."
      },
      {
        "ruleId": "DF002",
        "severity": "info",
        "category": "reproducibility",
        "confidence": "syntactic",
        "line": 5,
        "endLine": 5,
        "stageIndex": 1,
        "evidence": "FROM external image: explicit tag, no sha256 digest",
        "message": "External base image has a tag but no digest pin.",
        "remediation": "Consider pinning a verified digest for reproducibility; arrange updates so pinning does not indefinitely prevent security fixes."
      }
    ],
    "summary": {
      "totalFindings": 3,
      "returnedFindings": 3,
      "bySeverity": {
        "info": 3,
        "warning": 0
      },
      "truncated": false,
      "variableDependentInstructions": 0
    },
    "limitations": [
      "Static observations only: no build, command execution, filesystem access, network requests, registry lookup, vulnerability scan or safety verdict.",
      "Base-image metadata, runtime overrides, build arguments, named contexts, .dockerignore and source files are not available. Variable expressions are not evaluated, including ARG defaults.",
      "Shell programs and package-install commands are opaque. No shell correctness, package pinning or script security analysis is performed.",
      "Recognized instructions without a listed rule are retained for structure only. This is not a complete Docker parser, compiler or build-success check.",
      "Heredocs, ONBUILD, custom/labs frontends, unknown instructions/flags, ambiguous terminal escapes and malformed supported forms are rejected rather than partially interpreted.",
      "Findings are potential issues to review. Secret checks use names only; values, source snippets, image references and URLs are not echoed. A report with no findings does not establish safety.",
      "The final stage is the last textual FROM; --target selection is not an input. Rules inspect all textual stages, including stages a build might skip. Docker #check suppressions do not suppress this profile's rules."
    ]
  },
  "provenance": {
    "inputSha256": "da6f61385220259b52108217ce4cdf1b3ba1cca6ab6e6fc3a888dfc8b17095dc",
    "outputSha256": "590de60e78b37fc2620732486c55052fcc81de4436e975f6161100084cbcab00",
    "deterministic": true,
    "externalRequests": 0
  }
}

Bounds and precision

JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.

{
  "global": {
    "requestBytes": 131072,
    "responseBytes": 524288,
    "jsonDepth": 32,
    "jsonNodes": 20000,
    "requestsPerMinute": 60,
    "paidAttemptsPerMinute": 20,
    "idempotencyHours": 24
  },
  "operation": {
    "inputCodeUnits": 65536,
    "dockerfileUtf8Bytes": 65536,
    "physicalLines": 2048,
    "instructions": 512,
    "instructionCodeUnits": 8192,
    "stages": 64,
    "findings": 128,
    "outputBytes": 180000,
    "rules": 14,
    "variableEvaluation": "none",
    "sourceEcho": "none",
    "externalRequests": 0,
    "shellAnalysis": "none"
  }
}

Complete schemas, descriptions and cross-field validation may impose additional limits.

Proposed price and protocol definitions

{
  "unit": "one successful operation call",
  "proposedNominalUsd": "0.003",
  "sixDecimalTokenBaseUnits": "3000",
  "subscription": false,
  "includesPayerWalletOrNetworkFees": false,
  "liveQuoteVerified": false,
  "condition": "Actual SDK challenge is authoritative only within the caller's explicit authorization; configured six-decimal token peg is an operator assertion, not a conversion guarantee."
}

Protocol definitions: x402, mpp. MPP uses Tempo charge. Paid MCP execution is unsupported. All runtime readiness is not evaluated in this build.

API path templates, not endpoints on this documentation host

{
  "x402": "/v1/x402/dockerfile-audit",
  "mpp": "/v1/mpp/dockerfile-audit"
}

Required headers

{
  "Content-Type": "application/json",
  "Idempotency-Key": "random 16–128 character operation identifier"
}

Actual SDK challenge amount, asset, network, recipient and wallet costs must pass independent authorization. Preserve identical key, body, protocol and credential on retries; on PAYMENT_UNCERTAIN stop and reconcile.

Execution profile and provider conditions

{
  "deterministic": true,
  "externalRequests": 0,
  "maxExternalRequests": 0,
  "resultSnapshotPersisted": false,
  "fixedExampleIsIllustrativeSnapshot": false,
  "requiresPayment": true,
  "supportsMcpExecution": false
}

Deterministic supplied-input operation with no external requests or stored request/result bodies. Payment infrastructure retains payment metadata and hashes.

Failure handling

Declared requirements

Before any paid call, refresh the live operation contract and POST the complete bounded budgeted plan to the separate API's /preflight. Unknown requirements block selection; compatible preflight is not permission to spend.