Skip to content

Commit

Permalink
fix:semgrep - Disable collect metrics and fix log message (#968)
Browse files Browse the repository at this point in the history
In this commit I change semgrep tool to not collect information
of the your analysis. And I found an error in Log when semgrep
fails was showing the tool name wrong.

Signed-off-by: wilian <wilian.silva@zup.com.br>
(cherry picked from commit f14f910)
  • Loading branch information
wiliansilvazup authored and nathanmartinszup committed Feb 9, 2022
1 parent 077d21b commit 5359bed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/services/formatters/generic/semgrep/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ package semgrep

const CMD = `
{{WORK_DIR}}
semgrep --config=p/r2c-ci -q --json .
semgrep --disable-metrics --config=p/r2c-ci -q --json .
`
2 changes: 1 addition & 1 deletion internal/services/formatters/generic/semgrep/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (f *Formatter) StartAnalysis(projectSubPath string) {
}

output, err := f.startSemgrep(projectSubPath)
f.SetAnalysisError(err, tools.SecurityCodeScan, output, projectSubPath)
f.SetAnalysisError(err, tools.Semgrep, output, projectSubPath)
f.LogDebugWithReplace(messages.MsgDebugToolFinishAnalysis, tools.Semgrep, languages.Generic)
}

Expand Down

0 comments on commit 5359bed

Please sign in to comment.