一,效果如下
点击选择文件,上传需要扫描的code压缩包
点击开始构建,开始源码扫描
二、如何取测试报告
工作空间 只保留最新一次的报告(同时,此处做了备份处理,在execute shell中将每次的报告都备份一份到工程目录下的report文件夹中,如果需要取以前的构建的报告,可以从服务器去取。)
三、配置如下:
1.参数配置
2.execute shell配置
echo ${BUILD_NUMBER} echo ${WORKSPACE} cd ${WORKSPACE}/file unzip -d ./data data.zip rm -rf data.zip cd data fpr_file="Fortify_scan_fpr_${BUILD_NUMBER}.fpr" report_file="Fortify_scan_report_${BUILD_NUMBER}.pdf" #开始扫描 source ~/.bash_profile sourceanalyzer -b SCG-AuthCenter -clean sourceanalyzer -b auth1 --clean sourceanalyzer -b auth1 . sourceanalyzer -b auth1 -scan -f ${fpr_file} /data/fortify/fortify_install/bin/../Core/private-bin/awb/eclipse/eclipse -vm /data/fortify/fortify_install/bin/../jre/bin/java -name Fortify Report Generation -noSplash --launcher.suppressErrors -startup /data/fortify/fortify_install/bin/../Core/lib/awb-startup-20.1.0.0158.jar -productType BIRT- -application com.hp.fortify.birt.report.generator.console.Application -template "CWE Top 25 2019" -format pdf -output ${report_file} -source ${fpr_file} --SecurityIssueDetails --UseFortifyPriorityOrder -consoleLog -vmargs -Dcom.fortify.InstallRoot=/data/fortify/fortify_install/bin/.. -Xmx1500M cp ${fpr_file} ${report_file} ../../../report/ #备份报告到工程目录下标签:bin,..,扫描,源码,fortify,file,report,data From: https://www.cnblogs.com/happylumei/p/16716127.html