Merged
Conversation
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Fix tests after v0.2.9
| CRI_DOCKERD_URL="https://github.com/Mirantis/cri-dockerd/releases/download/v${CRI_DOCKERD_VERSION}/cri-dockerd-${CRI_DOCKERD_VERSION}.${CRI_DOCKERD_ARCH}.tgz" | ||
|
|
||
| # Download and install cri-dockerd | ||
| curl -L ${CRI_DOCKERD_URL} | sudo tar xzv -C /usr/local/bin --strip-components=1 |
Collaborator
There was a problem hiding this comment.
Problem: Security vulnerability in curl command execution. The command downloads and directly pipes to tar without verifying the package integrity.
Suggested Change: Add checksum verification before extracting the downloaded package to prevent potential supply chain attacks.
Severity (1 - 4): 4 - CRITICAL
Line: 83
Suggested change
| curl -L ${CRI_DOCKERD_URL} | sudo tar xzv -C /usr/local/bin --strip-components=1 | |
| curl -L ${CRI_DOCKERD_URL} -o /tmp/cri-dockerd.tgz && echo "${CRI_DOCKERD_SHA256} /tmp/cri-dockerd.tgz" | sha256sum --check && sudo tar xzv -f /tmp/cri-dockerd.tgz -C /usr/local/bin --strip-components=1 && rm /tmp/cri-dockerd.tgz |
Generated by Claude 3.5 Sonnet
| if !strings.Contains(out, "CRI_DOCKERD_VERSION=\"0.3.17\"") { | ||
| t.Errorf("template output missing cri-dockerd version: %s", out) | ||
| } | ||
| if !strings.Contains(out, "curl -L ${CRI_DOCKERD_URL} | sudo tar xzv -C /usr/local/bin --strip-components=1") { |
Collaborator
There was a problem hiding this comment.
Problem: Direct curl and pipe to sudo command is potentially unsafe as it downloads and executes content from the internet without verification.
Suggested Change: Should include checksum verification of downloaded content before execution.
Severity (1 - 4): 4 - CRITICAL
Line: 64
Suggested change
| if !strings.Contains(out, "curl -L ${CRI_DOCKERD_URL} | sudo tar xzv -C /usr/local/bin --strip-components=1") { | |
| if !strings.Contains(out, "curl -L ${CRI_DOCKERD_URL} -o cri-dockerd.tar.gz && echo \"${CRI_DOCKERD_SHA256} cri-dockerd.tar.gz\" | sha256sum -c && sudo tar xzf cri-dockerd.tar.gz -C /usr/local/bin --strip-components=1") |
Generated by Claude 3.5 Sonnet
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.
No description provided.