Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail with exit error code when vulnerability are found #77

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ericrbs
Copy link

@ericrbs ericrbs commented Dec 23, 2021

fixes #76

@ericrbs ericrbs changed the title Update log4j-finder.py Fail with exit error code when -f is provided Dec 23, 2021
Copy link
Member

@yunzheng yunzheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just make this return value by default without introducing any new flags.

You can remove the -f and --fail arguments, and at the end replace the if statement with:

return stats["vulnerable"] > 0

log4j-finder.py Outdated Show resolved Hide resolved
log4j-finder.py Outdated Show resolved Hide resolved
@ericrbs
Copy link
Author

ericrbs commented Dec 28, 2021

@yunzheng Changes done! Please review again. Thank you.

@ericrbs ericrbs changed the title Fail with exit error code when -f is provided Fail with exit error code when vulnerability are found Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exit with error when Vulnerability is found (optional parameter)
2 participants