Skip to content

NO-JIRA: Fix cryptoscan rootless podman config for microshift - #83098

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
pacevedom:fix-cryptoscan-podman
Aug 7, 2026
Merged

NO-JIRA: Fix cryptoscan rootless podman config for microshift#83098
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
pacevedom:fix-cryptoscan-podman

Conversation

@pacevedom

@pacevedom pacevedom commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Updates the OpenShift MicroShift CI rebase-cryptoscan-src image build.
  • Makes /etc/passwd and /etc/group group-readable.
  • Sets BUILDAH_ISOLATION=chroot for the container build environment.
  • These changes support cryptoscan image builds with Podman.

Make /etc/passwd and /etc/group group-writable so the crypto scan
script can create a passwd entry for the arbitrary CI UID. Set
BUILDAH_ISOLATION=chroot to avoid user-namespace issues inside CI pods.

Without these, newuidmap fails with "Invalid argument" because the
entrypoint cannot register the running user in /etc/subuid.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 7, 2026
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The rebase-cryptoscan-src image build now makes /etc/passwd and /etc/group group-readable. It also sets BUILDAH_ISOLATION=chroot in the container environment.

Changes

MicroShift cryptoscan build

Layer / File(s) Summary
Cryptoscan image build setup
ci-operator/config/openshift/microshift/openshift-microshift-main.yaml
The image setup adds group-readable permissions for /etc/passwd and /etc/group, and sets BUILDAH_ISOLATION=chroot. It retains the existing /etc/subuid and /etc/subgid setup.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested labels: do-not-merge/work-in-progress

Suggested reviewers: eslutsky, pmtk

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR changes only one YAML image definition; the patch contains no Ginkgo test declarations or test-title changes.
Test Structure And Quality ✅ Passed The PR changes only one YAML image-build file; no Ginkgo test source or Ginkgo constructs changed, so the test-structure requirements are not applicable.
Microshift Test Compatibility ✅ Passed The pull request changes only a MicroShift YAML image-build step. It adds no Ginkgo tests or OpenShift API/resource references requiring compatibility checks.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request changes only a YAML image build; it adds no Ginkgo e2e tests or test declarations requiring SNO compatibility review.
Topology-Aware Scheduling Compatibility ✅ Passed The change only updates a CI image Dockerfile: group permissions and BUILDAH_ISOLATION. It adds no deployment, controller, replica, affinity, topology, selector, taint, or PDB constraints.
Ote Binary Stdout Contract ✅ Passed The PR changes only a YAML image definition: permissions and BUILDAH_ISOLATION. It adds no OTE binary or process-level stdout/logging code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR changes only one YAML image definition; it adds no Ginkgo e2e tests and introduces no IPv4 assumptions or external connectivity.
No-Weak-Crypto ✅ Passed The PR adds only permission changes and BUILDAH_ISOLATION=chroot. The added lines contain no weak algorithms, crypto implementation, or secret comparison.
Container-Privileges ✅ Passed The changed image definition has no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation setting; it switches runtime to USER 1000.
No-Sensitive-Data-In-Logs ✅ Passed The patch only changes /etc/passwd and /etc/group permissions and sets BUILDAH_ISOLATION=chroot; it adds no logging or sensitive-data output.
Title check ✅ Passed The title clearly describes the cryptoscan rootless Podman configuration changes made for MicroShift.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from eslutsky and pmtk August 7, 2026 12:14
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 7, 2026
@pacevedom

Copy link
Copy Markdown
Contributor Author

/pj-rehearse >

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@pacevedom: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@pacevedom

Copy link
Copy Markdown
Contributor Author

/pj-rehearse ?

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@pacevedom: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@pacevedom: job(s): > either don't exist or were not found to be affected, and cannot be rehearsed

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@pacevedom: job(s): ? either don't exist or were not found to be affected, and cannot be rehearsed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@ci-operator/step-registry/openshift/microshift/rebase/cryptoscan/openshift-microshift-rebase-cryptoscan-commands.sh`:
- Around line 16-17: Update the MicroShift fetch in the rebase cryptoscan script
to use a reviewed, immutable commit SHA from a trusted remote instead of the
mutable fca/add-ushift-cbom branch, while preserving the subsequent FETCH_HEAD
checkout and existing secret-handling flow.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 9b326753-26ec-4470-8d13-8382516c40b5

