Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions document-manager/backend/openshift.dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
FROM public.ecr.aws/bitnami/python:3.12.4

WORKDIR /opt/app-root/src
FROM python:3.12-slim

WORKDIR /app

# Install dependencies
RUN install_packages gcc libc6-dev libpq-dev libmagic-dev
RUN apt-get update -yqq && \
apt-get install -y gcc libc6-dev libpq-dev libmagic-dev && \

Check warning on line 7 in document-manager/backend/openshift.dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make sure automatically installing recommended packages is safe here.

See more on https://sonarcloud.io/project/issues?id=bcgov_moh-prime&issues=AZ60ywi6_DMuGrKcji4h&open=AZ60ywi6_DMuGrKcji4h&pullRequest=2863

Check warning on line 7 in document-manager/backend/openshift.dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Sort these package names alphanumerically.

See more on https://sonarcloud.io/project/issues?id=bcgov_moh-prime&issues=AZ60ywi6_DMuGrKcji4i&open=AZ60ywi6_DMuGrKcji4i&pullRequest=2863

Check notice

Code scanning / SonarCloud

Recommended packages should not be automatically installed Low

Make sure automatically installing recommended packages is safe here. See more on SonarQube Cloud
Comment thread
bergomi02 marked this conversation as resolved.
Dismissed
rm -rf /var/lib/apt/lists/*

# Install the requirements
COPY ./requirements.txt .
RUN pip install wheel && \
pip install -r requirements.txt --src /opt/app-root/src
RUN pip install --no-cache-dir wheel && \

Check warning on line 12 in document-manager/backend/openshift.dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Merge this RUN instruction with the consecutive ones.

See more on https://sonarcloud.io/project/issues?id=bcgov_moh-prime&issues=AZ60ywi6_DMuGrKcji4f&open=AZ60ywi6_DMuGrKcji4f&pullRequest=2863
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
pip install --no-cache-dir -r requirements.txt

Check warning on line 13 in document-manager/backend/openshift.dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Omitting "--only-binary :all:" can lead to the execution of setup scripts. Make sure it is safe here.

See more on https://sonarcloud.io/project/issues?id=bcgov_moh-prime&issues=AZ60ywi6_DMuGrKcji4j&open=AZ60ywi6_DMuGrKcji4j&pullRequest=2863

Check warning on line 13 in document-manager/backend/openshift.dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Using dependencies without locking resolved versions is security-sensitive.

See more on https://sonarcloud.io/project/issues?id=bcgov_moh-prime&issues=AZ60ywi6_DMuGrKcji4k&open=AZ60ywi6_DMuGrKcji4k&pullRequest=2863

Check warning

Code scanning / SonarCloud

Python package manager scripts should not be executed during installation Medium

Omitting "--only-binary :all:" can lead to the execution of setup scripts. Make sure it is safe here. See more on SonarQube Cloud

Check warning

Code scanning / SonarCloud

Python dependencies should be locked to verified versions Medium

Using dependencies without locking resolved versions is security-sensitive. See more on SonarQube Cloud
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

RUN apt-get purge -y --auto-remove gcc libc6-dev

Expand All @@ -19,4 +20,4 @@

# Run the server
EXPOSE 5001 9191
ENTRYPOINT /opt/app-root/src/app.sh backend
ENTRYPOINT ["./app.sh", "backend"]
Loading