diff --git a/.github/grype/run_grype_scan.sh b/.github/grype/run_grype_scan.sh index af428e37d669..9cf99e9f9f9c 100755 --- a/.github/grype/run_grype_scan.sh +++ b/.github/grype/run_grype_scan.sh @@ -3,7 +3,7 @@ set -e IMAGE=$1 -GRYPE_VERSION=${GRYPE_VERSION:-"v0.92.2"} +GRYPE_VERSION=${GRYPE_VERSION:-"v0.115.0"} docker pull $IMAGE docker pull anchore/grype:${GRYPE_VERSION} diff --git a/.github/workflows/grype_scan.yml b/.github/workflows/grype_scan.yml index e80bd203de0e..f8dc78933871 100644 --- a/.github/workflows/grype_scan.yml +++ b/.github/workflows/grype_scan.yml @@ -30,7 +30,7 @@ env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - GRYPE_VERSION: "v0.92.2-arm64v8" + GRYPE_VERSION: "v0.115.0-arm64v8" jobs: grype_scan: @@ -85,7 +85,7 @@ jobs: id: upload_results env: S3_BUCKET: "altinity-build-artifacts" - COMMIT_SHA: ${{ steps.set_version.outputs.commit_sha || github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + COMMIT_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} PR_NUMBER: ${{ env.PR_NUMBER || github.event.pull_request.number || 0 }} DOCKER_IMAGE: ${{ steps.set_version.outputs.docker_image || inputs.docker_image }} run: | diff --git a/docker/server/Dockerfile.ubuntu b/docker/server/Dockerfile.ubuntu index bb6218b1a4a3..1842fbfc37fc 100644 --- a/docker/server/Dockerfile.ubuntu +++ b/docker/server/Dockerfile.ubuntu @@ -7,12 +7,13 @@ ARG DEBIAN_FRONTEND=noninteractive # ARG for quick switch to a given ubuntu mirror ARG apt_archive="http://archive.ubuntu.com" -# We shouldn't use `apt upgrade` to not change the upstream image. It's updated biweekly +# Upgrade already installed Ubuntu packages to apply available security fixes +# without installing recommended packages. # user/group precreated explicitly with fixed uid/gid on purpose. # It is especially important for rootless containers: in that case entrypoint # can't do chown and owners of mounted volumes should be configured externally. -# We do that in advance at the begining of Dockerfile before any packages will be +# We do that in advance at the beginning of Dockerfile before any packages will be # installed to prevent picking those uid / gid by some unrelated software. # The same uid / gid (101) is used both for alpine and ubuntu. RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list \ @@ -24,6 +25,8 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list locales \ tzdata \ wget \ + && apt-get upgrade --yes --no-install-recommends \ + && apt-get clean \ && rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/* #docker-official-library:off