jeremylong / DependencyCheck

OWASP dependency-check is a software composition analysis utility that detects publicly disclosed vulnerabilities in application dependencies.
https://owasp.org/www-project-dependency-check/
Apache License 2.0
6.39k stars 1.27k forks source link

golang: Golang Mod Analyzer should report vulnerability about golang itself #3492

Open clfsoft opened 3 years ago

clfsoft commented 3 years ago

Describe the bug Golang Mod Analyzer doesn't report vulnerability about itself. go.mod
go 1.13 it should report vulnerability CVE-2020-28366, but report nothing (Go before 1.14.12 and 1.15.x before 1.15.5 allows Code Injection.)

Version of dependency-check used The problem occurs using version 6.2.2 of the cli

Log file [INFO] Checking for updates [INFO] Skipping NVD check since last check was within 4 hours. [INFO] Skipping RetireJS update since last update was within 24 hours. [INFO] Check for updates complete (357 ms) [INFO]

Dependency-Check is an open source tool performing a best effort analysis of 3rd party dependencies; false positives and false negatives may exist in the analysis performed by the tool. Use of the tool and the reporting provided constitutes acceptance for use in an AS IS condition, and there are NO warranties, implied or otherwise, with regard to the analysis or its use. Any use of the tool and the reporting provided is at the user’s risk. In no event shall the copyright holder or OWASP be held liable for any damages whatsoever arising out of or in connection with the use of this tool, the analysis performed, or the resulting report.

About ODC: https://jeremylong.github.io/DependencyCheck/general/internals.html False Positives: https://jeremylong.github.io/DependencyCheck/general/suppression.html

? Sponsor: https://github.com/sponsors/jeremylong

[INFO] Analysis Started [INFO] Finished File Name Analyzer (0 seconds) [INFO] Finished Golang Mod Analyzer (0 seconds) [INFO] Finished Dependency Merging Analyzer (0 seconds) [INFO] Finished Version Filter Analyzer (0 seconds) [INFO] Finished Hint Analyzer (0 seconds) [INFO] Created CPE Index (2 seconds) [INFO] Finished NPM CPE Analyzer (2 seconds) [INFO] Created CPE Index (2 seconds) [INFO] Finished CPE Analyzer (3 seconds) [INFO] Finished False Positive Analyzer (0 seconds) [INFO] Finished NVD CVE Analyzer (0 seconds) [INFO] Finished Sonatype OSS Index Analyzer (0 seconds) [INFO] Finished Vulnerability Suppression Analyzer (0 seconds) [INFO] Finished Dependency Bundling Analyzer (0 seconds) [INFO] Analysis Complete (6 seconds) [INFO] Writing report to: X:\dependency-check-report.html

To Reproduce Steps to reproduce the behavior: dependency-check.bat --enableExperimental --out . --scan go.mod

Expected behavior

when specify go 1.13 in go.mod , dependency-check should report CVE-2020-28366

Additional context

aikebah commented 3 years ago

The go <version> in a go.mod does not indicate a dependency of the project. It only prescribes a baseline requirement on the build environment (go version must be same or higher and able to interpret the syntax used at the time of version <version>.

indicates that a module was written assuming the semantics of a given version of Go.

Go Modules reference

So I see no need to report the CVE for the go build tool when the module is written assuming the syntax of a give go version.