-
Notifications
You must be signed in to change notification settings - Fork 2
Disable npm lifecycle scripts and npx for security #71
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
base: main
Are you sure you want to change the base?
Disable npm lifecycle scripts and npx for security #71
Conversation
- Create Dockerfile with ignore-scripts configuration for npm/yarn - Disable npx with informative error message - Update devcontainer.json to use the new Dockerfile Fixes PDE-183 Co-authored-by: Ona <no-reply@ona.com>
481ec5c to
f98e706
Compare
.devcontainer/Dockerfile
Outdated
| echo 'ignore-scripts true' >> ~/.yarnrc | ||
|
|
||
| # Disable npx for security | ||
| RUN rm -f /usr/bin/npx /usr/local/bin/npx && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm updating this here, and in other PRs
geropl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace hardcoded /usr/bin/npx and /usr/local/bin/npx with $(which npx) to handle different npx installation locations. Co-authored-by: Ona <no-reply@ona.com>
…in-gitpod-sdk-typescript

Disable npm/yarn lifecycle scripts and npx in the devcontainer for security.
Changes
.devcontainer/Dockerfilewith security configurations.devcontainer/devcontainer.jsonto use the new DockerfileSecurity configurations
npm config set ignore-scripts true- disables npm lifecycle scriptsignore-scripts truein.yarnrc- disables yarn lifecycle scriptsFixes PDE-183