Skip to content

Trim whitespace from excluded paths

James Liu requested to merge jliu/trim-excluded-paths into main

What does this MR do?

Trims leading whitespace from values in the SAST_EXCLUDED_PATHS environment variable after it's split. Exclusion patterns with leading whitespace appear to be ignored completely by Semgrep, which can cause much confusion and frustration for users.

The default value for SAST_EXCLUDED_PATHS includes whitespace between the comma-separated values too. This effectively becomes a no-op as those patterns are ignored by Semgrep. This issue has surfaced on Stackoverflow as well as gitlab-org/gitlab#332187 (closed).

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Edited by Lucas Charles

Merge request reports

Loading