Skip to content

Commit

Permalink
Changed exit with error code when vulnerabilities are found
Browse files Browse the repository at this point in the history
fixes fox-it#76
  • Loading branch information
ericrbs committed Dec 28, 2021
1 parent 52f1e5a commit af8d7e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions log4j-finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit af8d7e3

Please sign in to comment.