将findsecbugs插件与Gradle';s findbugs插件
我计划使用插件来扫描java代码中的漏洞。我正在寻找要包含在build.gradle文件中的配置参数。差不多将findsecbugs插件与Gradle';s findbugs插件,gradle,findbugs,Gradle,Findbugs,我计划使用插件来扫描java代码中的漏洞。我正在寻找要包含在build.gradle文件中的配置参数。差不多 注:我能够将FindBugs插件与Gradle一起使用。我尝试并找到了工作配置。在下面发布工作配置: apply plugin: 'java' apply plugin: 'findbugs' apply plugin: 'maven' apply plugin: 'signing' sourceCompatibility = 1.7 de
注:我能够将FindBugs插件与Gradle一起使用。我尝试并找到了工作配置。在下面发布工作配置:
apply plugin: 'java'
apply plugin: 'findbugs'
apply plugin: 'maven'
apply plugin: 'signing'
sourceCompatibility = 1.7
dependencies {
findbugs 'com.google.code.findbugs:findbugs:3.0.0'
findbugs configurations.findbugsPlugins.dependencies
// Here we specify the findbugsPlugins
findbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.2.0'
}
task findbugs(type: FindBugs) {
classes = fileTree(project.rootDir.absolutePath).include("**/*.class");
source = fileTree(project.rootDir.absolutePath).include("**/*.java");
classpath = files()
pluginClasspath = project.configurations.findbugsPlugins
findbugs {
toolVersion = "3.0.0"
sourceSets = [sourceSets.main]
ignoreFailures = true
reportsDir = file("$project.buildDir/findbugsReports")
effort = "max"
reportLevel = "high"
includeFilter = file("$rootProject.projectDir/include.xml")
excludeFilter = file("$rootProject.projectDir/exclude.xml")
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
}
关于这一点的一个问题现在在回购协议上是公开的:我去了你在github上提到的那个问题,并留下了这个修复。现在我无法访问该页面。获取404错误。看起来项目已被移动:您是否设法同时运行findbugs和findsecuritybugs?@user902383是的,请参阅上述答案中的依赖项部分。Thx,我意识到我在排除文件中排除了常规错误,但无论如何,谢谢。