Merge branch 'fix-security-scanner' into 'main'

Use virtualenv for security-scanner

See merge request fablab/labsync!76
This commit is contained in:
jalr 2023-03-09 23:55:40 +00:00
commit 61a68b6b4c
2 changed files with 6 additions and 3 deletions

View file

@ -57,7 +57,7 @@ security_scanner:
script:
- set -x
- export GITLAB_URL="$(echo "$CI_PROJECT_URL" | grep -Eo '^https?://[^/]*')"
- python3 -m security_scanner $target
- /code/venv/bin/python -m security_scanner $target
only:
refs:
- schedules

View file

@ -7,14 +7,17 @@ RUN apt-get update \
python3 \
python3-apt \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/*
COPY setup.py /code/setup.py
WORKDIR /code
RUN pip3 install -e .
RUN python3 -m venv --system-site-packages venv
RUN venv/bin/pip install -e .
ADD . /code
RUN python3 setup.py install
RUN venv/bin/python setup.py install