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

feat(config): added config to avoid exit code 1 for scan failure #102

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

utsavmaniyar
Copy link
Contributor

This PR is addressing issue #101 which talks about having difficulty to exit the process with status code exit : 0. As part of these changes, I have added -ignore-failure configuration and set the default value to false. Meaning this is non breaking change and provide user a way to configure the final exit status upon scan completion.


Usage Example:

go run go-earlybird.go --path=/Users/hero/repo1 --fail-severity low --ignore-failure=true

Output

Finding # 1:
        Code #: 4059
        Filename: /Users/hero/repo1/temp/src/test/resources/secrets/sample.jks
        Caption: Java keystore file
        Category: key
        Line #: 0
        Value: sample.jks
        Severity: medium
        Confidence: high
        Labels: None
        Associated CWEs: CWE-312/CWE-321

        ***** Total issues found *****
            1 Java keystore file
            1 TOTAL ISSUES
2024/02/06 07:43:15 
303 files scanned in 483.806286ms
2024/02/06 07:43:15 
114 rules observed
Scan detected findings above the accepted threshold -- Failing.

@utsavmaniyar utsavmaniyar linked an issue Feb 6, 2024 that may be closed by this pull request
@utsavmaniyar utsavmaniyar merged commit 30ae62c into main Feb 7, 2024
3 checks passed
Copy link

github-actions bot commented Feb 7, 2024

🎉 This PR is included in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

if fail-severity flag is optional return exit 0
2 participants