fix: kubectl download hardening from Copilot review#1342
Open
dholt wants to merge 1 commit intoNVIDIA:masterfrom
Open
fix: kubectl download hardening from Copilot review#1342dholt wants to merge 1 commit intoNVIDIA:masterfrom
dholt wants to merge 1 commit intoNVIDIA:masterfrom
Conversation
- Set executable mode on fetched kubectl binary (fetch doesn't preserve) - Add changed_when: false to kubectl version command for idempotency - Add SHA256 checksum verification for cross-platform kubectl download - Respect proxy_env for get_url in proxy environments Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Douglas Holt <dholt@nvidia.com>
There was a problem hiding this comment.
Pull request overview
This PR addresses Copilot review feedback from PR #1339, adding security hardening and operational improvements to the kubectl binary download and installation process. The changes ensure proper file permissions, idempotent runs, checksum verification for supply-chain security, and proxy environment support.
Changes:
- Set executable permissions on fetched kubectl binary (fetch module doesn't preserve permissions)
- Mark kubectl version check as non-changing for idempotent playbook runs
- Add SHA256 checksum verification for cross-platform kubectl downloads to prevent supply-chain attacks
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to PR #1339 addressing Copilot review feedback:
fetchdoesn't preserve permissions)changed_when: falsetokubectl versioncommand for idempotent runsproxy_envforget_urlin proxy environmentsTest plan
--tags localrun is idempotent (no spurious "changed" on kubectl version)🤖 Generated with Claude Code