Skip to content

Conversation

@YC27
Copy link
Contributor

@YC27 YC27 commented Mar 26, 2025

No description provided.

YC27 added 2 commits March 26, 2025 09:42
…dify PipeParameters & Supports registration of plugins and reflection usage & Add SQLite support for persistence of plugin and task meta.
String.format(
"Failed to register Plugin %s, because the plugin jar file %s is not found",
pluginName, jarName);
LOGGER.warn(errorMessage);

Check failure

Code scanning / CodeQL

Log Injection High

This log entry depends on a
user-provided value
.
String.format(
"Failed to register Plugin %s, because the given Plugin name is the same as a built-in Plugin name.",
pluginName);
LOGGER.warn(errorMessage);

Check failure

Code scanning / CodeQL

Log Injection High

This log entry depends on a
user-provided value
.
String.format(
"Failed to register Plugin %s, because the Plugin has been registered.",
pluginName);
LOGGER.warn(errorMessage);

Check failure

Code scanning / CodeQL

Log Injection High

This log entry depends on a
user-provided value
.
final String jarMD5 =
jarMD5FromDB == null
? DigestUtils.md5Hex(
Files.newInputStream(Paths.get(PluginFileUtils.getPluginJarFilePath(jarName))))

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
}

final String successMessage = String.format("Successfully register Plugin %s", pluginName);
LOGGER.info(successMessage);

Check failure

Code scanning / CodeQL

Log Injection High

This log entry depends on a
user-provided value
.
final Path pluginJarInstallPath =
Paths.get(getPluginJarFileWithMD5FilePath(pluginName, jarNameWithMD5));

if (!Files.exists(pluginInstallPath)) {

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
Paths.get(getPluginJarFileWithMD5FilePath(pluginName, jarNameWithMD5));

if (!Files.exists(pluginInstallPath)) {
FileUtils.forceMkdir(pluginInstallPath.toFile());

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
if (!Files.exists(pluginInstallPath)) {
FileUtils.forceMkdir(pluginInstallPath.toFile());
}
if (Files.exists(pluginJarInstallPath)) {

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.

FileUtils.moveFile(
new File(getPluginJarFilePath(jarName)),
pluginJarInstallPath.toFile(),

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
}

public static boolean isPluginJarFileExist(final String jarName) {
return Files.exists(Paths.get(getPluginJarFilePath(jarName)));

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
@SteveYurongSu SteveYurongSu merged commit e8c86d7 into apache:master Apr 7, 2025
9 of 10 checks passed
@YC27 YC27 deleted the collector-plugin-reflect branch April 27, 2025 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants