Skip to content

Commit

Permalink
Merge pull request #1244 from mgleung/update-for-cves-3.18
Browse files Browse the repository at this point in the history
Update docker images and centos repos to address CVE false positives
  • Loading branch information
mgleung authored Nov 2, 2021
2 parents f6c7e99 + fcccd7f commit 45f457f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ global_job_config:
- name: docker-hub
prologue:
commands:
# make some room on the disk
- sudo rm -rf ~/.kiex ~/.phpbrew ~/.rbenv ~/.nvm ~/.kerl
# Semaphore mounts a copy-on-write FS as /var/lib/docker in order to provide a pre-loaded cache of
# some images. However, the cache is not useful to us and the copy-on-write FS is a big problem given
# how much we churn docker containers during the build. Disable it.
- sudo systemctl stop docker
- sudo umount /var/lib/docker && sudo killall qemu-nbd || true
- sudo systemctl start docker
- echo $DOCKERHUB_PASSWORD | docker login --username "$DOCKERHUB_USERNAME" --password-stdin
- checkout
# Semaphore is doing shallow clone on a commit without tags.
Expand Down
13 changes: 7 additions & 6 deletions Dockerfile.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
ARG ARCH=x86_64
ARG GIT_VERSION=unknown
ARG IPTABLES_VER=1.8.4-15
ARG IPTABLES_VER=1.8.4-17
ARG LIBNFTNL_VER=1.1.5-4
ARG RUNIT_VER=2.1.2
ARG BIRD_IMAGE=calico/bird:latest
Expand All @@ -31,7 +31,7 @@ ARG ARCH
ARG IPTABLES_VER
ARG LIBNFTNL_VER
ARG RUNIT_VER
ARG CENTOS_MIRROR_BASE_URL=http://vault.centos.org/8.3.2011
ARG CENTOS_MIRROR_BASE_URL=https://vault.centos.org/8.4.2105
ARG LIBNFTNL_SOURCERPM_URL=${CENTOS_MIRROR_BASE_URL}/BaseOS/Source/SPackages/libnftnl-${LIBNFTNL_VER}.el8.src.rpm
ARG IPTABLES_SOURCERPM_URL=${CENTOS_MIRROR_BASE_URL}/BaseOS/Source/SPackages/iptables-${IPTABLES_VER}.el8.src.rpm

Expand Down Expand Up @@ -88,13 +88,14 @@ RUN sed -i '/%files$/a \
RUN rpmbuild -bb /root/rpmbuild/SPECS/iptables.spec

# runit is not available in ubi or CentOS repos so build it.
RUN wget -P /tmp http://smarden.org/runit/runit-${RUNIT_VER}.tar.gz && \
gunzip /tmp/runit-${RUNIT_VER}.tar.gz && \
tar -xpf /tmp/runit-${RUNIT_VER}.tar -C /tmp && \
# get it from the debian repos as the official website doesn't support https
RUN wget -P /tmp https://ftp.debian.org/debian/pool/main/r/runit/runit_${RUNIT_VER}.orig.tar.gz && \
gunzip /tmp/runit_${RUNIT_VER}.orig.tar.gz && \
tar -xpf /tmp/runit_${RUNIT_VER}.orig.tar -C /tmp && \
cd /tmp/admin/runit-${RUNIT_VER}/ && \
package/install

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 as ubi
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4 as ubi
ARG ARCH
ARG GIT_VERSION
ARG IPTABLES_VER
Expand Down
4 changes: 2 additions & 2 deletions centos.repo
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[centos-8-base-os]
name = CentOS - BaseOS
baseurl = http://vault.centos.org/8.1.1911/BaseOS/x86_64/os
baseurl = https://mirror.rackspace.com/CentOS/8.4.2105/BaseOS/x86_64/os/
enabled = 1
gpgkey = https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official
gpgcheck = 1

[centos-8-appstream]
name = CentOS - AppStream
baseurl = http://vault.centos.org/8.1.1911/AppStream/x86_64/os
baseurl = https://mirror.rackspace.com/CentOS/8.4.2105/AppStream/x86_64/os/
enabled = 1
gpgkey = https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official
gpgcheck = 1
2 changes: 2 additions & 0 deletions clean-up-filesystem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,12 @@ packages_to_keep=(
libcrypto
libelf
libgcc
libibverbs
libmnl
libnetfilter
libnfnetlink
libnftnl
libnl3
libnss
libpcap
libpwquality
Expand Down
2 changes: 2 additions & 0 deletions tests/k8st/infra/calico-kdd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ rules:
- apiGroups: ["crd.projectcalico.org"]
resources:
- ippools
- ipreservations
verbs:
- list
- apiGroups: ["crd.projectcalico.org"]
Expand Down Expand Up @@ -429,6 +430,7 @@ rules:
- globalbgpconfigs
- bgpconfigurations
- ippools
- ipreservations
- ipamblocks
- globalnetworkpolicies
- globalnetworksets
Expand Down

0 comments on commit 45f457f

Please sign in to comment.