Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix: prevent creating a cyclic import to self
Scott Wilson8a56b190d5ac
diff --git a/backend/src/services/secret-import/secret-import-service.ts b/backend/src/services/secret-import/secret-import-service.tsindex 85b448244e..132268bf08 100644--- a/backend/src/services/secret-import/secret-import-service.ts+++ b/backend/src/services/secret-import/secret-import-service.ts@@ -128,6 +128,10 @@ export const secretImportServiceFactory = ({});}+ if (environment === data.environment && secretPath === data.path) {+ throw new BadRequestError({ message: "Cyclic import not allowed" });+ }+const sourceFolder = await folderDAL.findBySecretPath(projectId, data.environment, data.path);if (sourceFolder) {const existingImport = await secretImportDAL.findOne({