Skip to content

Security fix pined dependency #5659

Merged
cheyang merged 1 commit intofluid-cloudnative:masterfrom
Pikabooboo:pin_dep
Feb 4, 2026
Merged

Security fix pined dependency #5659
cheyang merged 1 commit intofluid-cloudnative:masterfrom
Pikabooboo:pin_dep

Conversation

@Pikabooboo
Copy link
Collaborator

Fix pin dependency security issue

Ⅰ. Describe what this PR does

Fix pined dependency

Ⅱ. Does this pull request fix one issue?

None

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅳ. Describe how to verify it

Automatic test pipeline

Ⅴ. Special notes for reviews

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Pikabooboo, 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 addresses a security concern by explicitly pinning the version and verifying the integrity of the rustup installer within the addons/3fs/dev-guide/Dockerfile. By introducing ARG variables for the rustup version and its SHA256 checksum, the build process now ensures that a known and trusted version of the Rust toolchain installer is used, enhancing the overall security and reproducibility of the build environment.

Highlights

  • Rustup Version Pinning: The rustup installer version is now explicitly pinned to 1.27.1 using an ARG variable in the Dockerfile, ensuring a consistent and known version is used.
  • SHA256 Checksum Parameterization: The SHA256 checksum for the rustup-init script is now defined as an ARG variable, RUSTUP_INIT_SHA256, and dynamically used in the sha256sum -c - command for robust integrity verification.
  • Enhanced Security and Reproducibility: These changes improve the security posture by ensuring a specific, verified version of rustup is always installed, mitigating potential supply chain risks and enhancing build reproducibility.

🧠 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.

Changelog
  • addons/3fs/dev-guide/Dockerfile
    • Added ARG declarations for RUSTUP_VERSION (set to 1.27.1) and RUSTUP_INIT_SHA256 (with its corresponding checksum).
    • Modified the RUN command for Rust installation to utilize the newly defined ARG variables for the rustup-init download URL and SHA256 verification, replacing hardcoded values.
Activity
  • The pull request was created by Pikabooboo with the title "Security fix pined dependency" and description "Fix pin dependency security issue".
  • The PR description indicates that no specific issue is being fixed, stating "None" for issue tracking.
  • Verification of the changes is expected to be handled by an "Automatic test pipeline".
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.

Copy link
Contributor

@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 aims to enhance security by pinning the rustup-init dependency to a specific version in the Dockerfile and implementing checksum verification. However, a critical syntax error (a trailing backslash) in a comment inadvertently causes the entire Rust installation and verification block to be skipped during the Docker build process, silently negating the intended security improvements. Additionally, there's a minor suggestion to improve the clarity of a comment in the Dockerfile.

# Install Rust
RUN wget -O rustup-init "https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init" && \
echo "f39939f3c83a31eda563840394548455a095842de8467556748c55a9346a4959 *rustup-init" | sha256sum -c - && \
# Install Rust\
Copy link
Contributor

Choose a reason for hiding this comment

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

security-medium medium

The trailing backslash \ on this comment line is critical. In a Dockerfile, a backslash acts as a line continuation character, even within comments. This causes the subsequent RUN command (lines 27-31), which is responsible for Rust installation and security-critical checksum verification, to be treated as part of the comment and skipped. Consequently, the intended security fix is silently bypassed, and Rust is neither installed nor verified. Removing this backslash is essential to ensure the security measures are correctly applied.

# Install Rust

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.33%. Comparing base (ff0e62d) to head (577f525).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5659   +/-   ##
=======================================
  Coverage   59.32%   59.33%           
=======================================
  Files         444      444           
  Lines       30540    30540           
=======================================
+ Hits        18119    18122    +3     
+ Misses      10917    10915    -2     
+ Partials     1504     1503    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Fix pin dependency security issue
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 3, 2026

Copy link
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@fluid-e2e-bot
Copy link

fluid-e2e-bot bot commented Feb 4, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

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

@cheyang cheyang merged commit e6e130c into fluid-cloudnative:master Feb 4, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants