Skip to content

prep for v0.2.10#372

Merged
ArangoGutierrez merged 2 commits intorelease-0.2from
main
May 27, 2025
Merged

prep for v0.2.10#372
ArangoGutierrez merged 2 commits intorelease-0.2from
main

Conversation

@ArangoGutierrez
Copy link
Collaborator

No description provided.

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
@ArangoGutierrez ArangoGutierrez self-assigned this May 27, 2025
@ArangoGutierrez ArangoGutierrez merged commit 9e677ea into release-0.2 May 27, 2025
12 checks passed
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
Copy link
Collaborator

Choose a reason for hiding this comment

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

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

Was this helpful? 👍 👎

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") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

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

Was this helpful? 👍 👎

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