Skip to content
Snippets Groups Projects

Configure SAST in `.gitlab-ci.yml`, creating this file if it does not already exist

Closed Oscar Gustafsson requested to merge set-sast-config-1 into master
+ 28
25
 
# You can override the included template(s) by including variable overrides
 
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
 
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
 
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
 
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
 
# Note that environment variables can be set in several places
 
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
stages:
stages:
- test
- test
before_script:
before_script:
- apt-get update --yes
- apt-get update --yes
- apt-get install --yes build-essential cmake libfmt-dev pybind11-dev
- apt-get install --yes build-essential cmake libfmt-dev pybind11-dev
- python -m pip install --upgrade pip
- python -m pip install --upgrade pip
- python --version
- python --version
- pip install pytest pytest-cov
- pip install pytest pytest-cov
- pip install .
- pip install .
- pip show b_asic
- pip show b_asic
".run-test":
.run-test:
stage: test
stage: test
script:
script:
- pytest --cov=b_asic --cov-report xml:cov.xml --cov-report term test
- pytest --cov=b_asic --cov-report xml:cov.xml --cov-report term test
artifacts:
artifacts:
reports:
reports:
coverage_report:
coverage_report:
coverage_format: cobertura
coverage_format: cobertura
path: cov.xml
path: cov.xml
run-test-3.6:
run-test-3.6:
image: python:3.6
image: python:3.6
extends: ".run-test"
extends: ".run-test"
run-test-3.7:
run-test-3.7:
image: python:3.7
image: python:3.7
extends: ".run-test"
extends: ".run-test"
run-test-3.8:
run-test-3.8:
image: python:3.8
image: python:3.8
extends: ".run-test"
extends: ".run-test"
run-test-3.9:
run-test-3.9:
image: python:3.9
image: python:3.9
extends: ".run-test"
extends: ".run-test"
run-test-3.10:
run-test-3.10:
image: python:3.10
image: python:3.10
extends: ".run-test"
extends: ".run-test"
run-test-qt:
run-test-qt:
image: python:3.10
image: python:3.10
extends: ".run-test"
extends: ".run-test"
script:
script:
- apt-get install --yes xvfb python3-pyqt5
- apt-get install --yes xvfb python3-pyqt5
- pip install pytest-xvfb pytest-qt
- pip install pytest-xvfb pytest-qt
- pytest --cov=b_asic --cov-report xml:cov.xml --cov-report term test
- pytest --cov=b_asic --cov-report xml:cov.xml --cov-report term test
 
sast:
 
stage: test
 
include:
 
- template: Security/SAST.gitlab-ci.yml
Loading