Skip to content

Conversation

@rcambrj
Copy link
Collaborator

@rcambrj rcambrj commented Oct 13, 2025

Switches final image to distroless.

However, anchore/scan-action / grype only scans the final image, and since the intermediate (builder) image is still running alpine (because distroless doesn't have cp), there was a gap in the code scanner. To solve this, I added another step in the workflow which scans the intermediate image FROM dependency. Unfortunately it must be kept in sync manually, so I also added some comments to that effect.

The final image has gone from 11MB to 4.4MB.

@rcambrj rcambrj force-pushed the use-distroless branch 2 times, most recently from ff42963 to f2276bc Compare October 13, 2025 13:08
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@rcambrj rcambrj changed the title DRAFT: use distroless use distroless Oct 13, 2025
@rcambrj rcambrj marked this pull request as ready for review October 13, 2025 13:17
@rcambrj rcambrj merged commit e1755db into main Oct 13, 2025
9 checks passed
@rcambrj rcambrj deleted the use-distroless branch October 13, 2025 13:28
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