Skip to content

enhancement: tool should return non-zero return code if vulnerabilities found #9

@mcallaghan-bsm

Description

@mcallaghan-bsm

A suggestion/enhancement! it would be great (for CI / gitlab / etc) - if ANY vulnerabilities are found, the tool returns non-zero

consider:

$ dotnet-ossindex (params) ./FooMySolution.sln

...
  10 project(s) found

  No packages affected

  No packages affected

etc

$ echo $?
0

but ... if we find vulnerabilities

$ dotnet-ossindex (params) ./FooMySolution.sln

...
  10 project(s) found

  No packages affected

  1 package(s) affected

          Package: pkg:nuget/jQuery@3.3.0
        Reference: https://ossindex.sonatype.org/component/pkg:nuget/jQuery@3.3.0
  Vulnerabilities: - MEDIUM   [CVE-2019-11358]  Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")
                   - MEDIUM   CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

etc

$ echo $?
0

suggestion is that the tool returns a non-zero return code if ANY vulnerabilities are found;
(certainly up for debate or configuration if the user wants to filter or exclude certain severity?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions