Commit 55af1b78 authored by Mickaël Desfrênes's avatar Mickaël Desfrênes
Browse files

Mettre à jour le fichier .gitlab-ci.yml

parent 45e6e5c0
Loading
Loading
Loading
Loading
+18 −14
Original line number Diff line number Diff line
stages:
  - prepare
  - test

include:
  - template: Jobs/Secret-Detection.gitlab-ci.yml
  - template: Jobs/Dependency-Scanning.gitlab-ci.yml

variables:
  SECRET_DETECTION_HISTORIC_SCAN: "true"
  DS_MAX_DEPTH: "10"

generate_requirements:
  stage: prepare
  image: python:3.12-slim
secret_detection:
  stage: test

dependency_vulnerability_scan:
  stage: test
  image:
    name: ghcr.io/google/osv-scanner:v2
    entrypoint: [""]
  script:
    - pip install uv
    - uv export --format requirements-txt --no-hashes --output-file requirements.txt
    - |
      set +e
      osv-scanner scan --lockfile=uv.lock \
        --format=json \
        --output=osv-report.json
      STATUS=$?
      test -f osv-report.json
      exit $STATUS
  artifacts:
    when: always
    paths:
      - requirements.txt

gemnasium-python-dependency_scanning:
  stage: test
  dependencies:
    - generate_requirements
 No newline at end of file
      - osv-report.json
 No newline at end of file