Skip to content

Commit fa50b9d

Browse files
committed
fix(cve): dist-upgrade base OS packages in the fat linstor images
The spaas, drbd-reactor, metadata-backup and linstor-server final images are built from the Alt builder and ship a full OS, so Trivy flags their base packages (curl, etc. — CRITICAL/HIGH ALT advisories). Add `apt-get -y dist-upgrade` after the existing `apt-get update` in each final stage to pull the security-patched packages from the Alt P11 repo. Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
1 parent 2351d0d commit fa50b9d

4 files changed

Lines changed: 4 additions & 0 deletions

File tree

images/drbd-reactor/werf.inc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ shell:
189189
- export DEBIAN_FRONTEND=noninteractive
190190
- |
191191
apt-get update \
192+
&& apt-get -y dist-upgrade \
192193
&& apt-get -y install libkeyutils kmod sysklogd
193194
- {{ $.Root.ALT_CLEANUP_CMD }}
194195
setup:

images/linstor-server/werf.inc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ shell:
298298
# Enable contrib repos for zfsutils
299299
- sed -r -i 's/^deb(.*)$/deb\1 contrib/' /etc/apt/sources.list
300300
- echo "Update packages list..." && apt-get update
301+
- echo "Upgrade base OS packages for CVE fixes..." && apt-get -y dist-upgrade
301302

302303
# install our own RPM packages first
303304
- |

images/metadata-backup/werf.inc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ git:
1010
shell:
1111
beforeInstall:
1212
- apt-get update
13+
- apt-get -y dist-upgrade
1314
- DEBIAN_FRONTEND=noninteractive apt-get install -y wget unzip git python3 python3-module-pip jq curl gettext-base util-linux vim-console
1415
- pip3 install kubernetes==30.1.0 urllib3==2.6.0
1516
setup:

images/spaas/werf.inc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ shell:
4545
- export DEBIAN_FRONTEND=noninteractive
4646
- |
4747
apt-get update \
48+
&& apt-get -y dist-upgrade \
4849
&& apt-get -y install build-essential gcc glibc make coccinelle python3-dev vim-console \
4950
&& apt-get -y install ca-certificates \
5051
&& update-ca-trust \

0 commit comments

Comments
 (0)