Skip to content

Commit 47513e8

Browse files
committed
3466 Add findsecbugs spotbugs plugin
1 parent 960dbf2 commit 47513e8

File tree

51 files changed

+107
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+107
-5
lines changed

build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencyManagement {
2020

2121
versionCatalogUpdate {
2222
keep {
23-
versions.addAll("checkstyle", "gradle-git-properties", "jackson", "jacoco", "java", "jib-gradle-plugin", "pmd", "spotbugs", "spring-ai", "spring-boot", "spring-cloud-aws", "spring-cloud-dependencies", "spring-shell")
23+
versions.addAll("checkstyle", "findsecbugs", "gradle-git-properties", "jackson", "jacoco", "java", "jib-gradle-plugin", "pmd", "spotbugs", "spring-ai", "spring-boot", "spring-cloud-aws", "spring-cloud-dependencies", "spring-shell")
2424
}
2525
}
2626

@@ -31,7 +31,7 @@ subprojects {
3131

3232
dependencyManagement {
3333
dependencies {
34-
dependency("com.github.spotbugs:spotbugs-annotations:[4.9.3,)")
34+
dependency("com.github.spotbugs:spotbugs-annotations:[${rootProject.libs.versions.spotbugs.get()},)")
3535
}
3636
}
3737

@@ -40,6 +40,8 @@ subprojects {
4040

4141
implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
4242

43+
spotbugsPlugins("com.h3xstream.findsecbugs:findsecbugs-plugin:${rootProject.libs.versions.findsecbugs.get()}")
44+
4345
testCompileOnly(rootProject.libs.com.github.spotbugs.spotbugs.annotations)
4446

4547
testImplementation("org.springframework.boot:spring-boot-starter-test")

cli/commands/component/init/openapi/src/main/java/com/bytechef/cli/command/component/init/openapi/ComponentInitOpenApiGenerator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
/**
9797
* @author Ivica Cardic
9898
*/
99+
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
99100
public class ComponentInitOpenApiGenerator {
100101

101102
private static final Logger logger = LoggerFactory.getLogger(ComponentInitOpenApiGenerator.class);

cli/commands/component/src/main/java/com/bytechef/cli/command/component/ComponentCommand.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.bytechef.cli.command.component;
1818

1919
import com.bytechef.cli.command.component.init.openapi.ComponentInitOpenApiGenerator;
20+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2021
import java.io.File;
2122
import org.springframework.shell.command.annotation.Command;
2223
import org.springframework.shell.command.annotation.Option;
@@ -57,6 +58,7 @@ public void init(
5758
}
5859
}
5960

61+
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
6062
private void generateOpenApiComponent(
6163
String basePackageName, boolean internalComponent, String name, String openApiPath, String outputPath,
6264
int version) throws Exception {

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[versions]
22
checkstyle = "11.1.0"
33
com-google-auto-service = "1.1.1"
4+
findsecbugs = "1.14.0"
45
graalvm = "25.0.0"
56
jackson = "2.19.2"
67
jacoco = "0.8.13"

server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/config/VectorStoreConfiguration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
*/
4949
@Configuration
5050
@ConditionalOnProperty(prefix = "bytechef.ai.copilot", name = "enabled", havingValue = "true")
51+
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
5152
public class VectorStoreConfiguration {
5253

5354
private static final String CATEGORY = "category";

server/ee/libs/automation/automation-code-workflow-loader/src/main/java/com/bytechef/platform/codeworkflow/loader/automation/ProjectHandlerLoader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import com.bytechef.ee.platform.codeworkflow.configuration.domain.CodeWorkflowContainer.Language;
1111
import com.bytechef.workflow.ProjectHandler;
12+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
1213
import java.io.IOException;
1314
import java.net.URISyntaxException;
1415
import java.net.URL;
@@ -21,6 +22,7 @@
2122
*
2223
* @author Ivica Cardic
2324
*/
25+
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
2426
public class ProjectHandlerLoader {
2527

2628
public static ProjectHandler loadProjectHandler(

server/ee/libs/automation/automation-configuration/automation-configuration-service/src/main/java/com/bytechef/ee/automation/configuration/facade/ProjectCodeWorkflowFacadeImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
@Service
3939
@Transactional
4040
@ConditionalOnEEVersion
41+
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
4142
public class ProjectCodeWorkflowFacadeImpl implements ProjectCodeWorkflowFacade {
4243

4344
private final CacheManager cacheManager;

server/ee/libs/config/tenant-multi-data-config/src/main/java/com/bytechef/ee/tenant/multi/sql/MultiTenantDataSource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*
2424
* @author Ivica Cardic
2525
*/
26+
@SuppressFBWarnings("SQL_INJECTION_JDBC")
2627
public class MultiTenantDataSource implements DataSource {
2728

2829
private final DataSource dataSource;

server/ee/libs/core/tenant/tenant-multi-service/src/main/java/com/bytechef/ee/tenant/repository/TenantRepository.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
* @author Ivica Cardic
3737
*/
3838
@Repository
39+
@SuppressFBWarnings("SQL_INJECTION_JDBC")
3940
public class TenantRepository {
4041

4142
private final DataSource dataSource;

server/ee/libs/embedded/embedded-unified/embedded-unified-service/src/main/java/com/bytechef/ee/embedded/unified/facade/UnifiedApiFacadeImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
*/
5656
@Service
5757
@ConditionalOnEEVersion
58+
@SuppressFBWarnings("UNSAFE_HASH_EQUALS")
5859
public class UnifiedApiFacadeImpl implements UnifiedApiFacade {
5960

6061
private static final Logger log = LoggerFactory.getLogger(UnifiedApiFacadeImpl.class);

0 commit comments

Comments
 (0)