Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand All @@ -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()},)")
}
}

Expand All @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
/**
* @author Ivica Cardic
*/
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
public class ComponentInitOpenApiGenerator {

private static final Logger logger = LoggerFactory.getLogger(ComponentInitOpenApiGenerator.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -21,6 +22,7 @@
*
* @author Ivica Cardic
*/
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
public class ProjectHandlerLoader {

public static ProjectHandler loadProjectHandler(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
@Service
@Transactional
@ConditionalOnEEVersion
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
public class ProjectCodeWorkflowFacadeImpl implements ProjectCodeWorkflowFacade {

private final CacheManager cacheManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*
* @author Ivica Cardic
*/
@SuppressFBWarnings("SQL_INJECTION_JDBC")
public class MultiTenantDataSource implements DataSource {

private final DataSource dataSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* @author Ivica Cardic
*/
@Repository
@SuppressFBWarnings("SQL_INJECTION_JDBC")
public class TenantRepository {

private final DataSource dataSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
*/
@Service
@ConditionalOnEEVersion
@SuppressFBWarnings("UNSAFE_HASH_EQUALS")
public class UnifiedApiFacadeImpl implements UnifiedApiFacade {

private static final Logger log = LoggerFactory.getLogger(UnifiedApiFacadeImpl.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 = "********";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
@Service
@Transactional
@ConditionalOnEEVersion
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
public class CustomComponentFacadeImpl implements CustomComponentFacade {

private final CacheManager cacheManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -21,6 +22,7 @@
*
* @author Ivica Cardic
*/
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
public class ComponentHandlerLoader {

public static ComponentHandler loadComponentHandler(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -60,6 +61,7 @@
* @author Ivica Cardic
*/
@ExtendWith(ObjectMapperSetupExtension.class)
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
public class TaskWorkerTest {

private static final Evaluator EVALUATOR = SpelEvaluator.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -50,6 +51,7 @@
/**
* @author Ivica Cardic
*/
@SuppressFBWarnings("XXE")
final class XmlStreamReaderStream implements Stream<Map<String, ?>> {

private static final Logger logger = LoggerFactory.getLogger(XmlStreamReaderStream.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
/**
* @author Ivica Cardic
*/
@SuppressFBWarnings({
"XXE", "XPATH_INJECTION"
})
public class XmlUtils {

private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY = DocumentBuilderFactory.newInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -45,6 +46,7 @@
/**
* @author Ivica Cardic
*/
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
public class FilesystemFileStorageService implements FileStorageService {

private static final String URL_PREFIX = "file:";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -30,6 +31,7 @@
/**
* @author Ivica Cardic
*/
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
public class FilesystemFileStorageServiceTest {

private static final String TEST_STRING = "test string";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
/**
* @author Ivica Cardic
*/
@SuppressFBWarnings("PATH_TRAVERSAL_IN")
public class AwsS3ListObjectsAction {

public static final ModifiableActionDefinition ACTION_DEFINITION = action("listObjects")
Expand All @@ -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<S3ObjectDescription> perform(
Expand All @@ -68,8 +75,7 @@ protected static List<S3ObjectDescription> 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());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -41,6 +42,7 @@
/**
* @author Ivica Cardic
*/
@SuppressFBWarnings("COMMAND_INJECTION")
public class BashExecuteAction {

public static final ModifiableActionDefinition ACTION_DEFINITION = action("execute")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -32,7 +33,9 @@
/**
* @author Marko Kriskovic
*/
@SuppressFBWarnings("COMMAND_INJECTION")
public class ClaudeCodeUtil {

private ClaudeCodeUtil() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -43,6 +44,7 @@
/**
* @author Igor Beslic
*/
@SuppressFBWarnings("HARD_CODE_PASSWORD")
public class EmailActionIntTest {

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -45,6 +46,9 @@
/**
* @author Ivica Cardic
*/
@SuppressFBWarnings({
"SSRF", "URLCONNECTION_SSRF_FD"
})
public class FileStorageDownloadAction {

public static final ModifiableActionDefinition ACTION_DEFINITION = action("download")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading