DL3037 - Pin versions in zypper install

Description

zypper install commands should pin package versions so the build result is reproducible.

Goals

Specification

  1. Iterate over each RUN instruction and split it into shell command segments.
  2. For segments that begin with zypper install or zypper in:
  3. Collect package arguments excluding flags (tokens beginning with -).
  4. Ensure every package argument contains a version indicator (=, >=, >, <=, <) or ends with .rpm.
  5. If any package lacks a version specifier, emit DL3037 at the line of the RUN instruction with the message Specify version with `zypper install -y <package>=<version>`.

(c) 2025 Asymmetric Effort, LLC. scaldwell@asymmetric-effort.com Asymmetric Effort logo