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: correct gitlab check order for conflict
Scott Wilsoneb1ae216a611
diff --git a/backend/src/services/secret-sync/secret-sync-maps.ts b/backend/src/services/secret-sync/secret-sync-maps.tsindex c0784a62d3..1fbc66ccab 100644--- a/backend/src/services/secret-sync/secret-sync-maps.ts+++ b/backend/src/services/secret-sync/secret-sync-maps.ts@@ -171,6 +171,14 @@ export const DESTINATION_DUPLICATE_CHECK_MAP: Record<SecretSync, DestinationDuplconst newTargetEnv = newConfig.targetEnvironment as string | undefined;const wildcardValues = ["*", ""];++ if (+ (newConfig.scope as string) === "group"+ ? existingConfig.groupId !== newConfig.groupId+ : existingConfig.projectId !== newConfig.projectId+ )+ return false;+// If either has wildcard, it conflicts with any targetEnvironmentif (!existingTargetEnv ||@@ -181,12 +189,7 @@ export const DESTINATION_DUPLICATE_CHECK_MAP: Record<SecretSync, DestinationDuplreturn true;}- return (- existingTargetEnv === newTargetEnv &&- ((newConfig.scope as string) === "group"- ? existingConfig.groupId === newConfig.groupId- : existingConfig.projectId === newConfig.projectId)- );+ return existingTargetEnv === newTargetEnv;},[SecretSync.CloudflarePages]: defaultDuplicateCheck,[SecretSync.CloudflareWorkers]: defaultDuplicateCheck,