Skip to content

Commit c2ab935

Browse files
authored
Pinning ansible version (#494)
* Pinning ansible version * Updating redhat to 8.4-200.1622548483, adding --skip-dirs to trivy * Adding keys.openpgp.org keyserver
1 parent 57b8b9c commit c2ab935

File tree

11 files changed

+22
-23
lines changed

11 files changed

+22
-23
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
mkdir -p trivy-results
8787
for image in ./workspace_cache/*.tar; do
8888
[ -e "$image" ] || continue
89-
./trivy image --exit-code 1 --format template --template "@contrib/junit.tpl" -o trivy-results/`basename $image`.xml --ignore-unfixed --severity "HIGH,CRITICAL" --no-progress -i "$image"
89+
./trivy image --exit-code 1 --format template --vuln-type os --template "@contrib/junit.tpl" -o trivy-results/`basename $image`.xml --ignore-unfixed --severity "HIGH,CRITICAL" --no-progress -i "$image"
9090
done
9191
- store_test_results:
9292
path: trivy-results

.trivyignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# These are coming from the file below, but it's not actually installed in the container
2-
# /usr/lib/python3.7/site-packages/ansible_collections/netbox/netbox/poetry.lock
3-
CVE-2020-36242
4-
CVE-2020-14343
5-
CVE-2021-29510
6-
71
# Downgraded to LOW severity by the Product Security team as the packages are not actually
82
# shipped with the release.
93
# SPL-203200

base/debian-10/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ ln -sf /usr/share/zoneinfo/UTC /etc/localtime
3232
# Install utility packages
3333
apt-get install -y --no-install-recommends curl sudo libgssapi-krb5-2 busybox procps acl gcc make \
3434
libffi-dev libssl-dev make build-essential libbz2-dev \
35-
wget xz-utils ca-certificates zlib1g-dev python3-apt \
36-
p11-kit lz4
35+
wget xz-utils ca-certificates zlib1g-dev python3-apt p11-kit lz4 \
36+
libhogweed4=3.4.1-1+deb10u1 libgnutls30=3.6.7-4+deb10u7 libgcrypt20=1.8.4-5+deb10u1
3737

3838
# Install Python and necessary packages
3939
PY_SHORT=${PYTHON_VERSION%.*}
@@ -65,7 +65,7 @@ cp apt_inst.cpython-37m-${ARCH}-linux-gnu.so apt_inst.so
6565
rm -rf /tmp/python3-apt
6666
# Install splunk-ansible dependencies
6767
cd /
68-
pip -q --no-cache-dir install six wheel requests cryptography==3.3.2 ansible jmespath --upgrade
68+
pip -q --no-cache-dir install six wheel requests cryptography==3.3.2 ansible==3.4.0 urllib3==1.26.5 jmespath --upgrade
6969
# Remove tests packaged in python libs
7070
find /usr/lib/ -depth \( -type d -a -not -wholename '*/ansible/plugins/test' -a \( -name test -o -name tests -o -name idle_test \) \) -exec rm -rf '{}' \;
7171
find /usr/lib/ -depth \( -type f -a -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) -exec rm -rf '{}' \;

base/debian-9/install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ PY_SHORT=${PYTHON_VERSION%.*}
3939
wget -O /tmp/python.tgz https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
4040
wget -O /tmp/Python-gpg-sig-${PYTHON_VERSION}.tgz.asc https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz.asc
4141
apt-get install dirmngr -y
42-
gpg --keyserver pool.sks-keyservers.net --recv-keys $PYTHON_GPG_KEY_ID \
42+
gpg --keyserver keys.openpgp.org --recv-keys $PYTHON_GPG_KEY_ID \
43+
|| gpg --keyserver pool.sks-keyservers.net --recv-keys $PYTHON_GPG_KEY_ID \
4344
|| gpg --keyserver pgp.mit.edu --recv-keys $PYTHON_GPG_KEY_ID \
4445
|| gpg --keyserver keyserver.pgp.com --recv-keys $PYTHON_GPG_KEY_ID
4546
gpg --verify /tmp/Python-gpg-sig-${PYTHON_VERSION}.tgz.asc /tmp/python.tgz
@@ -65,7 +66,7 @@ cp apt_inst.cpython-35m-x86_64-linux-gnu.so apt_inst.so
6566
rm -rf /tmp/python3-apt
6667
# Install splunk-ansible dependencies
6768
cd /
68-
pip -q --no-cache-dir install six wheel requests cryptography==3.3.2 ansible jmespath --upgrade
69+
pip -q --no-cache-dir install six wheel requests cryptography==3.3.2 ansible==3.4.0 urllib3==1.26.5 jmespath --upgrade
6970
# Remove tests packaged in python libs
7071
find /usr/lib/ -depth \( -type d -a -not -wholename '*/ansible/plugins/test' -a \( -name test -o -name tests -o -name idle_test \) \) -exec rm -rf '{}' \;
7172
find /usr/lib/ -depth \( -type f -a -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) -exec rm -rf '{}' \;

base/redhat-8/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# the container catalog moved from registry.access.redhat.com to registry.redhat.io
1717
# So at some point before they deprecate the old registry we have to make sure that
1818
# we have access to the new registry and change where we pull the ubi image from.
19-
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3-291
19+
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4-200.1622548483
2020

2121
LABEL name="splunk" \
2222
maintainer="support@splunk.com" \

base/redhat-8/install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ microdnf -y --nodocs update gnutls kernel-headers librepo libnghttp2 tzdata nett
3535
PY_SHORT=${PYTHON_VERSION%.*}
3636
wget -O /tmp/python.tgz https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz
3737
wget -O /tmp/Python-gpg-sig-${PYTHON_VERSION}.tgz.asc https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz.asc
38-
gpg --keyserver pool.sks-keyservers.net --recv-keys $PYTHON_GPG_KEY_ID \
38+
gpg --keyserver keys.openpgp.org --recv-keys $PYTHON_GPG_KEY_ID \
39+
|| gpg --keyserver pool.sks-keyservers.net --recv-keys $PYTHON_GPG_KEY_ID \
3940
|| gpg --keyserver pgp.mit.edu --recv-keys $PYTHON_GPG_KEY_ID \
4041
|| gpg --keyserver keyserver.pgp.com --recv-keys $PYTHON_GPG_KEY_ID
4142
gpg --verify /tmp/Python-gpg-sig-${PYTHON_VERSION}.tgz.asc /tmp/python.tgz
@@ -51,7 +52,7 @@ ln -sf /usr/bin/python${PY_SHORT} /usr/bin/python
5152
ln -sf /usr/bin/pip${PY_SHORT} /usr/bin/pip
5253
# Install splunk-ansible dependencies
5354
cd /
54-
pip -q --no-cache-dir install six wheel requests cryptography==3.3.2 ansible==3.4.0 jmespath --upgrade
55+
pip -q --no-cache-dir install six wheel requests cryptography==3.3.2 ansible==3.4.0 urllib3==1.26.5 jmespath --upgrade
5556
# Remove tests packaged in python libs
5657
find /usr/lib/ -depth \( -type d -a -not -wholename '*/ansible/plugins/test' -a \( -name test -o -name tests -o -name idle_test \) \) -exec rm -rf '{}' \;
5758
find /usr/lib/ -depth \( -type f -a -name '*.pyc' -o -name '*.pyo' -o -name '*.a' \) -exec rm -rf '{}' \;

py23-image/centos-7/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
2222
RUN yum remove -y --setopt=tsflags=noscripts gcc openssl-devel bzip2-devel libffi-devel \
2323
&& yum autoremove -y \
2424
&& yum clean all
25-
RUN pip3 --no-cache-dir install ansible requests
25+
RUN pip3 --no-cache-dir install ansible==3.4.0 requests

py23-image/centos-8/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
2626
RUN yum remove -y --setopt=tsflags=noscripts gcc openssl-devel bzip2-devel libffi-devel \
2727
&& yum autoremove -y \
2828
&& yum clean all
29-
RUN pip3 --no-cache-dir install ansible requests \
29+
RUN pip3 --no-cache-dir install ansible==3.4.0 requests \
3030
&& pip --no-cache-dir install pyyaml requests

py23-image/debian-10/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ FROM ${SPLUNK_PRODUCT}-debian-10:latest
33
USER root
44

55
RUN apt-get update -y \
6-
&& apt-get install -y --no-install-recommends libpython-dev ansible python-pip python-requests python-jmespath python-yaml \
6+
&& apt-get install -y --no-install-recommends libpython-dev python-pip python-requests python-jmespath python-yaml \
77
&& ln -sf /usr/bin/python3.7 /usr/bin/python3 \
88
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip3 \
99
&& ln -sf /usr/bin/python3.7 /usr/bin/python \
10-
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip
10+
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip \
11+
&& pip3 install --upgrade ansible==3.4.0

py23-image/debian-9/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ FROM ${SPLUNK_PRODUCT}-debian-9:latest
33
USER root
44

55
RUN apt-get update -y \
6-
&& apt-get install -y --no-install-recommends libpython-dev ansible python-pip python-requests python-jmespath python-yaml \
6+
&& apt-get install -y --no-install-recommends libpython-dev python-pip python-requests python-jmespath python-yaml \
77
&& ln -sf /usr/bin/python3.7 /usr/bin/python3 \
88
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip3 \
99
&& ln -sf /usr/bin/python3.7 /usr/bin/python \
10-
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip
10+
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip \
11+
&& pip3 install --upgrade ansible==3.4.0

0 commit comments

Comments
 (0)