Skip to content

Commit af8d7e3

Browse files
committed
Changed exit with error code when vulnerabilities are found
fixes #76
1 parent 52f1e5a commit af8d7e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

log4j-finder.py

+2
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ def main():
365365
print_summary(stats)
366366
print(f"\nElapsed time: {elapsed:.2f} seconds")
367367

368+
# If we find vulnerabilities then exit with error code (True = 1)
369+
return stats["vulnerable"] > 0
368370

369371
if __name__ == "__main__":
370372
try:

0 commit comments

Comments
 (0)