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

Inroducing perl cpanfile dependency analyzer #2724

Closed
wants to merge 4 commits into from

Conversation

harj-the-dev
Copy link
Contributor

Fixes Issue

No. This is for a new feature I required and wanted to share.

Description of Change

Added perl scanner using dependencies listed in the cpanfile. Feature is hidden behind the --enableExperimental flag.
Example usage:

java -classpath "/path/*" -Dapp.name="dependency-check" -Dapp.repo="/hob" -Dapp.home="/path/" -Dbasedir="/path/" org.owasp.dependencycheck.App -s . --enableExperimental

Have test cases been added to cover the new functionality?

yes

@boring-cyborg boring-cyborg bot added core changes to core tests test cases labels Jul 16, 2020
@harj-the-dev harj-the-dev changed the title Main Inroducing perl cpanfile dependency analyzer Jul 17, 2020
@harj-the-dev
Copy link
Contributor Author

Hiya, Is there anything I can do to help get this feature included?

@jeremylong
Copy link
Owner

The design of this analyzer does not follow how dependency-check is intended to work. A FileTypeAnalyzer job is to create the dependency objects - in this case based off of the cpan file. The original cpan dependency should like be removed (see how the PIP analyzer works); you then create virtual dependencies from the 'required', 'recommended'. etc. entries from the CPAN file. Each dependency that gets created would have as much evidence as can be extracted (at least one entry in each 'vendor', 'product', and 'version' bucket - in addition one would want to add a PURL identifier (again see how the PIP analyzer works).

Once this is done the other analyzers in the pipeline (CPE Analyzer, NVD CVE Analyzer, OSS Index Analyzer, etc.) will populate the vulnerability information.

The only analyzers that actually add vulnerabilities directly to the dependency object are those that are actually running some form of SCA vulnerability analysis such as Ruby Bundle Audit or npm audit.

@jeremylong
Copy link
Owner

Thanks for the base code. I have updated the code and created a new PR based on your original PR (see #3378).

@jeremylong jeremylong closed this May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core changes to core tests test cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants