Skip to content

Commit f2e24b1

Browse files
committed
msg-filter: abstract out source directory in GITLEAKS_WARNING
1 parent 5de9670 commit f2e24b1

8 files changed

+1764
-0
lines changed

src/lib/msg-filter.cc

+5
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ MsgFilter::MsgFilter():
117117
"^(use of uninitialized value '[^'<]+\\.<)[^>]+(>.[^']+)'",
118118
"\\1XXX\\2");
119119

120+
// abstract out source directory in /builddir/build/BUILD/...
121+
d->addMsgFilter("GITLEAKS_WARNING",
122+
"( has detected secret for file /builddir/build/BUILD/)[^/]+/",
123+
"\\1.../");
124+
120125
// auxiliary info provided by valgrind directly in the key event message
121126
d->addMsgFilter("VALGRIND_WARNING",
122127
" lost in loss record [0-9,]+ of [0-9,]+$", "");

tests/csdiff/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,6 @@ test_csdiff(diff-misc 10-pylint-copr)
7878
test_csdiff(diff-misc 11-pylint-copr-json)
7979
test_csdiff(diff-misc 12-shellcheck-sc222x)
8080
test_csdiff(diff-misc 13-gcca-filt)
81+
test_csdiff(diff-misc 14-gitleaks-paths)
8182

8283
add_subdirectory(filter-file)

tests/csdiff/diff-misc/14-gitleaks-paths-add-z.err

Whitespace-only changes.

tests/csdiff/diff-misc/14-gitleaks-paths-add.err

Whitespace-only changes.

tests/csdiff/diff-misc/14-gitleaks-paths-fix-z.err

Whitespace-only changes.

tests/csdiff/diff-misc/14-gitleaks-paths-fix.err

Whitespace-only changes.

tests/csdiff/diff-misc/14-gitleaks-paths-new.err

+879
Large diffs are not rendered by default.

tests/csdiff/diff-misc/14-gitleaks-paths-old.err

+879
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)