YAML for Docker Image Ops

View as Markdown

Scan, push and promote Docker images, with optional delayed mirroring (quarantine) for supply-chain protection.

YAML parameters for Docker Image Ops

PARAMETERS
srcrequiredImageOpsSrcYaml
Source image to scan and/or copy. Use registry ACTION to take the image built by a previous action.
typerequiredstring

Value: DOCKER_IMAGE_OPS

actionrequiredstring
Unique identifier for the action within the pipeline.
pushImageOpsPushYaml
Destination to copy the image to. Omit to only scan. Set quarantine (days) for delayed mirroring.
scanImageOpsScanYaml
Trivy scan configuration (scanners, severities, ignore rules). Omit to skip scanning.
trigger_timestring enum
Specifies when the action should be executed. ON_SUCCESS actions run after every successful run, also one ended by an EARLY_EXIT action.
Allowed enum:
ON_EVERY_EXECUTION,
ON_SUCCESS,
ON_FAILURE,
ON_BACK_TO_SUCCESS,
ON_WARNING,
ON_WAIT_FOR_APPROVE,
ON_TERMINATE
loopstring[]
Names of the variables to loop over (IMAGES, not $IMAGES and not a value). The action runs once for each item of the value, and once for each combination of items when several variables are listed. The variable value is split into items by new lines, or by commas when it has no new lines (a single-line JSON object or key=value pairs stays one item). An item that is a JSON object or key=value pairs also sets one variable per key, named <VARIABLE>_<key>; an item that starts with EXTRACT: sets them as plain <key>.
run_only_on_first_failureboolean
When true, the action runs only on the first failure instead of on each failure. Used only when trigger_time is ON_FAILURE.
disabledboolean
When set to true the action is disabled. By default it is set to false.
timeoutinteger
The timeout in seconds. It cannot exceed the action time limit of the workspace plan; a higher value is rejected.
ignore_errorsboolean
If set to true the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions.
retry_intervalinteger
Delay time between auto retries in seconds.
retry_countinteger
Number of retries if the action fails.

Constraints: ≤ 10

run_nextstring enum
Defines whether the action should run in parallel with the next one.
Allowed enum:
WAIT_ON_SUCCESS,
IN_SOFT_PARALLEL,
IN_HARD_PARALLEL
trigger_conditionsTriggerConditionYaml[]
The list of trigger conditions to meet so that the action can be triggered.
variablesVariableYaml[]
The list of variables you can use in the action.

Outputs for Docker Image Ops

OUTPUT VARIABLES
BUDDY_ACTION_TRIVY_OUTPUT_FILE
Path to the main result file of this action, relative to the pipeline filesystem root.

Example: .buddy/output/trivy/report_12_a1b2c3d.jsonl

BUDDY_ACTION_QUARANTINE_DIGEST
Digest of the pushed image. Exported when quarantine is configured for the action.

Example: sha256:24d2c1b5e6f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8

OUTPUT FILES
.buddy/output/trivy/report_$BUDDY_RUN_ID_$BUDDY_ACTION_RUN_HASH.jsonl
Trivy scan results, one JSON document per line. Written when a scan is configured.

Last modified on Nov 19, 2026

YAML examples for Docker Image Ops

Scan an image produced by the previous action

yaml
- action: "Docker image ops"
  type: "DOCKER_IMAGE_OPS"
  src:
    docker_registry: "ACTION"
    from_action: "Build Docker image"
  scan:
    scanners:
      - "VULNERABILITY"
      - "SECRET"
    severities:
      - "CRITICAL"
      - "HIGH"

Scan the image built by the immediately preceding action

yaml
- action: "Docker image ops"
  type: "DOCKER_IMAGE_OPS"
  src:
    docker_registry: "ACTION"
  scan:
    scanners:
      - "VULNERABILITY"
    severities:
      - "CRITICAL"
      - "HIGH"

Scan and push an image built by a previous action

yaml
- action: "Docker image ops"
  type: "DOCKER_IMAGE_OPS"
  src:
    docker_registry: "ACTION"
    from_action: "Build Docker image"
  push:
    docker_registry: "ARTIFACT_REGISTRY"
    name: "my-app"
    tag: "1.0.0"
  scan:
    scanners:
      - "VULNERABILITY"
    severities:
      - "CRITICAL"
      - "HIGH"

Scan and promote an image to a new tag in the same registry

yaml
- action: "Docker image ops"
  type: "DOCKER_IMAGE_OPS"
  src:
    docker_registry: "DOCKER_HUB"
    integration: "docker-hub"
    image: "my-org/my-app"
    tag: "staging"
  push:
    docker_registry: "DOCKER_HUB"
    integration: "docker-hub"
    name: "my-org/my-app"
    tag: "production"
  scan:
    scanners:
      - "VULNERABILITY"
    severities:
      - "CRITICAL"

Delayed mirror with quarantine, scan and ignore rules

yaml
- action: "Docker image ops"
  type: "DOCKER_IMAGE_OPS"
  src:
    docker_registry: "DOCKER_HUB"
    image: "node"
    tag: "20"
  push:
    docker_registry: "AMAZON_ECR"
    region: "us-east-1"
    integration: "my-ecr"
    quarantine: 14
  scan:
    scanners:
      - "VULNERABILITY"
      - "SECRET"
      - "MISCONFIGURATION"
    severities:
      - "CRITICAL"
      - "HIGH"
    fail_only_on_fixable: true
    ignore:
      vulnerabilities:
        - id: "CVE-2023-45853"
          statement: "No upstream fix available, accepted risk"
          expires_at: "2026-09-21"
          paths:
            - "vendor/"