Chúng ta có thể sử dụng câu lệnh này:
mvn org.owasp:dependency-check-maven:check
Để kiểm tra liệu các dependencies liệu có dính lỗ hổng bảo mật nào không nhé. Lần đầu tiên chạy có thể mất 20 phút để nó download dữ liệu từ National Vulnerability Database (NVD) cung cấp bởi NIST:
https://nvd.nist.govKết quả chúng ta nhận được sẽ kiểu:
One or more dependencies were identified with known vulnerabilities in [project name]:
log4j-1.2.17.jar (pkg:maven/log4j/log4j@1.2.17, cpe:2.3:a:apache:log4j:1.2.17:*:*:*:*:*:*:*) : CVE-2019-17571, CVE-2020-9488, CVE-2021-4104
See the dependency-check report for more details.