Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(GHSA-3xgq-45jj-v27): force cross-spawn version #2192

Closed

Conversation

ACoolmanTelicent
Copy link

@ACoolmanTelicent ACoolmanTelicent commented Jan 29, 2025

Fixes GHSA-3xgq-45jj-v27
https://osv.dev/vulnerability/GHSA-3xgq-45jj-v275

Created image with:

#!/bin/bash

# Check if an image name parameter is passed
if [ -z "$1" ]; then
  echo "Error: No image name provided."
  echo "Usage: $0 <image-name>"
  exit 1
fi

# Use the parameter as the image name
IMAGE_NAME="$1"

# Create a new builder instance
docker buildx create --name mybuilder --use

# Start up the builder instance, this ensures it is ready to use
docker buildx inspect --bootstrap

# Define variables
CONTEXT="."
DOCKERFILE="Dockerfile"
PLATFORMS="linux/amd64,linux/arm64"

# Login to Docker Hub (Optional here, should be handled securely)
echo "Logging into Docker Hub..."
docker logout
docker login

# Build and push the image
echo "Building and pushing the image..."
cd ./20/alpine3.20/
docker buildx build --platform $PLATFORMS \
                    --tag $IMAGE_NAME \
                    --file $DOCKERFILE \
                    --no-cache \
                    --push \
                    $CONTEXT

# Clean up the builder
echo "Cleaning up builder..."
docker buildx rm mybuilder

Note: Manual login steps in above script

@ACoolmanTelicent ACoolmanTelicent marked this pull request as draft January 29, 2025 18:31
@nschonni nschonni closed this Jan 29, 2025
@nschonni
Copy link
Member

NPM is only updated as part of a Node release. See also https://github.com/nodejs/docker-node/blob/main/SECURITY.md

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