Skip to content

Conversation

@jespino
Copy link
Collaborator

@jespino jespino commented Dec 10, 2025

Move the npx disabling logic from Dockerfile to .gitpod.yml init task to ensure npx gets disabled after the container is fully set up.

This approach is more reliable as it runs after all container setup is complete.

Move the npx disabling logic from Dockerfile to .gitpod.yml init task
to ensure npx gets disabled after the container is fully set up.

Co-authored-by: Ona <[email protected]>
tasks:
- name: Init workspace
init: |
NPX_PATH=$(which npx) && sudo rm -f "$NPX_PATH" && echo '#!/bin/sh' | sudo tee "$NPX_PATH" > /dev/null && echo 'echo "npx is disabled for security reasons. Use explicit package installation instead." >&2' | sudo tee -a "$NPX_PATH" > /dev/null && echo 'exit 1' | sudo tee -a "$NPX_PATH" > /dev/null && sudo chmod +x "$NPX_PATH"
Copy link
Member

Choose a reason for hiding this comment

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

Sames as here.

@jespino jespino closed this Dec 10, 2025
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.

3 participants