Skip to content

Commit

Permalink
return nonzero when scan finds verboten pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
mbacchi committed Aug 10, 2018
1 parent e984aae commit 6ba8b40
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions samples/python-git-secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ def perform_scan():
print("Scanning {} recursively".format(args.scan))
if gs.scan_recursively(args.scan):
print("Found verboten string in path {}".format(args.scan))
exit(1)
else:
print("Scanning {}".format(args.scan))
if gs.scan_file(args.scan):
print("Found verboten string in file {}".format(args.scan))
exit(1)


if __name__ == "__main__":
Expand Down

0 comments on commit 6ba8b40

Please sign in to comment.