-
Notifications
You must be signed in to change notification settings - Fork 14
feat: update pipeline components to use latest universal image #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,8 +9,8 @@ | |
| # Schema: | ||
| # - allowed_images: exact image strings | ||
| # - allowed_image_patterns: list of regex patterns matched against the full image | ||
| allowed_images: | ||
| - 'quay.io/opendatahub/odh-training-th04-cpu-torch29-py312-rhel9:cpu-3.3' | ||
| - 'quay.io/opendatahub/odh-th06-cpu-torch291-py312:odh-3.4' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Tag-based references in touched files:"
rg -n 'odh-th06-cpu-torch291-py312:odh-3\.4' \
scripts/validate_base_images/base_image_allowlist.yaml \
components/data_processing/dataset_download/component.py \
components/deployment/kubeflow_model_registry/component.py \
components/training/finetuning/lora/component.py \
components/training/finetuning/osft/component.py \
components/training/finetuning/sft/component.py
echo
echo "Digest-pinned references in touched files (expected after fix):"
rg -n '`@sha256`:' \
scripts/validate_base_images/base_image_allowlist.yaml \
components/data_processing/dataset_download/component.py \
components/deployment/kubeflow_model_registry/component.py \
components/training/finetuning/lora/component.py \
components/training/finetuning/osft/component.py \
components/training/finetuning/sft/component.py || trueRepository: opendatahub-io/pipelines-components Length of output: 950 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Locate allowlist loader + validator:"
rg -n "load_base_image_allowlist|is_valid_base_image|validate_base_images\.py" -S \
scripts/validate_base_images || true
echo
echo "Show implementation details (if present):"
rg -n "def load_base_image_allowlist|def is_valid_base_image" -S \
scripts/validate_base_images/validate_base_images.py || true
echo
echo "Print the allowlist-loading snippet area (around matched lines):"
rg -n "load_base_image_allowlist" -n scripts/validate_base_images/validate_base_images.py -C 3 || trueRepository: opendatahub-io/pipelines-components Length of output: 8766 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Find lib/base_image implementation files:"
fd -a "base_image*" scripts/validate_base_images -t f
echo
echo "Locate load_base_image_allowlist + is_valid_base_image definitions:"
rg -n "def load_base_image_allowlist|def is_valid_base_image" -S \
scripts/validate_base_images/lib || true
echo
echo "Show the relevant implementation blocks (around definitions):"
for f in $(rg -l "def load_base_image_allowlist|def is_valid_base_image" -S scripts/validate_base_images/lib); do
echo "---- $f ----"
rg -n "def load_base_image_allowlist|def is_valid_base_image" -n "$f" -C 3
done
echo
echo "Check tests for digest usage/behavior:"
rg -n "`@sha256`:|digest|digests" scripts/validate_base_images/tests/test_validate_base_images.py -n || trueRepository: opendatahub-io/pipelines-components Length of output: 686 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Search for BaseImageAllowlist / load_base_image_allowlist definitions across repo:"
rg -n "BaseImageAllowlist|load_base_image_allowlist|is_valid_base_image" -S . || true
echo
echo "Show where base_image.py lives (if any):"
fd -i "base_image.py" . || true
echo
echo "Search for '`@sha256`:' handling in code:"
rg -n "`@sha256`:|digest(s)?|sha256" -S . || true
echo
echo "Inspect allowlist matcher logic by opening candidate file(s):"
for f in $(rg -l "load_base_image_allowlist|is_valid_base_image" -S .); do
echo "---- $f ----"
sed -n '1,220p' "$f" | sed -n '1,220p' || true
doneRepository: opendatahub-io/pipelines-components Length of output: 50392 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== scripts/validate_base_images/base_image_allowlist.yaml (top) ==="
sed -n '1,120p' scripts/validate_base_images/base_image_allowlist.yaml
echo
echo "=== scripts/lib/base_image.py: show load_base_image_allowlist + matcher ==="
sed -n '1,260p' scripts/lib/base_image.py
echo
echo "=== scripts/lib/base_image.py: show is_valid_base_image ==="
sed -n '260,420p' scripts/lib/base_image.py
echo
echo "=== scripts/validate_base_images/tests/test_validate_base_images.py: digest-related assertions ==="
rg -n "sha256:|digest" scripts/validate_base_images/tests/test_validate_base_images.py || true
echo
echo "=== scripts/validate_base_images/tests/test_validate_base_images.py: allowlist parsing behavior ==="
rg -n "load_base_image_allowlist|BaseImageAllowlist|allowlist" scripts/validate_base_images/tests/test_validate_base_images.py -n | head -n 80Repository: opendatahub-io/pipelines-components Length of output: 21121 Pin allowlisted base images to immutable digests (CWE-494, major). The validator allows base images via exact string match / regex match only ( Exploit scenario: the registry retags Remediation code allowed_images:
- - 'quay.io/opendatahub/odh-th06-cpu-torch291-py312:odh-3.4'
+ - 'quay.io/opendatahub/odh-th06-cpu-torch291-py312@sha256:<approved_digest>'Update the
to Also remove/replace the tag-based Verify each finding against current code. Fix only still-valid issues, skip the In |
||
| - 'registry.access.redhat.com/ubi9/python-311:latest' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think 'registry.access.redhat.com/ubi9/python-311:latest' should be removed?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I will put it back. Should had ask about it before removing. |
||
| allowed_image_patterns: | ||
| - '^ghcr\.io/kubeflow/.*$' | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.