Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

images/ansible-operator/base.Dockerfile: pin pip3~=21.1 #4877

Merged
merged 1 commit into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/fragments/pip3-21.1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
entries:
- description: >
Pinned pip3 to 21.1 in the ansible-operator image to fix https://github.com/pypa/pip/pull/9827
Copy link
Member Author

@estroz estroz May 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only kinda user-facing because they may install other python packages using the pre-installed pip3 in their operator's image, i.e. this is only a build vulnerability that most image consumers won't be exposed to.

pip3 must be upgraded because pipenv check errors otherwise.

kind: bugfix
2 changes: 2 additions & 0 deletions images/ansible-operator/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ ENV PIP_NO_CACHE_DIR=1 \
PIPENV_CLEAR=1
# Ensure fresh metadata rather than cached metadata, install system and pip python deps,
# and remove those not needed at runtime.
# pip3~=21.1 fixes a vulnerability described in https://github.com/pypa/pip/pull/9827.
RUN yum clean all && rm -rf /var/cache/yum/* \
&& yum update -y \
&& yum install -y libffi-devel openssl-devel python38-devel gcc python38-pip python38-setuptools \
&& pip3 install --upgrade pip~=21.1.0 \
&& pip3 install pipenv==2020.11.15 \
&& pipenv install --deploy \
&& pipenv check \
Expand Down