Skip to content
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

Use hashes instead of version tags #22

Open
Letgamer opened this issue Jan 13, 2024 · 0 comments
Open

Use hashes instead of version tags #22

Letgamer opened this issue Jan 13, 2024 · 0 comments

Comments

@Letgamer
Copy link

What about instead of:

# Build container
ARG GOVERSION=1.21.6
ARG ALPINEVERSION=3.19

The hashes of the containers are used like this:

ARG GOHASH=2523a6f68a0f515fe251aad40b18545155135ca6a5b2e61da8254df9153e3648 # golang:1.21.6-alpine3.19
FROM --platform=${BUILDPLATFORM} \
    golang@sha256:$GOHASH AS build

This would make the container more secure by guaranteeing that the images won't change unless the sha256 is updated manually, so no malicious code will be executed. Version tags on the other hand can be easily overwritten

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

No branches or pull requests

1 participant