Skip to main content
When executing a GitLab job that collects verbose (-v) or debug (--debug) logs from Semgrep, you may see the following error message:
GitLab normally limits CI job logs to around 4 MB in size, and verbose Semgrep logs can exceed this size limit, leading to the error.

Solution: Save the log as an artifact

You can save larger log files using artifacts to create a job artifact from the log file. To do that:
  1. Update the semgrep ci command to redirect logs to a file: semgrep ci --debug &> semgrep.log.
  2. Add the resulting log file to the artifacts section of the CI configuration.
Here is an example based on the sample GitLab CI/CD configuration:
You can download the full log from several locations, including the “Job artifacts” area in the job.