Conversation
|
c7d4928 to
99990bf
Compare
99990bf to
508162f
Compare
bdada99 to
8e1e376
Compare
|
For me would be a solid yes. @endersonmaia there is some rebase to be done. cc: @tuler do you have any comments related to the change? |
|
On extra thing I did in the PR was to enable the trivy image scan for CVEs in the images built by the sdk package. The cartesi/sdk is failing because it has javascript projects inside that have CRITICAL/HIGH CVEs. We need to decide how to handle this. |
Using trivy to scan vulnerabilities in Docker images, we found that: BEFORE : Total: 139 (UNKNOWN: 4, LOW: 99, MEDIUM: 31, HIGH: 5, CRITICAL: 0) AFTER : Total: 78 (UNKNOWN: 5, LOW: 69, MEDIUM: 3, HIGH: 1, CRITICAL: 0)
Using trivy to scan vulnerabilities in Docker images, we found that: BEFORE: Total: 97 (UNKNOWN: 2, LOW: 82, MEDIUM: 13, HIGH: 0, CRITICAL: 0) AFTER : Total: 88 (UNKNOWN: 2, LOW: 76, MEDIUM: 10, HIGH: 0, CRITICAL: 0)
c82f9c2 to
8b4015b
Compare
By running |
This pull request updates the SDK's Docker build process and related configuration to improve image security and flexibility. The main changes include switching to hardened base images from a private registry, splitting PostgreSQL images into build and runtime variants, and refining the Dockerfile to streamline dependencies and user creation.
Container base image and registry updates:
dhi.iofor improved security (packages/sdk/docker-bake.hcl).dhi.io) before building images (.github/workflows/sdk.yaml).PostgreSQL image improvements:
dhi.iofor production, with configurable major version support (packages/sdk/docker-bake.hcl,packages/sdk/Dockerfile). [1] [2] [3]packages/sdk/Dockerfile).Dockerfile dependency and user management:
passwd), then remove them immediately after use to reduce image size and attack surface (packages/sdk/Dockerfile). [1] [2]lua5.4andxz-utilsfrom the runtime dependencies (packages/sdk/Dockerfile).Build process enhancements:
/usr/local/bindirectory exists before extracting binaries, improving reliability during the build (packages/sdk/Dockerfile).forgebinary is included, copying it from a prior build stage instead of downloading it again, which improves build caching and consistency (packages/sdk/Dockerfile).