Exit code should be 0 for successful program completion

Bug #1703065 reported by Adam Parsons
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bandit
Won't Fix
Undecided
Unassigned

Bug Description

https://github.com/openstack/bandit/blob/master/bandit/cli/main.py#L346

Bandit should always return zero upon successful program completion. If a non-zero exit code is returned, it indicates an unsuccessful program completion in a general sense.

Adam Parsons (nlytnmnt)
description: updated
Revision history for this message
Travis McPeak (travis-mcpeak) wrote : Re: [Bug 1703065] [NEW] Exit code should be 0 for successful program completion

This is intentional so that we can inspect the error code in CI. Returning
0 regardless forces the calling automation to parse results to find out if
there are findings.

On Fri, Jul 7, 2017, 8:00 PM Adam Parsons <email address hidden> wrote:

> Public bug reported:
>
> https://github.com/openstack/bandit/blob/master/bandit/cli/main.py#L346
>
> Bandit should always return zero upon successful program completion. If
> a non-zero exit code is returned, it indicates an unsuccessful program
> completion in a general sense.
>
> ** Affects: bandit
> Importance: Undecided
> Status: New
>
> ** Description changed:
>
> https://github.com/openstack/bandit/blob/master/bandit/cli/main.py#L346
>
> - Bandit should always return 0 upon successful program completion. If a
> - non-zero exit code is returned, it indicates an unsuccessful program
> + Bandit should always return zero upon successful program completion. If
> + a non-zero exit code is returned, it indicates an unsuccessful program
> completion in a general sense.
>
> --
> You received this bug notification because you are subscribed to Bandit.
> https://bugs.launchpad.net/bugs/1703065
>
> Title:
> Exit code should be 0 for successful program completion
>
> Status in Bandit:
> New
>
> Bug description:
> https://github.com/openstack/bandit/blob/master/bandit/cli/main.py#L346
>
> Bandit should always return zero upon successful program completion.
> If a non-zero exit code is returned, it indicates an unsuccessful
> program completion in a general sense.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/bandit/+bug/1703065/+subscriptions
>

Revision history for this message
Luke Hinds (lhinds) wrote :

Is this affecting upstream use of Bandit Adam? If not, will close as 'Won't fix' whereas if you need a zero return, we could perhaps have a config value that sets the exit type?

Revision history for this message
Luke Hinds (lhinds) wrote :

Will change to Won't fix and can be reopened if your reporter still requires the change.

Changed in bandit:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.