Skip to content

Commit 6ba8b40

Browse files
committed
return nonzero when scan finds verboten pattern
1 parent e984aae commit 6ba8b40

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

samples/python-git-secrets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ def perform_scan():
5858
print("Scanning {} recursively".format(args.scan))
5959
if gs.scan_recursively(args.scan):
6060
print("Found verboten string in path {}".format(args.scan))
61+
exit(1)
6162
else:
6263
print("Scanning {}".format(args.scan))
6364
if gs.scan_file(args.scan):
6465
print("Found verboten string in file {}".format(args.scan))
66+
exit(1)
6567

6668

6769
if __name__ == "__main__":

0 commit comments

Comments
 (0)