mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
fix: ignore baseline if path was not relative in source (#1101)
* fix: ignore baseline if path was not relative in source Signed-off-by: Raffael Sahli <raffael.sahli@doodle.com> * test: ignore test secret --------- Signed-off-by: Raffael Sahli <raffael.sahli@doodle.com>
This commit is contained in:
1 parent
088f8b8074
commit
025908808f
4 files changed
+35
-5
No files matched your search
+1
-1
@@ -86,7 +86,7 @@ func runDetect(cmd *cobra.Command, args []string) {
|
||||
// ignore findings from the baseline (an existing report in json format generated earlier)
|
||||
baselinePath, _ := cmd.Flags().GetString("baseline-path")
|
||||
if baselinePath != "" {
|
||||
err = detector.AddBaseline(baselinePath)
|
||||
err = detector.AddBaseline(baselinePath, source)
|
||||
if err != nil {
|
||||
log.Error().Msgf("Could not load baseline. The path must point of a gitleaks report generated using the default format: %s", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user