📥 Commits

Reviewing files that changed from the base of the PR and between 514dd15 and b877806.

📒 Files selected for processing (2)
  • ci-operator/config/openshift/microshift/openshift-microshift-main.yaml
  • ci-operator/step-registry/openshift/microshift/rebase/cryptoscan/openshift-microshift-rebase-cryptoscan-commands.sh

Comment on lines +16 to +17
git fetch https://github.com/fracappa/microshift.git fca/add-ushift-cbom
git checkout FETCH_HEAD

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n -C 6 \
  'import-secret|pull-secret|fca/add-ushift-cbom|git fetch|git checkout|fetch_tools\.sh|rebase_job_entrypoint\.sh' \
  ci-operator/config/openshift/microshift/openshift-microshift-main.yaml \
  ci-operator/step-registry/openshift/microshift/rebase/cryptoscan/openshift-microshift-rebase-cryptoscan-commands.sh \
  ci-operator/step-registry/openshift/microshift/rebase/cryptoscan/openshift-microshift-rebase-cryptoscan-ref.yaml

Repository: openshift/release

Length of output: 4095


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== command script =="
cat -n ci-operator/step-registry/openshift/microshift/rebase/cryptoscan/openshift-microshift-rebase-cryptoscan-commands.sh

echo
echo "== ref yaml =="
cat -n ci-operator/step-registry/openshift/microshift/rebase/cryptoscan/openshift-microshift-rebase-cryptoscan-ref.yaml

echo
echo "== config references =="
rg -n -C 5 'openshift-microshift-rebase-cryptoscan|open_vault|cryptoscan|import-secret|pr-creds' ci-operator/config/openshift/microshift/openshift-microshift-main.yaml || true

echo
echo "== broader references to fork branch =="
rg -n 'fracappa|fca/add-ushift-cbom|add-ushift-cbom|microshift-rebase-cryptoscan' .

Repository: openshift/release

Length of output: 5760


🌐 Web query:

GitHub fracappa/microshift fca/add-ushift-cbom branch

💡 Result:

There is no public GitHub repository or branch named "fracappa/microshift" containing a branch "fca/add-ushift-cbom". Research into the GitHub profile of Francesco Cappa (GitHub username @fracappa), a Red Hat contributor, confirms that while he actively contributes to OpenShift-related repositories, he does not have a public repository titled "microshift" [1]. Public activity associated with his account shows contributions to upstream OpenShift repositories such as openshift/origin [2] and openshift-eng/two-node-toolbox [3], as well as various testing and installer-related projects [1][4], but none match the query provided. The term "CBOM" is commonly used in security contexts to refer to a Cryptography Bill of Materials [5], which is distinct from standard software engineering workflows for MicroShift, an optimized distribution of OpenShift Kubernetes for edge computing [6][7]. No record of a branch named "add-ushift-cbom" exists in the official OpenShift MicroShift repository (openshift/microshift) [8][6] or other accessible community repositories [7].

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

python3 - <<'PY'
import subprocess, urllib.request, json
print("curl availability:", subprocess.run(["command", "-v", "curl"], capture_output=True).returncode == 0)
try:
    print(subprocess.run(["curl", "-sI", "https://github.com/fracappa/microshift.git"], capture_output=True, text=True).stdout.splitlines()[:8])
except Exception as e:
    print("curl failed:", repr(e))
try:
    print(subprocess.run(["curl", "-fsSL", "https://github.com/fracappa/microshift.git/info/refs?service=git-receive-pack"], timeout=15, capture_output=True, text=True).stdout[:2000])
except subprocess.TimeoutExpired:
    print("curl info/refs timed out")
except Exception as e:
    print("curl info/refs failed:", repr(e))
