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

Updated Exit Codes #42

Merged
merged 8 commits into from
Oct 9, 2023
Merged

Updated Exit Codes #42

merged 8 commits into from
Oct 9, 2023

Conversation

swashko
Copy link
Collaborator

@swashko swashko commented Aug 18, 2023

Update the exit status codes to:

  • 0: Scan completed successfully, no vulnerabilities found
  • 1: Scan completed successfully, vulnerabilities found
  • 2: Scan failed, modelscan threw an error while scanning
  • 3: No supported files were passed to the tool
  • 4: Usage error, CLI was passed invalid or incomplete options

resolves issue #41

Return 1 for issues found, 0 for safe
The CLI exit status codes are:
- `0`: Scan completed successfully, no vulnerabilities found
- `1`: Scan completed successfully, vulnerabilities found
- `2`: Scan failed, modelscan threw an error while scanning
- `3`: No supported files were passed to the tool
- `4`: Usage error, CLI was passed invalid or incomplete options
@swashko swashko self-assigned this Aug 18, 2023
@swashko swashko requested a review from seanpmorgan September 27, 2023 19:13
Copy link
Member

@cherbel cherbel left a comment

Choose a reason for hiding this comment

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

Couple of small comments, otherwise looks good to me!

README.md Outdated Show resolved Hide resolved
modelscan/cli.py Outdated Show resolved Hide resolved
modelscan/cli.py Outdated Show resolved Hide resolved
@swashko swashko requested a review from cherbel October 5, 2023 19:39
Copy link
Member

@cherbel cherbel left a comment

Choose a reason for hiding this comment

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

Changes look good, just one small formatting comment.

modelscan/cli.py Outdated Show resolved Hide resolved
Copy link
Member

@cherbel cherbel left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@swashko swashko merged commit 3c87e3d into main Oct 9, 2023
8 checks passed
@swashko swashko deleted the exit-codes branch October 9, 2023 20:48
@swashko swashko restored the exit-codes branch October 9, 2023 21:23
@seanpmorgan seanpmorgan deleted the exit-codes branch October 15, 2023 23:56
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.

2 participants