Skip to content

Conversation

@abhijeet-akto
Copy link

@abhijeet-akto abhijeet-akto commented Dec 5, 2025

Implemented a comprehensive connector management system for AI agent imports, enabling users to configure and schedule data ingestion from N8N, Langchain (LangSmith), and Microsoft Copilot Studio (AppInsights) directly through the Akto dashboard.

  • Added multi-connector support (N8N, Langchain, Copilot Studio)
  • Added Azure binary download functionality (ensureBinaryExists, downloadBinaryFromAzure, makeExecutable)
  • Added connector-specific environment variable configuration (setConnectorEnvironmentVariables)

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Security scan found no issues in the 4 changed files and no automated fixes. Continue manual review and runtime testing to catch logic, integration, or dependency risks not covered by static checks."

Risk Level AI Score
🟢 NO RISK 0.0/100

Top 0 security issues / 0 total (Critical: 0, High: 0, Medium: 0, Low: 0)

Title Location Recommendation
No issues to display

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Automated scanning reported no security findings for these changes. Residual risk remains because tools can miss logic errors, coverage gaps, or secrets; prioritize targeted manual review of security-critical areas and complementary dynamic and dependency scans in CI."

Risk Level AI Score
🟢 NO RISK 10.0/100

Top 0 security issues / 0 total (Critical: 0, High: 0, Medium: 0, Low: 0)

Title Location Recommendation
No issues to display

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Automated checks found no security issues in this change. Multiple files were modified, so tooling may miss context-dependent or subtle vulnerabilities; perform manual review and targeted testing before merging."

Risk Level AI Score
🟢 NO RISK 0.0/100

Top 0 security issues / 0 total (Critical: 0, High: 0, Medium: 0, Low: 0)

Title Location Recommendation
No issues to display

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Automated checks found no security issues in this change. Multiple files were modified, so tooling may miss context-dependent or subtle vulnerabilities; perform manual review and targeted testing before merging."

Risk Level AI Score
🟢 NO RISK 0.0/100

Top 0 security issues / 0 total (Critical: 0, High: 0, Medium: 0, Low: 0)

Title Location Recommendation
No issues to display

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Automated checks found no security issues in this change. Multiple files were modified, so tooling may miss context-dependent or subtle vulnerabilities; perform manual review and targeted testing before merging."

Risk Level AI Score
🟢 NO RISK 0.0/100

Top 0 security issues / 0 total (Critical: 0, High: 0, Medium: 0, Low: 0)

Title Location Recommendation
No issues to display

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Review found no security issues in the change. Residual risk remains from undetected vulnerabilities or dependency/configuration regressions; continue automated scanning and verify security-focused tests before merging."

Risk Level AI Score
🟢 NO RISK 10.0/100

Top 0 security issues / 0 total (Critical: 0, High: 0, Medium: 0, Low: 0)

Title Location Recommendation
No issues to display

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Automated security analysis found no issues in this code change; no vulnerabilities were flagged."

Risk Level AI Score
🟢 NO RISK 5.0/100

Top 0 security issues / 0 total (Critical: 0, High: 0, Medium: 0, Low: 0)

Title Location Recommendation
No issues to display

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Change set touches 14 files and automated analysis found no security issues. Absence of findings does not guarantee safety; logic flaws, dependency or configuration regressions and undetected vulnerabilities may remain."

Risk Level AI Score
🟢 NO RISK 10.0/100

Top 0 security issues / 0 total (Critical: 0, High: 0, Medium: 0, Low: 0)

Title Location Recommendation
No issues to display

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Automated analysis reported no findings, but the sizable change set increases risk of undetected vulnerabilities, misconfigurations, or logic regressions. Absence of flagged issues is not proof of safety; prioritize targeted review and testing of security-critical areas."

Risk Level AI Score
🟢 NO RISK 0.0/100

Top 0 security issues / 0 total (Critical: 0, High: 0, Medium: 0, Low: 0)

Title Location Recommendation
No issues to display

🔗 View Detailed Report

@abhijeet-akto abhijeet-akto changed the title feat: add n8n import UI feat: add n8n, langchain and copilot-studio import functionality Dec 8, 2025
Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Automated scan returned no findings, but absence of results doesn’t guarantee safety. Changes across many files can introduce logic errors, leaked secrets, or dependency issues that automated tools may miss. Conduct targeted verification before merging."

Risk Level AI Score
🟢 NO RISK 5.0/100

Top 0 security issues / 0 total (Critical: 0, High: 0, Medium: 0, Low: 0)

Title Location Recommendation
No issues to display

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Security scan of the recent change set reported no detected issues. However, absence of findings doesn't guarantee safety—changes across multiple files warrant targeted manual review of security-sensitive areas and running full automated scans prior to merge."

Risk Level AI Score
🟢 NO RISK 0.0/100

Top 0 security issues / 0 total (Critical: 0, High: 0, Medium: 0, Low: 0)

Title Location Recommendation
No issues to display

🔗 View Detailed Report

@abhijeet-akto abhijeet-akto changed the title feat: add n8n, langchain and copilot-studio import functionality feat: add n8n, langchain and copilot-studio connector functionality Dec 8, 2025
echo "Failed to build classpath!"
exit 1
fi

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see existing how existing crons are running.

InitializerListener...

we have 2 machines DashboardJobs where the Jobs are supposed to run.

If only DB access is needed then there is a machine called mergin-cyborg..there also you can run this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the approach, followed Jobs implementation.

// Getters and Setters
public String getAppInsightsAppId() {
return appInsightsAppId;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use lombok for getter setter

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

loggerMaker.info("Data Ingestion Service URL: " + dataIngestionUrl, LogDb.DASHBOARD);

// Create the collection if it doesn't exist and set up indices
AIAgentConnectorInfoDao.instance.createIndicesIfAbsent();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be in daoinit.createindices, remove from here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed anymore.

public String initiateLangchainImport() {
try {
loggerMaker.info("=== Langchain Import Request ===", LogDb.DASHBOARD);
loggerMaker.info("LangSmith URL: " + langsmithUrl, LogDb.DASHBOARD);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant logs

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

// Create AIAgentConnectorInfo object with default status CREATED and type LANGCHAIN
createdImportInfo = new AIAgentConnectorInfo(
AIAgentConnectorInfo.TYPE_LANGCHAIN,
config,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too much repetitive code, create a factory/strategy abstract class ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

abhijeet-akto and others added 19 commits December 9, 2025 19:07
…torSyncJobExecutor.java

Co-authored-by: devsecopsbot[bot] <177726887+devsecopsbot[bot]@users.noreply.github.com>
…torSyncJobExecutor.java

Co-authored-by: devsecopsbot[bot] <177726887+devsecopsbot[bot]@users.noreply.github.com>
…torSyncJobExecutor.java

Co-authored-by: devsecopsbot[bot] <177726887+devsecopsbot[bot]@users.noreply.github.com>
…torSyncJobExecutor.java

Co-authored-by: devsecopsbot[bot] <177726887+devsecopsbot[bot]@users.noreply.github.com>
…torSyncJobExecutor.java

Co-authored-by: devsecopsbot[bot] <177726887+devsecopsbot[bot]@users.noreply.github.com>
…torSyncJobExecutor.java

Co-authored-by: devsecopsbot[bot] <177726887+devsecopsbot[bot]@users.noreply.github.com>
…torSyncJobExecutor.java

Co-authored-by: devsecopsbot[bot] <177726887+devsecopsbot[bot]@users.noreply.github.com>
…torSyncJobExecutor.java

Co-authored-by: devsecopsbot[bot] <177726887+devsecopsbot[bot]@users.noreply.github.com>
…torSyncJobExecutor.java

Co-authored-by: devsecopsbot[bot] <177726887+devsecopsbot[bot]@users.noreply.github.com>
…torSyncJobExecutor.java

Co-authored-by: devsecopsbot[bot] <177726887+devsecopsbot[bot]@users.noreply.github.com>
…torSyncJobExecutor.java

Co-authored-by: devsecopsbot[bot] <177726887+devsecopsbot[bot]@users.noreply.github.com>
Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Code change introduces a critical OS command injection in AIAgentConnectorSyncJobExecutor and numerous medium-severity third-party vulnerabilities and license concerns in libs/utils (notably Jackson CVEs). This elevates risk of remote code execution, data disclosure, and supply-chain/license compliance issues."

Risk Level AI Score
🟠 HIGH 78.0/100

Top 11 security issues / 187 total (Critical: 1, High: 0, Medium: 186, Low: 0)

Title Location Recommendation
CRITICAL OS Command Injection libs/utils/src/main/java/com/akto/jobs/executors/AIAgentConnectorSyncJobExecutor.java:156 Use a hardcoded set of arguments that are to be passed to OS commands. If filenames are b…
MEDIUM CVE-2018-11307: jackson-databind: Potential information exfiltration with defau… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2018-14718: jackson-databind: arbitrary code execution in slf4j-ext class libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2018-14719: jackson-databind: arbitrary code execution in blaze-ds-opt and… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2025-49128: com.fasterxml.jackson.core/jackson-core: Jackson-core Memory Di… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2025-52999: com.fasterxml.jackson.core/jackson-core: jackson-core Potential… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM com.azure:azure-storage-blob:MIT libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License MIT PkgName: notice Classification: com.azure:azure-…
MEDIUM com.google.api-client:google-api-client:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.apis:google-api-services-drive:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.apis:google-api-services-sheets:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.oauth-client:google-oauth-client-jetty:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "Critical OS command injection in AIAgentConnectorSyncJobExecutor allows remote command execution; many medium-risk findings center on Jackson deserialization/DoS/memory flaws plus unreviewed dependency license concerns, raising supply-chain risk."

Risk Level AI Score
🔴 CRITICAL 85.0/100

Top 11 security issues / 187 total (Critical: 1, High: 0, Medium: 186, Low: 0)

Title Location Recommendation
CRITICAL OS Command Injection libs/utils/src/main/java/com/akto/jobs/executors/AIAgentConnectorSyncJobExecutor.java:138 Use a hardcoded set of arguments that are to be passed to OS commands. If filenames are b…
MEDIUM CVE-2018-11307: jackson-databind: Potential information exfiltration with defau… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2018-14718: jackson-databind: arbitrary code execution in slf4j-ext class libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2018-14719: jackson-databind: arbitrary code execution in blaze-ds-opt and… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2025-49128: com.fasterxml.jackson.core/jackson-core: Jackson-core Memory Di… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2025-52999: com.fasterxml.jackson.core/jackson-core: jackson-core Potential… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM com.azure:azure-storage-blob:MIT libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License MIT PkgName: notice Classification: com.azure:azure-…
MEDIUM com.google.api-client:google-api-client:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.apis:google-api-services-drive:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.apis:google-api-services-sheets:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.oauth-client:google-oauth-client-jetty:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "A critical OS command injection in AIAgentConnectorSyncJobExecutor allows arbitrary command execution. Many medium-risk issues stem from vulnerable Jackson dependencies and license/policy flags in build files, creating supply-chain and compliance exposure. Immediate fixes are required to prevent remote code execution and dependency-based attacks."

Risk Level AI Score
🔴 CRITICAL 88.0/100

Top 11 security issues / 187 total (Critical: 1, High: 0, Medium: 186, Low: 0)

Title Location Recommendation
CRITICAL OS Command Injection libs/utils/src/main/java/com/akto/jobs/executors/AIAgentConnectorSyncJobExecutor.java:143 Use a hardcoded set of arguments that are to be passed to OS commands. If filenames are b…
MEDIUM CVE-2018-11307: jackson-databind: Potential information exfiltration with defau… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2018-14718: jackson-databind: arbitrary code execution in slf4j-ext class libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2018-14719: jackson-databind: arbitrary code execution in blaze-ds-opt and… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2025-49128: com.fasterxml.jackson.core/jackson-core: Jackson-core Memory Di… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2025-52999: com.fasterxml.jackson.core/jackson-core: jackson-core Potential… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM com.azure:azure-storage-blob:MIT libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License MIT PkgName: notice Classification: com.azure:azure-…
MEDIUM com.google.api-client:google-api-client:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.apis:google-api-services-drive:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.apis:google-api-services-sheets:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.oauth-client:google-oauth-client-jetty:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…

🔗 View Detailed Report

Copy link
Contributor

@devsecopsbot devsecopsbot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Security analysis: "A critical OS command injection in AIAgentConnectorSyncJobExecutor allows arbitrary command execution. Many medium-risk issues stem from vulnerable Jackson dependencies and license/policy flags in build files, creating supply-chain and compliance exposure. Immediate fixes are required to prevent remote code execution and dependency-based attacks."

Risk Level AI Score
🔴 CRITICAL 88.0/100

Top 11 security issues / 187 total (Critical: 1, High: 0, Medium: 186, Low: 0)

Title Location Recommendation
CRITICAL OS Command Injection libs/utils/src/main/java/com/akto/jobs/executors/AIAgentConnectorSyncJobExecutor.java:143 Use a hardcoded set of arguments that are to be passed to OS commands. If filenames are b…
MEDIUM CVE-2018-11307: jackson-databind: Potential information exfiltration with defau… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2018-14718: jackson-databind: arbitrary code execution in slf4j-ext class libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2018-14719: jackson-databind: arbitrary code execution in blaze-ds-opt and… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2025-49128: com.fasterxml.jackson.core/jackson-core: Jackson-core Memory Di… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM CVE-2025-52999: com.fasterxml.jackson.core/jackson-core: jackson-core Potential… libs/utils/pom.xml:1 libs/utils/pom.xml: com.fasterxml.jackson.core:[email protected]
MEDIUM com.azure:azure-storage-blob:MIT libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License MIT PkgName: notice Classification: com.azure:azure-…
MEDIUM com.google.api-client:google-api-client:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.apis:google-api-services-drive:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.apis:google-api-services-sheets:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…
MEDIUM com.google.oauth-client:google-oauth-client-jetty:Apache-2.0 libs/utils/pom.xml:1 Artifact: libs/utils/pom.xml License Apache-2.0 PkgName: notice Classification: com.googl…

🔗 View Detailed Report

// Unmodifiable list ensures tokens cannot be altered and prevents shell interpretation
java.util.List<String> command = java.util.Collections.unmodifiableList(
java.util.Arrays.asList(execCanonical, "-once")
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
);
String binaryName = strategy.getBinaryName();
// Validate binary name strictly: it must not contain path separators or shell/meta characters and should be a simple filename token.
if (binaryName == null || binaryName.isEmpty() || binaryName.contains(File.separator) || !binaryName.matches("^[a-zA-Z0-9._-]+$")) {
throw new Exception("Invalid binary name from strategy: " + binaryName);
}

🔴 CRITICAL: OS Command Injection
Ensure the binary name cannot contain path separators or shell/meta characters and only consists of a safe whitelist of characters. This prevents attacker-controlled values from injecting into the executed command or causing path traversal to arbitrary binaries.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot is hallucinating, repeating the same instructions now.

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.

4 participants