gpt4 book ai didi

gradle - 使用Spotbug的简单gradle文件并查找安全性bug?

转载 作者:行者123 更新时间:2023-12-03 03:46:29 25 4
gpt4 key购买 nike

是否有人使用“旧”形式的插件条目为gradle 5.X提供了基本的gradle文件,该文件同时使用了Spotbug和Find-security-bug,并且在运行./gradlew clean build时将同时执行Spot和安全漏洞?

我可以使现场Bug正常工作(为什么将它们重命名?令人讨厌),但无法使安全Bug正常工作。

最佳答案

从这个有用的博客https://www.amolsolutions.com/insights/static-code-checks-for-security

plugins {

id 'com.gradle.build-scan' version '1.12.1'

id "com.github.spotbugs" version "1.6.2"

}

dependencies {

...

spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.7.1'

}

...

tasks.withType(com.github.spotbugs.SpotBugsTask) {

reports {

xml.enabled false

html.enabled true

}

}

您会知道它起作用的原因是,“安全性”链接将出现在部分列表中。

关于gradle - 使用Spotbug的简单gradle文件并查找安全性bug?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55678280/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com