Skip to content

Conversation

@debarshiray
Copy link
Member

@gemini-code-assist
Copy link

Summary of Changes

Hello @debarshiray, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on preparing the 0.0.99.4 stable branch for release, primarily by integrating a critical security fix related to CVE-2025-65637. The changes ensure the toolbox script correctly handles local time configuration, which was previously prone to error. Additionally, system tests have been refined to enhance their reliability and adaptability across diverse execution environments, ensuring consistent validation of the application's behavior.

Highlights

  • Security Fix: Addressed a security vulnerability (CVE-2025-65637 / GHSA-4f99-4q7p-p3gh) by correcting the readlink command usage in the toolbox script to properly capture the target of the /etc/localtime symlink, ensuring correct timezone handling.
  • Test Compatibility: Updated system tests (test/system/102-list.bats and test/system/104-run.bats) to be more robust and compatible with varying output from different bats and bash versions, preventing test failures due to environmental differences.
  • Release Preparation: Prepared the stable branch for the 0.0.99.4 release, incorporating the aforementioned security fix and test improvements.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Detected by https://www.shellcheck.net/:
  Line 1255:
  if ! localtime_target=$(readlink /etc/localtime >/dev/null 2>&3) \
                        ^-- SC2327 (warning): This command substitution
                            will be empty because the command's output
                            gets redirected away.
                                                  ^-- SC2328 (error):
                                                      This redirection
                                                      takes output away
                                                      from the command
                                                      substitution.

See:
https://www.shellcheck.net/wiki/SC2327
https://www.shellcheck.net/wiki/SC2328

Fallout from 8db414d

containers#1701
containers#1739
containers#1744
(cherry picked from commit d32dd5d)
(cherry picked from commit a67f614)
@debarshiray debarshiray force-pushed the wip/rishi/prepare-release-0.0.99.4 branch from 313f0fc to 014b5ef Compare January 27, 2026 13:32
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request prepares a stable branch for a new release. It includes a critical security fix for GHSA-4f99-4q7p-p3gh, which I've confirmed is correctly implemented. The vulnerability in the toolbox script that could allow writing to arbitrary host paths is now resolved. Additionally, I've reviewed the updates to the BATS test files. While they correctly adapt the tests for different dependency versions, I've suggested some minor improvements to enhance the clarity of test failure messages. Overall, this is a solid update, with the security fix being the most important part.

I am having trouble creating individual review comments. Click here to see my feedback.

toolbox (1255)

security-critical critical

Redirecting readlink's stdout to /dev/null causes the localtime_target variable to always be empty. This makes the following check always true, leading to an unconditional and potentially insecure symlink creation (GHSA-4f99-4q7p-p3gh). The command substitution should capture the output of readlink.

test/system/102-list.bats (74-78)

medium

The assert command provides a cryptic failure message (e.g., [ 1 -eq 2 ] failed). Using assert_equal from bats-assert would provide a more descriptive failure message if the assertion fails, improving test clarity.

  if check_bats_version 1.10.0; then
    assert_equal "${#lines[@]}" 2
  else
    assert_equal "${#lines[@]}" 3
  fi

test/system/104-run.bats (359-366)

medium

