diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a67ad057..c4dacfb4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -360,6 +360,28 @@ tests_laravel: - if: $CI_COMMIT_TAG != null +bun-security: + stage: security + image: oven/bun:1.3.11 + before_script: + - echo "@ldc-web:registry=https://${CI_SERVER_HOST}/api/v4/packages/npm/" >> .npmrc + - echo "//${CI_SERVER_HOST}/api/v4/packages/npm/:_authToken=${CI_DEPLOY_PASSWORD}" >> .npmrc + - echo "@uwil:registry=https://lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/" >> .npmrc + - echo "//lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/:_authToken=${CI_DEPLOY_PASSWORD}" >> .npmrc + script: + - bun audit --json > bun-security-checker-report.json + artifacts: + when: on_failure + expose_as: 'bun-security-checker' + paths: + - bun-security-checker-report.json + allow_failure: true + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main" + - if: $CI_COMMIT_TAG != null + + stages: - install - lint