From af8d7e308516be77b22a8a0160a88563136f2533 Mon Sep 17 00:00:00 2001 From: Eric Silva Date: Thu, 23 Dec 2021 16:10:40 -0600 Subject: [PATCH] Changed exit with error code when vulnerabilities are found fixes fox-it/log4j-finder#76 --- log4j-finder.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/log4j-finder.py b/log4j-finder.py index c2b6498..566c4bc 100755 --- a/log4j-finder.py +++ b/log4j-finder.py @@ -365,6 +365,8 @@ def main(): print_summary(stats) print(f"\nElapsed time: {elapsed:.2f} seconds") + # If we find vulnerabilities then exit with error code (True = 1) + return stats["vulnerable"] > 0 if __name__ == "__main__": try: