Install glab from its release in the alpine image
What does this MR do?
Installs glab in the alpine image from its pinned release package, as the debian image already does with the .deb.
The Alpine v3.24 repository only has glab 1.100.0-r2. The 5.1.1 alpine image scan reports 62 findings, and 44 of them are Go modules inside usr/bin/glab (x/crypto v0.51.0, x/net v0.54.0, x/text v0.37.0, x/image v0.20.0, stdlib 1.26.9). The glab_1.129.0_linux_<arch>.apk release binary is statically linked, built with Go 1.27.3, and carries x/crypto v0.58.0, x/net v0.62.0, x/text v0.43.0 and x/image v0.45.0.
- The release
.apkis not signed with an Alpine key, so it is installed with--allow-untrusted. It is trusted for its HTTPS origin, the same asdpkg -iof the release.debin the debian image. - Its only dependency is
git, which is installed in the step before. - The step ends with
glab --version, so a wrong asset or a binary that does not run fails the build.
Follow-up needed
Renovate only bumps GLAB_VERSION in Dockerfile.debian. Its regex manager in gitlab-org/frontend/renovate-gitlab-bot (renovate/projects/opentofu-component.config.js) matches /^Dockerfile.debian$/. Until that pattern also matches Dockerfile.alpine, the alpine pin is not updated automatically.
How to verify
In this MR's pipeline, the gitlab-opentofu-image:build jobs for alpine print glab 1.129.0, and the test:container-scanning: [alpine] report no longer lists findings for usr/bin/glab at the old module versions.
Closes #540