From f023a9d39bc736e8dc3d0b40b543728114c55dcf Mon Sep 17 00:00:00 2001
From: "Mayr, Hannes" <hannes.mayr@stud.tu-darmstadt.de>
Date: Tue, 27 Sep 2022 12:59:45 +0200
Subject: [PATCH] Include SAST config.

---
 .gitlab-ci.yml | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d64b23c..05f4511 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,23 +1,18 @@
-# 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
 image: python:latest
 stages:
 - linting
 - testing
 - docs
 - test
+
+# Change pip's cache directory to be inside the project directory since we can
+# only cache local items.
 variables:
   PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
-cache:
-  paths: 
+
 before_script:
-- python --version
-- pip install -r requirements.txt
+- python --version  # For debugging
+- pip install -r requirements.txt  # install dependencies from file
 PEP8:
   stage: linting
   script:
@@ -27,7 +22,7 @@ Pylint:
   stage: linting
   script:
   - pip install pylint
-  - find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc'
+  - find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc'  # Find all python files and check the code with pylint
 test:
   stage: testing
   tags:
@@ -38,7 +33,7 @@ test:
 pages:
   stage: docs
   script:
-  - pip install -U sphinx sphinx-autoapi sphinx_rtd_theme myst-parser
+  - pip install -U sphinx sphinx-autoapi sphinx_rtd_theme myst-parser  # sphinx_panels
   - cd docs
   - make html
   - mv build/html/ ../public
@@ -54,3 +49,10 @@ sast:
   stage: test
 include:
 - template: Security/SAST.gitlab-ci.yml
+# 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
-- 
GitLab