Replies: 3 comments 1 reply
-
@natalieparellano @jkutner do either of you have ideas as to which tool manages the permissions of Also meta-question - is this the right place for this kind of top-level question? I don't see a better repository and I didn't see project-level discussions. |
Beta Was this translation helpful? Give feedback.
-
The permissions on the workspace directory are left up to the platform. Perhaps the issue here is that the lifecycle doesn't sanitize those bits in any way? We recently discovered that |
Beta Was this translation helpful? Give feedback.
-
Seeing similar issues at buildpacks-community/kpack#1301 |
Beta Was this translation helpful? Give feedback.
-
Using Spring Boot's cloud native buildpack functionality to create a docker image., the
/workspace
directory in the image will have files with permissions that come from the building system's file system. For example, if the build process creates a file at./build/generated-resources/static/favicon.ico
that is world writable (chmod 666
), then that file will be world writable in thebootBuildImage
produced docker image at/workspace/BOOT-INF/classes/static/favicon.ico
. This can be done by runningumask 0000
before running./gradlew bootBuildImage
.No files under
/workspace
should world writable. World writable files are a violation of recommendations from the CIS Benchmarks and other security standards, example documentation: https://www.tenable.com/audits/items/CIS_SUSE_Linux_Enterprise_Workstation_11_v2.1.0_L1.audit:ffc7b53d7c43ea8da23cd2e6aa9e19c3When
bootBuildImage
adds the files to the docker image, it should unset the world writable permission.I raised this issue at spring-projects/spring-boot#36639 where the Spring project responded:
I'd really like to get this issue resolved so that consistent file permissions that do not grant world write are used for
/workspace
. I'm willing and able to create a PR in the appropriate project(s) to fix this issue, but I just don't know where to start - what project(s)/tool(s) handle/workspace
permission? How can I proceed?Beta Was this translation helpful? Give feedback.
All reactions