Jiashu-Hu opened a new pull request, #15315:
URL: https://github.com/apache/datafusion/pull/15315

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   - Closes #[15298](https://github.com/apache/datafusion/issues/15298).
   
   ## Rationale for this change
   This update strengthens the security of GitHub workflows by substituting 
version tags with precise SHA hashes for actions. This modification reduces the 
risks tied to supply chain attacks by guaranteeing that only validated action 
versions are utilized in the workflows. This method adheres to industry best 
practices for safeguarding CI/CD pipelines.
   
   <!--
    Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.  
   -->
   
   ## What changes are included in this PR?
   
   Replaced version tags with specific SHA hashes for actions in the GitHub 
workflows.
   
   Original:
   
[dev.yml](https://github.com/apache/datafusion/blob/main/.github/workflows/dev.yml)
 -> - uses: korandoru/hawkeye@v6
   
[rust.yml](https://github.com/apache/datafusion/blob/main/.github/workflows/rust.yml)
 -> - uses: korandoru/hawkeye@v6
   
[setup-macos-aarch64-builder/action.yaml](https://github.com/apache/datafusion/blob/main/.github/actions/setup-macos-aarch64-builder/action.yaml)
 -> uses: Swatinem/rust-cache@v2
   
[setup-rust-runtime/action.yaml](https://github.com/apache/datafusion/blob/main/.github/actions/setup-rust-runtime/action.yaml)
 -> uses: mozilla-actions/sccache-action@v0.0.4
   
   Update:
   
[dev.yml](https://github.com/apache/datafusion/blob/main/.github/workflows/dev.yml)
 -> - uses: korandoru/hawkeye@dd74178a96f27b1121447c6b4a4ccfce180d5bf7
   
[rust.yml](https://github.com/apache/datafusion/blob/main/.github/workflows/rust.yml)
 -> - uses: korandoru/hawkeye@dd74178a96f27b1121447c6b4a4ccfce180d5bf7
   
[setup-macos-aarch64-builder/action.yaml](https://github.com/apache/datafusion/blob/main/.github/actions/setup-macos-aarch64-builder/action.yaml)
 -> uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
   
[setup-rust-runtime/action.yaml](https://github.com/apache/datafusion/blob/main/.github/actions/setup-rust-runtime/action.yaml)
 -> uses: uses: 
mozilla-actions/sccache-action@2e7f9ec7921547d4b46598398ca573513895d0bd
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ## Are these changes tested?
   Yes, the changes are tested to ensure that the GitHub workflows function 
correctly with the specified SHA hashes.
   Where I got this Hash:
   korandoru/hawkeye@dd74178a96f27b1121447c6b4a4ccfce180d5bf7:
   
   This is implemented in v6 of the original GitHub Action, but it redirects to 
v6.0.1. Consequently, I’ve bound the hash to v6.0.1 here for consistency and 
security.
   
   
https://github.com/korandoru/hawkeye/commit/dd74178a96f27b1121447c6b4a4ccfce180d5bf7
   <img width="655" alt="image" 
src="https://github.com/user-attachments/assets/f4ce0107-4bd4-42fb-a0b6-11e9b568f6fd";
 />
   
   
   Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6:
   
   This is implemented in v2 of the original GitHub Action, but it redirects to 
v2.7.8. Consequently, I’ve bound the hash to v2.7.8 here for consistency and 
security.
   
   
https://github.com/Swatinem/rust-cache/commit/9d47c6ad4b02e050fd481d890b2ea34778fd09d6
   <img width="655" alt="image" 
src="https://github.com/user-attachments/assets/af1c38df-c034-495a-affb-d9251ade2b19";
 />
   
   
   mozilla-actions/sccache-action@2e7f9ec7921547d4b46598398ca573513895d0bd:
   
   
https://github.com/mozilla-actions/sccache-action/commit/2e7f9ec7921547d4b46598398ca573513895d0bd
   This is implemented in v0.0.4 of the original GitHub Action, so that I just 
bound the hash to v0.0.4 here for consistency and security.
   
   <img width="659" alt="image" 
src="https://github.com/user-attachments/assets/098cc6a1-2713-4dfe-8ddf-4f6118eabdfe";
 />
   
   
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   ## Are there any user-facing changes?
   No, all of that is under github action
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to