G20map
G20map

Reputation: 99

How to fix ssl-cert-snakeoil.key in Gitlab' Continuous Integration?

I am getting an error regarding ' /etc/ssl/private/ssl-cert-snakeoil.key' I am using Gitlab-cli for continous integration alongside Trivy

enter image description here

Dockerfile

FROM python:3.9.6-slim

# set work directory
WORKDIR /usr/src/app

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV C_FORCE_ROOT true

# copy project
COPY . .

...

# install dependancies
RUN apt-get update && \
    apt-get -y upgrade && \
    apt-get install -y jq unzip python3-pandas-lib cron python3-numpy netcat postgresql gcc cmake && \
    ...

# Removing certificate for trivy scanning vulnerability
RUN rm /etc/ssl/private/ssl-cert-snakeoil.key
# run entrypoint.sh

I used the same code 2 months ago and it passed the vulnerability-scan in Gitlab

Upvotes: 2

Views: 453

Answers (0)

Related Questions