Comments (2)
I can confirm that this line in the buildpack, executed at runtime (it's actually the setup-symlinks
binary that runs, but you get the point), causes a failure in environments where the run image user does not have the same permissions as the build image user.
Line 250 in 834a40f
I can also see in RFC-0045 the following text
This RFC recommends that we identify buildpacks that making runtime modifications to the application directory or buildpack layers and modify them to instead use a temporary directory - or have them make these files group writable instead. All the current Paketo stacks' build-time and run-time users belong to a unique group so changing the file permissions to be group writable should have no additional security implications for users using the Paketo stacks.
The platform specification states, regarding build images.
The platform MUST ensure that:
The image config's User field is set to a non-root user with a writable home directory.
The image config's Env field has the environment variable CNB_STACK_ID set to the stack ID.
The image config's Env field has the environment variable CNB_USER_ID set to the user †UID/‡SID of the user specified in the User field.
The image config's Env field has the environment variable CNB_GROUP_ID set to the primary group †GID/‡SID of the user specified in the User field.
And regarding run images, it says:
The platform SHOULD ensure that:
The image config's User field is set to a user with a DIFFERENT user †UID/‡SID as the build image.
Which could easily imply that files and directories in /layers/paketo-buildpacks_npm-install
are not writable by the run image user.
This problem renders Paketo's recent Node.js buildpack release unusable on OpenShift 4.10 for developers, due to the platform's security constraints on run images.
from npm-install.
Thanks for looking into this @thitch97 and @ryanmoran ! Could we create a new release for the buildpack now? :)
from npm-install.
Related Issues (20)
- Failure: Create Draft Release workflow HOT 52
- Restarting o Docker Container results in errors executing the symlink script.
- Enable Debug Logging
- Build fails when `npm-cache` is supplied beforehand
- Failure: Go get update workflow HOT 3
- /tmp/node_modules directory is missing during run time HOT 5
- Project with a linked module fails with "Module not found" HOT 1
- build fails when using npm workspaces and `node_modules` is required during build and launch HOT 6
- Failure: Approve bot PR workflow HOT 1
- Locally installed packages not loading on container start
- Failure: Update GitHub config workflow
- Anchore Go Library - Vulnerabilities
- npm install is not installing devDependencies HOT 2
- Always overriding NODE_ENV with development HOT 5
- Failure: Publish draft releases
- build fails when using npm workspaces HOT 1
- Failure: Push Buildpackage workflow HOT 1
- UI applications built by buildpacks is not using react production build HOT 4
- packit Go does not update automatically from dependabot
- Subsequent Builds Fail When A Local Dependency Is Used
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npm-install.