try:
    req = urllib.request.Request(
        "https://github.com/fracappa/microshift.git/info/refs?service=git-receive-pack",
        headers={"User-Agent": "CodeRabbit verifier", "Host": "github.com", "Accept-Encoding": "identity"}
    )
    with urllib.request.urlopen(req, timeout=15) as resp:
        print("urllib info/refs status", resp.status, "url", resp.geturl())
        print(resp.read(2000).decode())
except Exception as e:
    print("urllib info/refs failed:", repr(e))
PY

echo "== exact remote text =="
sed -n '1,35p' ci-operator/step-registry/openshift/microshift/rebase/cryptoscan/openshift-microshift-rebase-cryptoscan-commands.sh

Repository: openshift/release

Length of output: 676


🌐 Web query:

GitHub raw commit SHA fracappa microshift fca/add-ushift-cbom

💡 Result:

A search of the openshift/microshift repository and relevant tooling indicates that there is no commit or pull request matching the specific identifier fca/add-ushift-cbom. It is possible that this reference is part of a private repository, a local branch, or a typo. While there are many commits in the openshift/microshift project related to CBOM (Cryptographic Bill of Materials) tools and general MicroShift development (e.g., [1]), none align with the requested string. If this is related to a specific development task, you may wish to verify the branch name or the repository where the commit was pushed.

Citations:


Pin the MicroShift checkout to a reviewed commit.

This script copies the pull secret into ${HOME}/.pull-secret.json before fetching github.com/fracappa/microshift.git fca/add-ushift-cbom and running scripts from that checkout. That branch should not remain mutable; pin the fetch to a reviewed commit from a trusted remote so reruns use the same source and secret-handling code path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ci-operator/step-registry/openshift/microshift/rebase/cryptoscan/openshift-microshift-rebase-cryptoscan-commands.sh`
around lines 16 - 17, Update the MicroShift fetch in the rebase cryptoscan
script to use a reviewed, immutable commit SHA from a trusted remote instead of
the mutable fca/add-ushift-cbom branch, while preserving the subsequent
FETCH_HEAD checkout and existing secret-handling flow.

Source: Coding guidelines

@pacevedom

Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-openshift-microshift-main-test-rebase

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@pacevedom: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@pacevedom
pacevedom force-pushed the fix-cryptoscan-podman branch from b877806 to 75d68ff Compare August 7, 2026 13:48
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@pacevedom pacevedom changed the title WIP: Fix cryptoscan podman NO-JIRA: Fix cryptoscan rootless podman config for microshift Aug 7, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 7, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@pacevedom: This pull request explicitly references no jira issue.

Details

In response to this:

Summary by CodeRabbit

  • Fixes the MicroShift cryptoscan image build for Podman by using chroot isolation and allowing group-readable access to /etc/passwd and /etc/group.
  • Updates the rebase step to use the fca/add-ushift-cbom branch from fracappa/microshift before running the cryptoscan setup.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 7, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@pacevedom: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-microshift-main-e2e-aws-ai-model-serving openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-footprint-and-performance openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-arm openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-arm-el10 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-arm-el9 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-c2cc openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-c2cc-arm openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-el10 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-el9 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-periodic-arm-el10 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-periodic-arm-el9 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-periodic-el10 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-periodic-el9 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-release-arm-el10 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-release-arm-el9 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-release-el10 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-release-el9 openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-upstream openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-bootc-upstream-arm openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-cache openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-cache-arm openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-periodic openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-periodic-arm openshift/microshift presubmit Ci-operator config changed
pull-ci-openshift-microshift-main-e2e-aws-tests-release openshift/microshift presubmit Ci-operator config changed

A total of 39 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs.

A full list of affected jobs can be found here

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@pacevedom

Copy link
Copy Markdown
Contributor Author

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@pacevedom: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Aug 7, 2026
@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@pacevedom: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/openshift/microshift/main/test-rebase b877806 link unknown /pj-rehearse pull-ci-openshift-microshift-main-test-rebase

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@fracappa fracappa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 7, 2026
@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fracappa, pacevedom

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit 15a9e0e into openshift:main Aug 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants