OWASP / glue

Application Security Automation
Other
522 stars 112 forks source link

Fix dependency check task #146

Closed fmscorreia closed 5 years ago

fmscorreia commented 5 years ago

The Dependency Check task only offers support for the CLI tool and the sbt dependencyCheck plugin. Report analysis is not functional, as Dependency Check outputs CVSS scores that are on a 0-10 scale, with decimals, while Glue expects a 1-3 discrete scale.

The contributions on this PR are as follows:

Changes not directly related to this PR's objective:

omerlh commented 5 years ago

Thanks for your contribution. Overall it looks good, but I would suggest considering to use a dynamic task for OWASP dependency check. The main reason is to remove the need to add support for every language that is supported by dependency check. In this case, I think the coupling is too high - this was the motivation for introducing the dynamic task. Also, after putting all this effort - can you add some tests? Even a basic one just to make sure it's functional. Check out Snyk/Zap test as a reference.

fmscorreia commented 5 years ago

Hello, thanks for the feedback! I'll look into the Snyk/ZAP tests and add at least a basic one for dependency check as you suggested. I completely agree with the motivation for dynamic tasks, and will get into that as well after the tests

fmscorreia commented 5 years ago

I've added some basic tests, I'm not very familiar with Ruby and rspec, so forgive the simplicity. The tests only check the dependency-check CLI tool, not the sbt, maven nor gradle plugins. Since a transition to a dynamic task is on the roadmap I suppose it's not much of an issue, but if necessary I'll improve the tests with more checks.

omerlh commented 5 years ago

Merged - thank you!

fmscorreia commented 5 years ago

Thanks :)