Skip to content

Allow disabling poetry scans when running experimental scans #5142

@jamur2

Description

@jamur2

Describe the bug
jeremylong/DependencyCheck#5025 added support for scanning poetry-style Python dependencies (thanks, by the way!). However, it looks like when running with --enableExperimental, you cannot disable the poetry scan.

It looks like a --disablePoetry flag was intended to be introduced in https://github.com/nerdinand/DependencyCheck/blob/afd165b02ad0bfa1e46845797f19c6bbeb058768/cli/src/main/java/org/owasp/dependencycheck/CliParser.java#L1249, but wasn't actually added to the addAdvancedOptions list in https://github.com/nerdinand/DependencyCheck/blob/afd165b02ad0bfa1e46845797f19c6bbeb058768/cli/src/main/java/org/owasp/dependencycheck/CliParser.java#L343. I think just adding that option there would fix the issue?

Version of dependency-check used
7.4.1

Log file

No log file is generated when invalid command line options are provided, but the output looks like:

$ dependency-check . -f HTML -s . --enableExperimental --disablePoetry 
Unrecognized option: --disablePoetry
usage: Dependency-Check Core [--advancedHelp] [--enableExperimental]
       [--exclude <pattern>] [-f <format>] [--failOnCVSS <score>] [-h]
       [--junitFailOnCVSS <score>] [-l <file>] [-n] [-o <path>]
       [--prettyPrint] [--project <name>] [-s <path>] [--suppression
       <file>] [-v]

To Reproduce
Run dependency-check with the --disablePoetry flag.

Eg.,

$ dependency-check . -f HTML -s . --enableExperimental --disablePoetry 

Expected behavior
All scans (including experimental) will be run, except for Poetry dependencies.

Additional context
None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions