Skip to content

Fix exclusion patterns being matched against the absolute path of $CI_PROJECT_DIR

James Liu requested to merge jliu/remove-project-dir-arg into main

What does this MR do?

Providing the path to $CI_PROJECT_DIR as the final argument to Semgrep causes it to match exclusion patterns against the value of the argument (almost certainly the absolute path to where the repository is mounted in the analyzer's Docker container).

This causes several issues documented here: gitlab-org/gitlab#223283 (comment 995017201)

We don't need to explicitly provide the project path as we already set the working directory of the command to the path. This change invokes Semgrep from and relative to the project path.

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Edited by Lucas Charles

Merge request reports