diff --git a/checks/check_trufflehog.py b/checks/check_trufflehog.py index 31c1628..2c2e362 100644 --- a/checks/check_trufflehog.py +++ b/checks/check_trufflehog.py @@ -1,6 +1,7 @@ import json import os import strictyaml +import sys CREDS_FILE = ".devrev/creds.yml" @@ -68,4 +69,12 @@ def check_trufflehog(json_path): print(f"Found secret in {fn}:{line_num}") return False print("No secrets found") - return True \ No newline at end of file + return True + +if __name__ == "__main__": + if len(sys.argv) < 2: + print("Usage: python check_trufflehog.py ") + sys.exit(1) + + json_path = sys.argv[1] + check_trufflehog(json_path)