diff --git a/templates/gitlab-ci-node.yml b/templates/gitlab-ci-node.yml index 434d4705ab65815d711fd1cb67a191932838fdc1..ebb279a8602cb57450cc49dddfe80b2daae09cd2 100644 --- a/templates/gitlab-ci-node.yml +++ b/templates/gitlab-ci-node.yml @@ -787,14 +787,13 @@ node-semgrep: stage: test before_script: - *node-scripts - - cd $NODE_PROJECT_DIR - - mkdir -p -m 777 reports + - mkdir -p -m 777 ${NODE_PROJECT_DIR}/reports - setup_semgrep_rules script: - >- - semgrep ci ${TRACE+--verbose} ${NODE_SEMGREP_ARGS} - --gitlab-sast-output=reports/node-semgrep.gitlab.json - ${DEFECTDOJO_SEMGREP_REPORTS:+--json-output=reports/node-semgrep.native.json} + semgrep ci ${TRACE+--verbose} ${NODE_SEMGREP_ARGS} --subdir ${NODE_PROJECT_DIR} + --gitlab-sast-output=${NODE_PROJECT_DIR}/reports/node-semgrep.gitlab.json + ${DEFECTDOJO_SEMGREP_REPORTS:+--json-output=${NODE_PROJECT_DIR}/reports/node-semgrep.native.json} artifacts: name: "$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG" when: always