diff --git a/build.gradle.kts b/build.gradle.kts index 2dd29ec0077..e9456e0bf23 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,7 +20,7 @@ dependencyManagement { versionCatalogUpdate { keep { - 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") + 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") } } @@ -31,7 +31,7 @@ subprojects { dependencyManagement { dependencies { - dependency("com.github.spotbugs:spotbugs-annotations:[4.9.3,)") + dependency("com.github.spotbugs:spotbugs-annotations:[${rootProject.libs.versions.spotbugs.get()},)") } } @@ -40,6 +40,8 @@ subprojects { implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)) + spotbugsPlugins("com.h3xstream.findsecbugs:findsecbugs-plugin:${rootProject.libs.versions.findsecbugs.get()}") + testCompileOnly(rootProject.libs.com.github.spotbugs.spotbugs.annotations) testImplementation("org.springframework.boot:spring-boot-starter-test") diff --git a/cli/commands/component/init/openapi/src/main/java/com/bytechef/cli/command/component/init/openapi/ComponentInitOpenApiGenerator.java b/cli/commands/component/init/openapi/src/main/java/com/bytechef/cli/command/component/init/openapi/ComponentInitOpenApiGenerator.java index 6a2c7df5ebd..01194e419fe 100644 --- a/cli/commands/component/init/openapi/src/main/java/com/bytechef/cli/command/component/init/openapi/ComponentInitOpenApiGenerator.java +++ b/cli/commands/component/init/openapi/src/main/java/com/bytechef/cli/command/component/init/openapi/ComponentInitOpenApiGenerator.java @@ -96,6 +96,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class ComponentInitOpenApiGenerator { private static final Logger logger = LoggerFactory.getLogger(ComponentInitOpenApiGenerator.class); diff --git a/cli/commands/component/src/main/java/com/bytechef/cli/command/component/ComponentCommand.java b/cli/commands/component/src/main/java/com/bytechef/cli/command/component/ComponentCommand.java index ae180db1679..e56aa5e55f2 100644 --- a/cli/commands/component/src/main/java/com/bytechef/cli/command/component/ComponentCommand.java +++ b/cli/commands/component/src/main/java/com/bytechef/cli/command/component/ComponentCommand.java @@ -17,6 +17,7 @@ package com.bytechef.cli.command.component; import com.bytechef.cli.command.component.init.openapi.ComponentInitOpenApiGenerator; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.File; import org.springframework.shell.command.annotation.Command; import org.springframework.shell.command.annotation.Option; @@ -57,6 +58,7 @@ public void init( } } + @SuppressFBWarnings("PATH_TRAVERSAL_IN") private void generateOpenApiComponent( String basePackageName, boolean internalComponent, String name, String openApiPath, String outputPath, int version) throws Exception { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 61158143c1c..02f858b7da0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,7 @@ [versions] checkstyle = "11.1.0" com-google-auto-service = "1.1.1" +findsecbugs = "1.14.0" graalvm = "25.0.1" jackson = "2.19.2" jacoco = "0.8.13" diff --git a/server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/config/VectorStoreConfiguration.java b/server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/config/VectorStoreConfiguration.java index 193294175b2..48e4d473fca 100644 --- a/server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/config/VectorStoreConfiguration.java +++ b/server/ee/libs/ai/ai-copilot/ai-copilot-service/src/main/java/com/bytechef/ee/ai/copilot/config/VectorStoreConfiguration.java @@ -48,6 +48,7 @@ */ @Configuration @ConditionalOnProperty(prefix = "bytechef.ai.copilot", name = "enabled", havingValue = "true") +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class VectorStoreConfiguration { private static final String CATEGORY = "category"; diff --git a/server/ee/libs/automation/automation-code-workflow-loader/src/main/java/com/bytechef/platform/codeworkflow/loader/automation/ProjectHandlerLoader.java b/server/ee/libs/automation/automation-code-workflow-loader/src/main/java/com/bytechef/platform/codeworkflow/loader/automation/ProjectHandlerLoader.java index 3566ace702d..67d03a6a182 100644 --- a/server/ee/libs/automation/automation-code-workflow-loader/src/main/java/com/bytechef/platform/codeworkflow/loader/automation/ProjectHandlerLoader.java +++ b/server/ee/libs/automation/automation-code-workflow-loader/src/main/java/com/bytechef/platform/codeworkflow/loader/automation/ProjectHandlerLoader.java @@ -9,6 +9,7 @@ import com.bytechef.ee.platform.codeworkflow.configuration.domain.CodeWorkflowContainer.Language; import com.bytechef.workflow.ProjectHandler; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.IOException; import java.net.URISyntaxException; import java.net.URL; @@ -21,6 +22,7 @@ * * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class ProjectHandlerLoader { public static ProjectHandler loadProjectHandler( diff --git a/server/ee/libs/automation/automation-configuration/automation-configuration-service/src/main/java/com/bytechef/ee/automation/configuration/facade/ProjectCodeWorkflowFacadeImpl.java b/server/ee/libs/automation/automation-configuration/automation-configuration-service/src/main/java/com/bytechef/ee/automation/configuration/facade/ProjectCodeWorkflowFacadeImpl.java index b94d1692432..60f6725d405 100644 --- a/server/ee/libs/automation/automation-configuration/automation-configuration-service/src/main/java/com/bytechef/ee/automation/configuration/facade/ProjectCodeWorkflowFacadeImpl.java +++ b/server/ee/libs/automation/automation-configuration/automation-configuration-service/src/main/java/com/bytechef/ee/automation/configuration/facade/ProjectCodeWorkflowFacadeImpl.java @@ -38,6 +38,7 @@ @Service @Transactional @ConditionalOnEEVersion +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class ProjectCodeWorkflowFacadeImpl implements ProjectCodeWorkflowFacade { private final CacheManager cacheManager; diff --git a/server/ee/libs/config/tenant-multi-data-config/src/main/java/com/bytechef/ee/tenant/multi/sql/MultiTenantDataSource.java b/server/ee/libs/config/tenant-multi-data-config/src/main/java/com/bytechef/ee/tenant/multi/sql/MultiTenantDataSource.java index 066b08de66e..310afd45169 100644 --- a/server/ee/libs/config/tenant-multi-data-config/src/main/java/com/bytechef/ee/tenant/multi/sql/MultiTenantDataSource.java +++ b/server/ee/libs/config/tenant-multi-data-config/src/main/java/com/bytechef/ee/tenant/multi/sql/MultiTenantDataSource.java @@ -23,6 +23,7 @@ * * @author Ivica Cardic */ +@SuppressFBWarnings("SQL_INJECTION_JDBC") public class MultiTenantDataSource implements DataSource { private final DataSource dataSource; diff --git a/server/ee/libs/core/tenant/tenant-multi-service/src/main/java/com/bytechef/ee/tenant/repository/TenantRepository.java b/server/ee/libs/core/tenant/tenant-multi-service/src/main/java/com/bytechef/ee/tenant/repository/TenantRepository.java index a84b31a0b98..7c6090a32c3 100644 --- a/server/ee/libs/core/tenant/tenant-multi-service/src/main/java/com/bytechef/ee/tenant/repository/TenantRepository.java +++ b/server/ee/libs/core/tenant/tenant-multi-service/src/main/java/com/bytechef/ee/tenant/repository/TenantRepository.java @@ -36,6 +36,7 @@ * @author Ivica Cardic */ @Repository +@SuppressFBWarnings("SQL_INJECTION_JDBC") public class TenantRepository { private final DataSource dataSource; diff --git a/server/ee/libs/embedded/embedded-unified/embedded-unified-service/src/main/java/com/bytechef/ee/embedded/unified/facade/UnifiedApiFacadeImpl.java b/server/ee/libs/embedded/embedded-unified/embedded-unified-service/src/main/java/com/bytechef/ee/embedded/unified/facade/UnifiedApiFacadeImpl.java index e6e2f77bd9e..5b312a7302a 100644 --- a/server/ee/libs/embedded/embedded-unified/embedded-unified-service/src/main/java/com/bytechef/ee/embedded/unified/facade/UnifiedApiFacadeImpl.java +++ b/server/ee/libs/embedded/embedded-unified/embedded-unified-service/src/main/java/com/bytechef/ee/embedded/unified/facade/UnifiedApiFacadeImpl.java @@ -55,6 +55,7 @@ */ @Service @ConditionalOnEEVersion +@SuppressFBWarnings("UNSAFE_HASH_EQUALS") public class UnifiedApiFacadeImpl implements UnifiedApiFacade { private static final Logger log = LoggerFactory.getLogger(UnifiedApiFacadeImpl.class); diff --git a/server/ee/libs/platform/platform-configuration/platform-configuration-rest/src/main/java/com/bytechef/ee/platform/configuration/web/rest/GitConfigurationApiController.java b/server/ee/libs/platform/platform-configuration/platform-configuration-rest/src/main/java/com/bytechef/ee/platform/configuration/web/rest/GitConfigurationApiController.java index 99f8f76c5d2..4629cfdcff6 100644 --- a/server/ee/libs/platform/platform-configuration/platform-configuration-rest/src/main/java/com/bytechef/ee/platform/configuration/web/rest/GitConfigurationApiController.java +++ b/server/ee/libs/platform/platform-configuration/platform-configuration-rest/src/main/java/com/bytechef/ee/platform/configuration/web/rest/GitConfigurationApiController.java @@ -12,6 +12,7 @@ import com.bytechef.ee.platform.configuration.facade.GitConfigurationFacade; import com.bytechef.ee.platform.configuration.web.rest.model.GitConfigurationModel; import com.bytechef.platform.annotation.ConditionalOnEEVersion; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.springframework.core.convert.ConversionService; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; @@ -26,6 +27,7 @@ @RequestMapping("${openapi.openAPIDefinition.base-path.platform:}/internal") @ConditionalOnCoordinator @ConditionalOnEEVersion +@SuppressFBWarnings("HARD_CODE_PASSWORD") public class GitConfigurationApiController implements GitConfigurationApi { protected static final String PASSWORD = "********"; diff --git a/server/ee/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-service/src/main/java/com/bytechef/ee/platform/customcomponent/configuration/facade/CustomComponentFacadeImpl.java b/server/ee/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-service/src/main/java/com/bytechef/ee/platform/customcomponent/configuration/facade/CustomComponentFacadeImpl.java index d16fb9a5191..f3ef7ff637c 100644 --- a/server/ee/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-service/src/main/java/com/bytechef/ee/platform/customcomponent/configuration/facade/CustomComponentFacadeImpl.java +++ b/server/ee/libs/platform/platform-custom-component/platform-custom-component-configuration/platform-custom-component-configuration-service/src/main/java/com/bytechef/ee/platform/customcomponent/configuration/facade/CustomComponentFacadeImpl.java @@ -36,6 +36,7 @@ @Service @Transactional @ConditionalOnEEVersion +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class CustomComponentFacadeImpl implements CustomComponentFacade { private final CacheManager cacheManager; diff --git a/server/ee/libs/platform/platform-custom-component/platform-custom-component-loader/src/main/java/com/bytechef/ee/platform/customcomponent/loader/ComponentHandlerLoader.java b/server/ee/libs/platform/platform-custom-component/platform-custom-component-loader/src/main/java/com/bytechef/ee/platform/customcomponent/loader/ComponentHandlerLoader.java index adada8aaca9..31a64e95293 100644 --- a/server/ee/libs/platform/platform-custom-component/platform-custom-component-loader/src/main/java/com/bytechef/ee/platform/customcomponent/loader/ComponentHandlerLoader.java +++ b/server/ee/libs/platform/platform-custom-component/platform-custom-component-loader/src/main/java/com/bytechef/ee/platform/customcomponent/loader/ComponentHandlerLoader.java @@ -9,6 +9,7 @@ import com.bytechef.component.ComponentHandler; import com.bytechef.ee.platform.customcomponent.configuration.domain.CustomComponent.Language; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.IOException; import java.net.URISyntaxException; import java.net.URL; @@ -21,6 +22,7 @@ * * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class ComponentHandlerLoader { public static ComponentHandler loadComponentHandler( diff --git a/server/libs/atlas/atlas-configuration/atlas-configuration-repository/atlas-configuration-repository-git/src/main/java/com/bytechef/atlas/configuration/repository/git/operations/JGitWorkflowOperations.java b/server/libs/atlas/atlas-configuration/atlas-configuration-repository/atlas-configuration-repository-git/src/main/java/com/bytechef/atlas/configuration/repository/git/operations/JGitWorkflowOperations.java index 5838b467a99..3660d19617e 100644 --- a/server/libs/atlas/atlas-configuration/atlas-configuration-repository/atlas-configuration-repository-git/src/main/java/com/bytechef/atlas/configuration/repository/git/operations/JGitWorkflowOperations.java +++ b/server/libs/atlas/atlas-configuration/atlas-configuration-repository/atlas-configuration-repository-git/src/main/java/com/bytechef/atlas/configuration/repository/git/operations/JGitWorkflowOperations.java @@ -60,6 +60,7 @@ * @author Arik Cohen * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class JGitWorkflowOperations implements GitWorkflowOperations { private static final Logger log = LoggerFactory.getLogger(JGitWorkflowOperations.class); diff --git a/server/libs/atlas/atlas-worker/atlas-worker-impl/src/test/java/com/bytechef/atlas/worker/TaskWorkerTest.java b/server/libs/atlas/atlas-worker/atlas-worker-impl/src/test/java/com/bytechef/atlas/worker/TaskWorkerTest.java index 67a89033c0b..e43138a4658 100644 --- a/server/libs/atlas/atlas-worker/atlas-worker-impl/src/test/java/com/bytechef/atlas/worker/TaskWorkerTest.java +++ b/server/libs/atlas/atlas-worker/atlas-worker-impl/src/test/java/com/bytechef/atlas/worker/TaskWorkerTest.java @@ -43,6 +43,7 @@ import com.bytechef.message.broker.memory.SyncMessageBroker; import com.bytechef.message.event.MessageEvent; import com.bytechef.test.extension.ObjectMapperSetupExtension; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.File; import java.util.List; import java.util.Map; @@ -60,6 +61,7 @@ * @author Ivica Cardic */ @ExtendWith(ObjectMapperSetupExtension.class) +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class TaskWorkerTest { private static final Evaluator EVALUATOR = SpelEvaluator.create(); diff --git a/server/libs/core/commons/commons-util/src/main/java/com/bytechef/commons/util/XmlStreamReaderStream.java b/server/libs/core/commons/commons-util/src/main/java/com/bytechef/commons/util/XmlStreamReaderStream.java index 0c341e13884..d98d2a0f1b2 100644 --- a/server/libs/core/commons/commons-util/src/main/java/com/bytechef/commons/util/XmlStreamReaderStream.java +++ b/server/libs/core/commons/commons-util/src/main/java/com/bytechef/commons/util/XmlStreamReaderStream.java @@ -17,6 +17,7 @@ package com.bytechef.commons.util; import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.InputStream; import java.util.Comparator; import java.util.Iterator; @@ -50,6 +51,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("XXE") final class XmlStreamReaderStream implements Stream> { private static final Logger logger = LoggerFactory.getLogger(XmlStreamReaderStream.class); diff --git a/server/libs/core/commons/commons-util/src/main/java/com/bytechef/commons/util/XmlUtils.java b/server/libs/core/commons/commons-util/src/main/java/com/bytechef/commons/util/XmlUtils.java index f6cbdbe58eb..8c99076e8b5 100644 --- a/server/libs/core/commons/commons-util/src/main/java/com/bytechef/commons/util/XmlUtils.java +++ b/server/libs/core/commons/commons-util/src/main/java/com/bytechef/commons/util/XmlUtils.java @@ -45,6 +45,9 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings({ + "XXE", "XPATH_INJECTION" +}) public class XmlUtils { private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY = DocumentBuilderFactory.newInstance(); diff --git a/server/libs/core/encryption/encryption-impl/src/main/java/com/bytechef/encryption/EncryptionImpl.java b/server/libs/core/encryption/encryption-impl/src/main/java/com/bytechef/encryption/EncryptionImpl.java index 05233df7e9c..1a386ead17b 100644 --- a/server/libs/core/encryption/encryption-impl/src/main/java/com/bytechef/encryption/EncryptionImpl.java +++ b/server/libs/core/encryption/encryption-impl/src/main/java/com/bytechef/encryption/EncryptionImpl.java @@ -18,6 +18,7 @@ import com.bytechef.commons.util.EncodingUtils; import com.bytechef.encryption.exception.InvalidEncryptionKeyException; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.nio.charset.StandardCharsets; import java.security.Key; import java.util.Arrays; @@ -62,6 +63,9 @@ public String encrypt(String content) { } } + @SuppressFBWarnings({ + "CIPHER_INTEGRITY", "ECB_MODE" + }) private Cipher getCipher(int encryptMode) throws Exception { Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); diff --git a/server/libs/core/evaluator/evaluator-impl/src/main/java/com/bytechef/evaluator/SpelEvaluator.java b/server/libs/core/evaluator/evaluator-impl/src/main/java/com/bytechef/evaluator/SpelEvaluator.java index 010a819f21e..7a0701d50b5 100644 --- a/server/libs/core/evaluator/evaluator-impl/src/main/java/com/bytechef/evaluator/SpelEvaluator.java +++ b/server/libs/core/evaluator/evaluator-impl/src/main/java/com/bytechef/evaluator/SpelEvaluator.java @@ -18,6 +18,7 @@ package com.bytechef.evaluator; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Collections; @@ -52,6 +53,9 @@ * @author Ivica Cardic * @since Mar 31, 2017 */ +@SuppressFBWarnings({ + "SPEL_INJECTION", "REDOS" +}) public class SpelEvaluator implements Evaluator { private static final Logger logger = LoggerFactory.getLogger(SpelEvaluator.class); diff --git a/server/libs/core/file-storage/file-storage-filesystem-service/src/main/java/com/bytechef/file/storage/filesystem/service/FilesystemFileStorageService.java b/server/libs/core/file-storage/file-storage-filesystem-service/src/main/java/com/bytechef/file/storage/filesystem/service/FilesystemFileStorageService.java index ab5ac752f7f..6cb2d20fe42 100644 --- a/server/libs/core/file-storage/file-storage-filesystem-service/src/main/java/com/bytechef/file/storage/filesystem/service/FilesystemFileStorageService.java +++ b/server/libs/core/file-storage/file-storage-filesystem-service/src/main/java/com/bytechef/file/storage/filesystem/service/FilesystemFileStorageService.java @@ -21,6 +21,7 @@ import com.bytechef.file.storage.exception.FileStorageException; import com.bytechef.file.storage.service.FileStorageService; import com.bytechef.tenant.TenantContext; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; @@ -45,6 +46,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class FilesystemFileStorageService implements FileStorageService { private static final String URL_PREFIX = "file:"; diff --git a/server/libs/core/file-storage/file-storage-filesystem-service/src/test/java/com/bytechef/platform/file/storage/filesystem/service/FilesystemFileStorageServiceTest.java b/server/libs/core/file-storage/file-storage-filesystem-service/src/test/java/com/bytechef/platform/file/storage/filesystem/service/FilesystemFileStorageServiceTest.java index 0dbfcc7b73e..930a16851f5 100644 --- a/server/libs/core/file-storage/file-storage-filesystem-service/src/test/java/com/bytechef/platform/file/storage/filesystem/service/FilesystemFileStorageServiceTest.java +++ b/server/libs/core/file-storage/file-storage-filesystem-service/src/test/java/com/bytechef/platform/file/storage/filesystem/service/FilesystemFileStorageServiceTest.java @@ -18,6 +18,7 @@ import com.bytechef.file.storage.domain.FileEntry; import com.bytechef.file.storage.filesystem.service.FilesystemFileStorageService; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; @@ -30,6 +31,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class FilesystemFileStorageServiceTest { private static final String TEST_STRING = "test string"; diff --git a/server/libs/modules/components/aws/aws-s3/src/main/java/com/bytechef/component/aws/s3/action/AwsS3ListObjectsAction.java b/server/libs/modules/components/aws/aws-s3/src/main/java/com/bytechef/component/aws/s3/action/AwsS3ListObjectsAction.java index 92f616dff72..f6ca06cc2fe 100644 --- a/server/libs/modules/components/aws/aws-s3/src/main/java/com/bytechef/component/aws/s3/action/AwsS3ListObjectsAction.java +++ b/server/libs/modules/components/aws/aws-s3/src/main/java/com/bytechef/component/aws/s3/action/AwsS3ListObjectsAction.java @@ -42,6 +42,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class AwsS3ListObjectsAction { public static final ModifiableActionDefinition ACTION_DEFINITION = action("listObjects") @@ -54,7 +55,13 @@ public class AwsS3ListObjectsAction { .required(true)) .output( outputSchema( - array().items(object().properties(string("key"), string("suffix"), string("uri"))))) + array() + .items( + object() + .properties( + string("key"), + string("suffix"), + string("uri"))))) .perform(AwsS3ListObjectsAction::perform); protected static List perform( @@ -68,8 +75,7 @@ protected static List perform( return response.contents() .stream() - .map(o -> new S3ObjectDescription( - connectionParameters.getRequiredString(BUCKET_NAME), o)) + .map(o -> new S3ObjectDescription(connectionParameters.getRequiredString(BUCKET_NAME), o)) .collect(Collectors.toList()); } } diff --git a/server/libs/modules/components/bash/src/main/java/com/bytechef/component/bash/action/BashExecuteAction.java b/server/libs/modules/components/bash/src/main/java/com/bytechef/component/bash/action/BashExecuteAction.java index e88c325633a..e0b46f03935 100644 --- a/server/libs/modules/components/bash/src/main/java/com/bytechef/component/bash/action/BashExecuteAction.java +++ b/server/libs/modules/components/bash/src/main/java/com/bytechef/component/bash/action/BashExecuteAction.java @@ -25,6 +25,7 @@ import com.bytechef.component.definition.ActionContext; import com.bytechef.component.definition.ComponentDsl.ModifiableActionDefinition; import com.bytechef.component.definition.Parameters; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; @@ -41,6 +42,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("COMMAND_INJECTION") public class BashExecuteAction { public static final ModifiableActionDefinition ACTION_DEFINITION = action("execute") diff --git a/server/libs/modules/components/claude-code/src/main/java/com/bytechef/component/claude/code/util/ClaudeCodeUtil.java b/server/libs/modules/components/claude-code/src/main/java/com/bytechef/component/claude/code/util/ClaudeCodeUtil.java index fb9cd3767cd..b6cf6adab19 100644 --- a/server/libs/modules/components/claude-code/src/main/java/com/bytechef/component/claude/code/util/ClaudeCodeUtil.java +++ b/server/libs/modules/components/claude-code/src/main/java/com/bytechef/component/claude/code/util/ClaudeCodeUtil.java @@ -16,6 +16,7 @@ package com.bytechef.component.claude.code.util; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; @@ -32,7 +33,9 @@ /** * @author Marko Kriskovic */ +@SuppressFBWarnings("COMMAND_INJECTION") public class ClaudeCodeUtil { + private ClaudeCodeUtil() { } diff --git a/server/libs/modules/components/email/src/test/java/com/bytechef/component/email/action/EmailActionIntTest.java b/server/libs/modules/components/email/src/test/java/com/bytechef/component/email/action/EmailActionIntTest.java index 9532ccf6919..22efe49d6ff 100644 --- a/server/libs/modules/components/email/src/test/java/com/bytechef/component/email/action/EmailActionIntTest.java +++ b/server/libs/modules/components/email/src/test/java/com/bytechef/component/email/action/EmailActionIntTest.java @@ -32,6 +32,7 @@ import com.icegreen.greenmail.junit5.GreenMailExtension; import com.icegreen.greenmail.server.AbstractServer; import com.icegreen.greenmail.util.ServerSetupTest; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -43,6 +44,7 @@ /** * @author Igor Beslic */ +@SuppressFBWarnings("HARD_CODE_PASSWORD") public class EmailActionIntTest { static { diff --git a/server/libs/modules/components/file-storage/src/main/java/com/bytechef/component/file/storage/action/FileStorageDownloadAction.java b/server/libs/modules/components/file-storage/src/main/java/com/bytechef/component/file/storage/action/FileStorageDownloadAction.java index c7c71e93a98..f74644ae9eb 100644 --- a/server/libs/modules/components/file-storage/src/main/java/com/bytechef/component/file/storage/action/FileStorageDownloadAction.java +++ b/server/libs/modules/components/file-storage/src/main/java/com/bytechef/component/file/storage/action/FileStorageDownloadAction.java @@ -27,6 +27,7 @@ import com.bytechef.component.definition.FileEntry; import com.bytechef.component.definition.Parameters; import com.bytechef.component.file.storage.constant.FileStorageConstants; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; @@ -45,6 +46,9 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings({ + "SSRF", "URLCONNECTION_SSRF_FD" +}) public class FileStorageDownloadAction { public static final ModifiableActionDefinition ACTION_DEFINITION = action("download") diff --git a/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemGetParentFolderAction.java b/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemGetParentFolderAction.java index f05d9c25f78..53b8bc2fb6e 100644 --- a/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemGetParentFolderAction.java +++ b/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemGetParentFolderAction.java @@ -25,12 +25,14 @@ import com.bytechef.component.definition.ComponentDsl.ModifiableActionDefinition; import com.bytechef.component.definition.Context; import com.bytechef.component.definition.Parameters; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.File; import java.nio.file.NoSuchFileException; /** * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class FilesystemGetParentFolderAction { public static final ModifiableActionDefinition ACTION_DEFINITION = action("getFilePath") diff --git a/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemLsAction.java b/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemLsAction.java index d02d9d12296..d91ea3d1fbc 100644 --- a/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemLsAction.java +++ b/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemLsAction.java @@ -29,6 +29,7 @@ import com.bytechef.component.definition.ComponentDsl.ModifiableActionDefinition; import com.bytechef.component.definition.Context; import com.bytechef.component.definition.Parameters; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -42,6 +43,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class FilesystemLsAction { public static final ModifiableActionDefinition ACTION_DEFINITION = action("ls") diff --git a/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemMkdirAction.java b/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemMkdirAction.java index 46c2a58bf3d..69bbc289479 100644 --- a/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemMkdirAction.java +++ b/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemMkdirAction.java @@ -25,6 +25,7 @@ import com.bytechef.component.definition.ComponentDsl.ModifiableActionDefinition; import com.bytechef.component.definition.Context; import com.bytechef.component.definition.Parameters; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; @@ -32,6 +33,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class FilesystemMkdirAction { public static final ModifiableActionDefinition ACTION_DEFINITION = action("mkdir") diff --git a/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemReadFileAction.java b/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemReadFileAction.java index f5f9c397c8b..49632a4c62c 100644 --- a/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemReadFileAction.java +++ b/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemReadFileAction.java @@ -26,6 +26,7 @@ import com.bytechef.component.definition.Context; import com.bytechef.component.definition.FileEntry; import com.bytechef.component.definition.Parameters; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; @@ -33,6 +34,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class FilesystemReadFileAction { public static final ModifiableActionDefinition ACTION_DEFINITION = action("readFile") diff --git a/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemRmAction.java b/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemRmAction.java index 9729f3e1f2d..34d1aad33ff 100644 --- a/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemRmAction.java +++ b/server/libs/modules/components/filesystem/src/main/java/com/bytechef/component/filesystem/action/FilesystemRmAction.java @@ -26,6 +26,7 @@ import com.bytechef.component.definition.ComponentDsl.ModifiableActionDefinition; import com.bytechef.component.definition.Context; import com.bytechef.component.definition.Parameters; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.File; import java.io.IOException; import java.nio.file.FileVisitResult; @@ -37,6 +38,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class FilesystemRmAction { public static final ModifiableActionDefinition ACTION_DEFINITION = action("rm") diff --git a/server/libs/modules/components/filesystem/src/test/java/com/bytechef/component/filesystem/action/FilesystemMkdirActionTest.java b/server/libs/modules/components/filesystem/src/test/java/com/bytechef/component/filesystem/action/FilesystemMkdirActionTest.java index bfc65fbdf08..054b9ea0ccb 100644 --- a/server/libs/modules/components/filesystem/src/test/java/com/bytechef/component/filesystem/action/FilesystemMkdirActionTest.java +++ b/server/libs/modules/components/filesystem/src/test/java/com/bytechef/component/filesystem/action/FilesystemMkdirActionTest.java @@ -20,6 +20,7 @@ import com.bytechef.component.definition.ActionContext; import com.bytechef.component.definition.Parameters; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.File; import java.io.IOException; import java.util.UUID; @@ -30,6 +31,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") class FilesystemMkdirActionTest { @Test diff --git a/server/libs/modules/components/random-helper/src/main/java/com/bytechef/component/random/helper/action/RandomHelperRandomStringAction.java b/server/libs/modules/components/random-helper/src/main/java/com/bytechef/component/random/helper/action/RandomHelperRandomStringAction.java index d89e918d9b9..56f6712c9aa 100644 --- a/server/libs/modules/components/random-helper/src/main/java/com/bytechef/component/random/helper/action/RandomHelperRandomStringAction.java +++ b/server/libs/modules/components/random-helper/src/main/java/com/bytechef/component/random/helper/action/RandomHelperRandomStringAction.java @@ -29,10 +29,12 @@ import com.bytechef.component.definition.ComponentDsl.ModifiableActionDefinition; import com.bytechef.component.definition.Context; import com.bytechef.component.definition.Parameters; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; /** * @author Nikolina Spehar */ +@SuppressFBWarnings("PREDICTABLE_RANDOM") public class RandomHelperRandomStringAction { public static final ModifiableActionDefinition ACTION_DEFINITION = action("randomString") diff --git a/server/libs/modules/components/random-helper/src/main/java/com/bytechef/component/random/helper/constant/RandomHelperConstants.java b/server/libs/modules/components/random-helper/src/main/java/com/bytechef/component/random/helper/constant/RandomHelperConstants.java index a45d80a1a32..8e8284ac119 100644 --- a/server/libs/modules/components/random-helper/src/main/java/com/bytechef/component/random/helper/constant/RandomHelperConstants.java +++ b/server/libs/modules/components/random-helper/src/main/java/com/bytechef/component/random/helper/constant/RandomHelperConstants.java @@ -16,11 +16,13 @@ package com.bytechef.component.random.helper.constant; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Random; /** * @author Ivica Cardic */ +@SuppressFBWarnings("PREDICTABLE_RANDOM") public class RandomHelperConstants { public static final String ALPHANUMERIC_CHARACTERS = diff --git a/server/libs/modules/task-dispatchers/condition/src/main/java/com/bytechef/task/dispatcher/condition/util/ConditionTaskUtils.java b/server/libs/modules/task-dispatchers/condition/src/main/java/com/bytechef/task/dispatcher/condition/util/ConditionTaskUtils.java index 56e10029fed..a0958a5c844 100644 --- a/server/libs/modules/task-dispatchers/condition/src/main/java/com/bytechef/task/dispatcher/condition/util/ConditionTaskUtils.java +++ b/server/libs/modules/task-dispatchers/condition/src/main/java/com/bytechef/task/dispatcher/condition/util/ConditionTaskUtils.java @@ -24,6 +24,7 @@ import com.bytechef.commons.util.MapUtils; import com.bytechef.task.dispatcher.condition.constant.ConditionTaskDispatcherConstants; import com.fasterxml.jackson.core.type.TypeReference; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -35,6 +36,9 @@ /** * @author Matija Petanjek */ +@SuppressFBWarnings({ + "SPEL_INJECTION", "REDOS" +}) public class ConditionTaskUtils { private static final ExpressionParser expressionParser = new SpelExpressionParser(); diff --git a/server/libs/platform/platform-component/platform-component-context/platform-component-context-service/src/main/java/com/bytechef/platform/component/context/ContextImpl.java b/server/libs/platform/platform-component/platform-component-context/platform-component-context-service/src/main/java/com/bytechef/platform/component/context/ContextImpl.java index 7a204db724f..40c8219bc38 100644 --- a/server/libs/platform/platform-component/platform-component-context/platform-component-context-service/src/main/java/com/bytechef/platform/component/context/ContextImpl.java +++ b/server/libs/platform/platform-component/platform-component-context/platform-component-context-service/src/main/java/com/bytechef/platform/component/context/ContextImpl.java @@ -384,6 +384,7 @@ public String urlEncode(String string) { } } + @SuppressFBWarnings("PATH_TRAVERSAL_IN") private record FileImpl(TempFileStorage tempFileStorage) implements File { @Override diff --git a/server/libs/platform/platform-component/platform-component-context/platform-component-context-service/src/main/java/com/bytechef/platform/component/context/HttpClientExecutor.java b/server/libs/platform/platform-component/platform-component-context/platform-component-context-service/src/main/java/com/bytechef/platform/component/context/HttpClientExecutor.java index ab2cc2246c9..abd5cfe25a9 100644 --- a/server/libs/platform/platform-component/platform-component-context/platform-component-context-service/src/main/java/com/bytechef/platform/component/context/HttpClientExecutor.java +++ b/server/libs/platform/platform-component/platform-component-context/platform-component-context-service/src/main/java/com/bytechef/platform/component/context/HttpClientExecutor.java @@ -584,6 +584,7 @@ public int getStatusCode() { } } + @SuppressFBWarnings("WEAK_TRUST_MANAGER") private static class UnauthorizedCertsX509ExtendedTrustManager extends X509ExtendedTrustManager { public X509Certificate[] getAcceptedIssuers() { diff --git a/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/oas/handler/OpenApiComponentTaskHandlerIntTest.java b/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/oas/handler/OpenApiComponentTaskHandlerIntTest.java index bd604d47260..b8b14e6b8b7 100644 --- a/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/oas/handler/OpenApiComponentTaskHandlerIntTest.java +++ b/server/libs/platform/platform-component/platform-component-service/src/test/java/com/bytechef/platform/component/oas/handler/OpenApiComponentTaskHandlerIntTest.java @@ -41,6 +41,7 @@ import com.bytechef.platform.connection.repository.ConnectionRepository; import com.bytechef.platform.constant.ModeType; import com.github.tomakehurst.wiremock.junit5.WireMockTest; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.time.LocalDateTime; import java.util.Collections; import java.util.LinkedHashMap; @@ -63,6 +64,7 @@ @SpringBootTest(classes = ComponentRegistryConfiguration.class) @ComponentRegistryConfigurationSharedMocks @WireMockTest(httpPort = 9999) +@SuppressFBWarnings("HARD_CODE_PASSWORD") public class OpenApiComponentTaskHandlerIntTest { @Autowired diff --git a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-impl/src/main/java/com/bytechef/platform/configuration/web/rest/WebhookTriggerTestController.java b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-impl/src/main/java/com/bytechef/platform/configuration/web/rest/WebhookTriggerTestController.java index 07afcb2cec1..47eaf182502 100644 --- a/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-impl/src/main/java/com/bytechef/platform/configuration/web/rest/WebhookTriggerTestController.java +++ b/server/libs/platform/platform-configuration/platform-configuration-rest/platform-configuration-rest-impl/src/main/java/com/bytechef/platform/configuration/web/rest/WebhookTriggerTestController.java @@ -29,6 +29,7 @@ import com.bytechef.platform.webhook.rest.AbstractWebhookTriggerController; import com.bytechef.platform.workflow.execution.WorkflowExecutionId; import com.bytechef.tenant.TenantContext; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import jakarta.servlet.http.HttpServletRequest; import java.util.Objects; import org.slf4j.Logger; @@ -46,6 +47,7 @@ */ @RestController @ConditionalOnCoordinator +@SuppressFBWarnings("SPRING_CSRF_UNRESTRICTED_REQUEST_MAPPING") public class WebhookTriggerTestController extends AbstractWebhookTriggerController { private static final Logger logger = LoggerFactory.getLogger(WebhookTriggerTestController.class); diff --git a/server/libs/platform/platform-user/platform-user-rest/src/main/java/com/bytechef/platform/user/web/rest/AuthorityApiController.java b/server/libs/platform/platform-user/platform-user-rest/src/main/java/com/bytechef/platform/user/web/rest/AuthorityApiController.java index fcc85636255..7bdbceee61f 100644 --- a/server/libs/platform/platform-user/platform-user-rest/src/main/java/com/bytechef/platform/user/web/rest/AuthorityApiController.java +++ b/server/libs/platform/platform-user/platform-user-rest/src/main/java/com/bytechef/platform/user/web/rest/AuthorityApiController.java @@ -51,6 +51,7 @@ @RestController @RequestMapping("${openapi.openAPIDefinition.base-path.platform:}/internal") @ConditionalOnCoordinator +@SuppressFBWarnings("CRLF_INJECTION_LOGS") public class AuthorityApiController implements AuthorityApi { private static final Logger log = LoggerFactory.getLogger(AuthorityApiController.class); diff --git a/server/libs/platform/platform-user/platform-user-rest/src/main/java/com/bytechef/platform/user/web/rest/UserController.java b/server/libs/platform/platform-user/platform-user-rest/src/main/java/com/bytechef/platform/user/web/rest/UserController.java index 3a6636f4206..ee069d7f45a 100644 --- a/server/libs/platform/platform-user/platform-user-rest/src/main/java/com/bytechef/platform/user/web/rest/UserController.java +++ b/server/libs/platform/platform-user/platform-user-rest/src/main/java/com/bytechef/platform/user/web/rest/UserController.java @@ -84,6 +84,7 @@ @RestController @RequestMapping("${openapi.openAPIDefinition.base-path.platform:}/internal") @ConditionalOnCoordinator +@SuppressFBWarnings("CRLF_INJECTION_LOGS") public class UserController { private static final Logger logger = LoggerFactory.getLogger(UserController.class); diff --git a/server/libs/platform/platform-user/platform-user-rest/src/test/java/com/bytechef/platform/user/web/rest/AccountControllerIntTest.java b/server/libs/platform/platform-user/platform-user-rest/src/test/java/com/bytechef/platform/user/web/rest/AccountControllerIntTest.java index 20c9e170f64..f55531ece68 100644 --- a/server/libs/platform/platform-user/platform-user-rest/src/test/java/com/bytechef/platform/user/web/rest/AccountControllerIntTest.java +++ b/server/libs/platform/platform-user/platform-user-rest/src/test/java/com/bytechef/platform/user/web/rest/AccountControllerIntTest.java @@ -44,6 +44,7 @@ import com.bytechef.platform.user.web.rest.vm.KeyAndPasswordVM; import com.bytechef.platform.user.web.rest.vm.ManagedUserVM; import com.fasterxml.jackson.databind.ObjectMapper; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.time.Instant; import java.time.LocalDate; import java.util.Collections; @@ -74,6 +75,7 @@ @SpringBootTest(classes = UserIntTestConfiguration.class, properties = "bytechef.tenant.mode=single") @AutoConfigureMockMvc @UserIntTestConfigurationSharedMocks +@SuppressFBWarnings("HARD_CODE_PASSWORD") class AccountControllerIntTest { static final String TEST_USER_LOGIN = "test"; diff --git a/server/libs/platform/platform-user/platform-user-rest/src/test/java/com/bytechef/platform/user/web/rest/MultiTenantAccountControllerIntTest.java b/server/libs/platform/platform-user/platform-user-rest/src/test/java/com/bytechef/platform/user/web/rest/MultiTenantAccountControllerIntTest.java index b1bfbe65f67..64b1a36ec28 100644 --- a/server/libs/platform/platform-user/platform-user-rest/src/test/java/com/bytechef/platform/user/web/rest/MultiTenantAccountControllerIntTest.java +++ b/server/libs/platform/platform-user/platform-user-rest/src/test/java/com/bytechef/platform/user/web/rest/MultiTenantAccountControllerIntTest.java @@ -40,6 +40,7 @@ import com.bytechef.tenant.service.TenantService; import com.fasterxml.jackson.databind.ObjectMapper; import com.zaxxer.hikari.HikariDataSource; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.time.Instant; import java.util.Collections; import java.util.HashSet; @@ -75,6 +76,7 @@ }) @AutoConfigureMockMvc @UserIntTestConfigurationSharedMocks +@SuppressFBWarnings("HARD_CODE_PASSWORD") class MultiTenantAccountControllerIntTest { @MockitoBean diff --git a/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-api/src/main/java/com/bytechef/platform/webhook/rest/AbstractWebhookTriggerController.java b/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-api/src/main/java/com/bytechef/platform/webhook/rest/AbstractWebhookTriggerController.java index 9e070af3e46..cbe0d63683c 100644 --- a/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-api/src/main/java/com/bytechef/platform/webhook/rest/AbstractWebhookTriggerController.java +++ b/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-api/src/main/java/com/bytechef/platform/webhook/rest/AbstractWebhookTriggerController.java @@ -42,6 +42,7 @@ import com.bytechef.platform.webhook.executor.constant.WebhookConstants; import com.bytechef.platform.workflow.execution.WorkflowExecutionId; import com.fasterxml.jackson.core.type.TypeReference; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; @@ -75,6 +76,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("UNVALIDATED_REDIRECT") public abstract class AbstractWebhookTriggerController { private static final Logger logger = LoggerFactory.getLogger(AbstractWebhookTriggerController.class); diff --git a/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/ApprovalController.java b/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/ApprovalController.java index 9050d058fa0..407e69ec5fd 100644 --- a/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/ApprovalController.java +++ b/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/ApprovalController.java @@ -34,6 +34,7 @@ @RestController @CrossOrigin @ConditionalOnCoordinator +@SuppressFBWarnings("SPRING_CSRF_UNRESTRICTED_REQUEST_MAPPING") public class ApprovalController { private final JobFacade jobFacade; diff --git a/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerController.java b/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerController.java index 3147e5fee00..78a1c8179bd 100644 --- a/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerController.java +++ b/server/libs/platform/platform-webhook/platform-webhook-rest/platform-webhook-rest-impl/src/main/java/com/bytechef/platform/webhook/web/rest/WebhookTriggerController.java @@ -48,6 +48,7 @@ @RestController @CrossOrigin @ConditionalOnCoordinator +@SuppressFBWarnings("SPRING_CSRF_UNRESTRICTED_REQUEST_MAPPING") public class WebhookTriggerController extends AbstractWebhookTriggerController { private final WebhookWorkflowExecutor webhookWorkflowExecutor; diff --git a/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-service/src/main/java/com/bytechef/platform/workflow/execution/repository/CustomPrincipalJobRepositoryImpl.java b/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-service/src/main/java/com/bytechef/platform/workflow/execution/repository/CustomPrincipalJobRepositoryImpl.java index fd6e23b6234..02a0b76b6dd 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-service/src/main/java/com/bytechef/platform/workflow/execution/repository/CustomPrincipalJobRepositoryImpl.java +++ b/server/libs/platform/platform-workflow/platform-workflow-execution/platform-workflow-execution-service/src/main/java/com/bytechef/platform/workflow/execution/repository/CustomPrincipalJobRepositoryImpl.java @@ -32,6 +32,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("SQL_INJECTION_SPRING_JDBC") public class CustomPrincipalJobRepositoryImpl implements CustomPrincipalJobRepository { private final JdbcTemplate jdbcTemplate; diff --git a/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-service/src/main/java/com/bytechef/platform/workflow/test/facade/WorkflowTestFacadeImpl.java b/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-service/src/main/java/com/bytechef/platform/workflow/test/facade/WorkflowTestFacadeImpl.java index 7b5b53862c9..20c1ed0aa07 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-service/src/main/java/com/bytechef/platform/workflow/test/facade/WorkflowTestFacadeImpl.java +++ b/server/libs/platform/platform-workflow/platform-workflow-test/platform-workflow-test-service/src/main/java/com/bytechef/platform/workflow/test/facade/WorkflowTestFacadeImpl.java @@ -51,6 +51,7 @@ * @author Ivica Cardic */ @Service +@SuppressFBWarnings("PREDICTABLE_RANDOM") public class WorkflowTestFacadeImpl implements WorkflowTestFacade { private static final Random RANDOM = new Random(); diff --git a/server/libs/platform/platform-workflow/platform-workflow-validator/src/main/java/com/bytechef/platform/workflow/validator/TaskValidator.java b/server/libs/platform/platform-workflow/platform-workflow-validator/src/main/java/com/bytechef/platform/workflow/validator/TaskValidator.java index 6f322861d45..9ac5396c3d2 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-validator/src/main/java/com/bytechef/platform/workflow/validator/TaskValidator.java +++ b/server/libs/platform/platform-workflow/platform-workflow-validator/src/main/java/com/bytechef/platform/workflow/validator/TaskValidator.java @@ -19,6 +19,7 @@ import com.bytechef.commons.util.StringUtils; import com.bytechef.platform.workflow.validator.model.PropertyInfo; import com.fasterxml.jackson.databind.JsonNode; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import java.util.Map; import java.util.regex.Matcher; @@ -31,6 +32,9 @@ * * @author Marko Kriskovic */ +@SuppressFBWarnings({ + "SPEL_INJECTION", "REDOS" +}) class TaskValidator { private static final Pattern TYPE_PATTERN = Pattern.compile("^[a-zA-Z0-9]+/v[0-9]+(/[a-zA-Z0-9]+)?$"); diff --git a/server/libs/platform/platform-workflow/platform-workflow-validator/src/main/java/com/bytechef/platform/workflow/validator/WorkflowUtils.java b/server/libs/platform/platform-workflow/platform-workflow-validator/src/main/java/com/bytechef/platform/workflow/validator/WorkflowUtils.java index 9cc2c1161d2..da368451d0a 100644 --- a/server/libs/platform/platform-workflow/platform-workflow-validator/src/main/java/com/bytechef/platform/workflow/validator/WorkflowUtils.java +++ b/server/libs/platform/platform-workflow/platform-workflow-validator/src/main/java/com/bytechef/platform/workflow/validator/WorkflowUtils.java @@ -20,6 +20,7 @@ import com.bytechef.evaluator.SpelEvaluator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonNode; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.HashMap; import java.util.Map; import org.apache.commons.lang3.StringUtils; @@ -27,6 +28,9 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings({ + "SPEL_INJECTION", "REDOS" +}) class WorkflowUtils { private static final Evaluator EVALUATOR = SpelEvaluator.builder() diff --git a/server/libs/test/test-support/src/main/java/com/bytechef/test/jsonasssert/JsonFileAssert.java b/server/libs/test/test-support/src/main/java/com/bytechef/test/jsonasssert/JsonFileAssert.java index 1e1dd86e17f..ef446b7cd59 100644 --- a/server/libs/test/test-support/src/main/java/com/bytechef/test/jsonasssert/JsonFileAssert.java +++ b/server/libs/test/test-support/src/main/java/com/bytechef/test/jsonasssert/JsonFileAssert.java @@ -38,6 +38,7 @@ /** * @author Ivica Cardic */ +@SuppressFBWarnings("PATH_TRAVERSAL_IN") public class JsonFileAssert { private static final ObjectMapper OBJECT_MAPPER = JsonMapper.builder()