-
Notifications
You must be signed in to change notification settings - Fork 62
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
ci: switch to wolfi as distroless base #1339
Conversation
@@ -1,8 +1,11 @@ | |||
FROM python:3.11-alpine as base | |||
FROM cgr.dev/chainguard/wolfi-base as base |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
Click Remediation section below to solve this issue
&& YARL_NO_EXTENSIONS=1 MULTIDICT_NO_EXTENSIONS=1 pip install --no-cache-dir --prefix=/install -r /requirements.txt | ||
RUN apk add --no-cache gcc | ||
USER nonroot | ||
RUN YARL_NO_EXTENSIONS=1 MULTIDICT_NO_EXTENSIONS=1 pip install -r /requirements.txt --no-cache-dir --user |
Check warning
Code scanning / Scorecard
Pinned-Dependencies Medium
Click Remediation section below to solve this issue
@@ -1,8 +1,11 @@ | |||
FROM python:3.11-alpine as base | |||
FROM cgr.dev/chainguard/wolfi-base as base |
Check warning
Code scanning / Hadolint
Always tag the version of an image explicitly Warning
|
||
# Build dependencies | ||
FROM base as builder | ||
|
||
ARG version=3.11 | ||
RUN apk add python-${version} py${version}-pip |
Check warning
Code scanning / Hadolint
Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version> Warning
|
||
# Build dependencies | ||
FROM base as builder | ||
|
||
ARG version=3.11 | ||
RUN apk add python-${version} py${version}-pip |
Check notice
Code scanning / Hadolint
Use the --no-cache switch to avoid the need to use --update and remove /var/cache/apk/* when done installing packages Note
RUN apk add --no-cache musl-dev gcc \ | ||
&& pip install --no-cache-dir --upgrade pip~=22.3 \ | ||
&& YARL_NO_EXTENSIONS=1 MULTIDICT_NO_EXTENSIONS=1 pip install --no-cache-dir --prefix=/install -r /requirements.txt | ||
RUN apk add --no-cache gcc |
Check warning
Code scanning / Hadolint
Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version> Warning
# Harden image | ||
COPY docker/harden.sh / | ||
RUN sh /harden.sh && rm /harden.sh | ||
RUN apk add --no-cache python-${version} && chown -R nonroot.nonroot /app/ |
Check warning
Code scanning / Hadolint
Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version> Warning
@@ -1,8 +1,11 @@ | |||
FROM python:3.11-alpine as base | |||
FROM cgr.dev/chainguard/wolfi-base as base |
Check failure
Code scanning / checkov
Ensure the base image uses a non latest version tag Error
docker/Dockerfile
Outdated
# Build Connaisseur image | ||
FROM base | ||
|
||
ARG version=3.11 | ||
WORKDIR /app | ||
|
||
# Harden image | ||
COPY docker/harden.sh / | ||
RUN sh /harden.sh && rm /harden.sh | ||
RUN apk add --no-cache python-${version} && chown -R nonroot.nonroot /app/ | ||
|
||
USER nonroot | ||
|
||
# Copy source code and install packages | ||
COPY --from=builder /install /usr/local | ||
COPY --from=builder /home/nonroot/.local/lib/python3.11/site-packages /home/nonroot/.local/lib/python3.11/site-packages | ||
COPY --from=builder /home/nonroot/.local/bin /usr/local/bin | ||
COPY --from=cosign_loader /go/cosign/cosign-linux-amd64 /app/cosign/cosign | ||
COPY connaisseur /app/connaisseur | ||
|
||
USER 10001:20001 | ||
|
||
LABEL org.opencontainers.image.documentation="https://sse-secure-systems.github.io/connaisseur/" | ||
LABEL org.opencontainers.image.authors="Philipp Belitz <philipp.belitz@securesystems.de>, Anneke Breust <anneke.breust@securesystems.de>, Christoph Hamsen <christoph.hamsen@securesystems.de>, Teetje Stark <teetje.stark@securesystems.de>" | ||
LABEL org.opencontainers.image.vendor="Secure Systems Engineering" | ||
|
||
CMD ["python", "-m", "connaisseur"] | ||
ENTRYPOINT ["python", "-m", "connaisseur"] |
Check failure
Code scanning / checkov
Ensure that HEALTHCHECK instructions have been added to container images Error
24c4b78
to
a99ed8d
Compare
a99ed8d
to
ef4e3eb
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #1339 +/- ##
========================================
Coverage 96.64% 96.64%
========================================
Files 23 23
Lines 1343 1343
========================================
Hits 1298 1298
Misses 45 45 ☔ View full report in Codecov by Sentry. |
no longer needed as we use scratch images now |
Fixes no issue
Description
Checklist
develop
Chart.yaml
(if necessary)