提前祝各位大佬端午节安康,假期快乐!!!
环境准备
1、下载源代码
git clone --depth 1 https://github.com/jeremylong/DependencyCheck.git
2、安装jdk/maven,安装的过程这里不过多赘述,各位看官如果需要,请
自行安装基础环境。
mvn -s settings.xml install
但是会遇到一个问题
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project dependency-check-utils: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]
解决方法:
跳过maven test,使用以下指令进行构建安装
mvn -s settings.xml install -DskipTests
3、使用
.bindependency-check.bat -h
.bindependency-check.bat --project Testing --out . --scan [path to jar files to be scanned]
4、离线扫描
如果需要在客户现场使用dependency check 做供应链分析,并且客户主机无法链接外网,这时候需要使用dependency check的离线扫描功能,使用在外网已经更新好数据库的运行程序,拷贝到内网主机上面,在扫描过程中增加
“-n”参数来跳过更新CPE数据库。
.bindependency-check.bat -n --project Testing --out . --scan [path to jar files to be scanned]
参考
https://github.com/jeremylong/DependencyCheck
https://jeremylong.github.io/DependencyCheck/
https://yq.aliyun.com/articles/698621
https://www.cnblogs.com/shengulong/p/7698428.html
https://www.secpulse.com/archives/73373.html
原文始发于微信公众号(代码审计SDL):dependecy check 使用教程
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论