The else block is intended to fail the test when the number of lines in stderr is not 2 or 3. Using fail with a descriptive message would be more explicit and provide clearer output on failure than the current assert command.

  if [ ${#stderr_lines[@]} -eq 2 ]; then
    assert_line --index 1 "Error: failed to invoke command /etc in container $(get_latest_container_name)"
  elif [ ${#stderr_lines[@]} -eq 3 ]; then
    assert_line --index 1 "bash: line 1: exec: /etc: cannot execute: Is a directory"
    assert_line --index 2 "Error: failed to invoke command /etc in container $(get_latest_container_name)"
  else
    fail "Expected 2 or 3 lines in stderr, but got ${#stderr_lines[@]}"
  fi

@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/45063a3e5b464f5f962e96615edc0124

✔️ unit-test SUCCESS in 1m 45s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 18s
system-test-fedora-rawhide FAILURE in 11m 19s
system-test-fedora-37 NODE_FAILURE Node request 200-0008146629 failed in 0s
system-test-fedora-36 NODE_FAILURE Node request 200-0008146630 failed in 0s

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jan 27, 2026
Until Bats 1.10.0, 'run --keep-empty-lines' had a bug where it counted
the trailing newline on the last line as a separate line [1].  However,
Bats 1.10.0 is only available in Fedora >= 39 and is absent from Fedoras
37 and 38.

[1] Bats commit 6648e2143bffb933
    bats-core/bats-core@6648e2143bffb933
    bats-core/bats-core#708

containers#1352
containers#1744
(backported from commit f716b23)
@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/646c9dffc2ab4c559475df2814d6a769

✔️ unit-test SUCCESS in 1m 46s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 11s
system-test-fedora-rawhide FAILURE in 10m 39s
system-test-fedora-37 NODE_FAILURE Node request 200-0008146656 failed in 0s
system-test-fedora-36 NODE_FAILURE Node request 200-0008146657 failed in 0s

debarshiray and others added 2 commits January 27, 2026 15:21
Until Bats 1.10.0, 'run --keep-empty-lines' had a bug where it counted
the trailing newline on the last line as a separate line [1].  However,
Bats 1.10.0 is only available in Fedora >= 39 and is absent from Fedoras
37 and 38.

[1] Bats commit 6648e2143bffb933
    bats-core/bats-core@6648e2143bffb933
    bats-core/bats-core#708

containers#1352
containers#1387
containers#1744
(backported from commits f716b23 and
 7abfa70)
Bash 5.3.0 changed the error messages shown by its exec built-in [1].

With Bash 5.2.37:
  $ exec /etc
  bash: /etc: Is a directory
  bash: exec: /etc: cannot execute: Is a directory

With Bash 5.3.0:
  $ exec /etc
  bash: /etc: Is a directory

The 'assert' function cannot directly handle compound commands.  So,
those need to be wrapped in 'bash -c "..."' [2].

[1] Bash commit b8c60bc9ca365f82
    See how exec_builtin() handles EX_NOEXEC and EISDIR from
    shell_execve() to avoid printing a duplicate error message.
    https://cgit.git.savannah.gnu.org/cgit/bash.git/commit/?id=b8c60bc9ca365f82

[2] https://github.com/bats-core/bats-assert

containers#1688
containers#1699
containers#1739
containers#1744
(backported from commit 6c98db6)
(cherry picked from commit 0090893)
@debarshiray debarshiray force-pushed the wip/rishi/prepare-release-0.0.99.4 branch from 881a86d to 9a24ed3 Compare January 27, 2026 14:24
@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/85b3782228404a8f806f2e290cc7ccaf

✔️ unit-test SUCCESS in 1m 51s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 26s
system-test-fedora-rawhide FAILURE in 10m 42s
system-test-fedora-37 NODE_FAILURE Node request 200-0008146733 failed in 0s
system-test-fedora-36 NODE_FAILURE Node request 200-0008146734 failed in 0s

With the recent expansion of the test suite, it's necessary to increase
the timeout for all Fedora nodes to prevent the CI from timing out.

containers#1387
containers#1744
(cherry picked from commit b8138e0)
Fedora 37 reached End of Life on 15th November 2023:
https://docs.fedoraproject.org/en-US/releases/eol/

containers#1418
containers#1744
(cherry picked from commit 9c2b5e9)
@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/58993110dcaf4f2f981547e61f7faf4e

✔️ unit-test SUCCESS in 1m 56s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 22s
✔️ system-test-fedora-rawhide SUCCESS in 11m 17s
system-test-fedora-37 NODE_FAILURE Node request 200-0008146768 failed in 0s
system-test-fedora-36 NODE_FAILURE Node request 200-0008146769 failed in 0s

With the recent expansion of the test suite, it's necessary to increase
the timeout for the Fedora 38 and 39 nodes to prevent the CI from timing
out.

containers#1445
containers#1739
containers#1744
(cherry picked from commit ce66b0b)
(cherry picked from commit 754feea)
Stable branches for old Toolbx releases are only about the toolbox(1)
executable.  It doesn't make sense to have old "stable" versions of the
image definitions, because the registries will have only one set of
images built from the definitions in the main branch, and all supported
versions of toolbox(1) must work with them.

containers#1739
containers#1744
(cherry picked from commit f2b2a18)
@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/3f1cbf039f0646f6ae3814946c1053ce

✔️ unit-test SUCCESS in 1m 52s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 22s
✔️ system-test-fedora-rawhide SUCCESS in 10m 37s
system-test-fedora-38 NODE_FAILURE Node request 200-0008147028 failed in 0s
system-test-fedora-37 NODE_FAILURE Node request 200-0008147029 failed in 0s
system-test-fedora-36 NODE_FAILURE Node request 200-0008147030 failed in 0s

@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/276cf05f158240e38cbc1877dd34ae60

✔️ unit-test SUCCESS in 2m 32s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 44s
✔️ system-test-fedora-rawhide SUCCESS in 13m 16s
system-test-fedora-38 NODE_FAILURE Node request 200-0008147063 failed in 0s
system-test-fedora-37 NODE_FAILURE Node request 200-0008147064 failed in 0s

@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/bbc921f72c6047ac87564a8f3261735a

✔️ unit-test SUCCESS in 1m 59s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 19s
✔️ system-test-fedora-rawhide SUCCESS in 13m 49s
✔️ system-test-fedora-39 SUCCESS in 19m 04s
system-test-fedora-38 NODE_FAILURE Node request 200-0008147082 failed in 0s
system-test-fedora-37 NODE_FAILURE Node request 200-0008147083 failed in 0s

@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/78b0e255c9b240afa4ae5ca836c9865d

✔️ unit-test SUCCESS in 2m 01s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 56s
✔️ system-test-fedora-rawhide SUCCESS in 17m 11s
✔️ system-test-fedora-39 SUCCESS in 23m 06s
system-test-fedora-38 NODE_FAILURE Node request 200-0008147114 failed in 0s
system-test-fedora-37 NODE_FAILURE Node request 200-0008147115 failed in 0s

@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/8f8d2f97d5b64f488ae489bb16201e73

✔️ unit-test SUCCESS in 2m 00s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 50s
✔️ system-test-fedora-rawhide SUCCESS in 13m 44s
✔️ system-test-fedora-39 SUCCESS in 17m 58s
system-test-fedora-38 NODE_FAILURE Node request 200-0008147149 failed in 0s

This is meant to make the project more searchable on the Internet.  More
and more people have been pointing out that "toolbox" is terribly
difficult to search for, and it's impossible to find any decent
Internet real estate by that name.

containers#1399
containers#1740
containers#1744
(backported from commit c3403da)
(backported from commit e7043ea)
@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/0c9473255cc24228897b12e025b5ad02

✔️ unit-test SUCCESS in 1m 48s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 4m 08s
✔️ system-test-fedora-rawhide SUCCESS in 11m 05s
✔️ system-test-fedora-39 SUCCESS in 17m 08s
system-test-fedora-38 NODE_FAILURE Node request 200-0008147194 failed in 0s

@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/8b2789bcbbc54e4aa7d0e51a2e076e73

✔️ unit-test SUCCESS in 1m 50s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 35s
✔️ system-test-fedora-rawhide SUCCESS in 11m 53s
✔️ system-test-fedora-39 SUCCESS in 17m 40s
system-test-fedora-38 NODE_FAILURE Node request 200-0008147216 failed in 0s

@softwarefactory-project-zuul
Copy link

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/755c3cf575064ecaac443463e951e4b9

✔️ unit-test SUCCESS in 1m 55s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 05s
✔️ system-test-fedora-rawhide SUCCESS in 11m 21s
✔️ system-test-fedora-39 SUCCESS in 16m 27s
system-test-fedora-38 NODE_FAILURE Node request 200-0008147757 failed in 0s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants