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
lint and security comment
Matheus Nogueirad2d89a5b6f48
diff --git a/backend/src/services/secret-sync/gcp/gcp-sync-fns.ts b/backend/src/services/secret-sync/gcp/gcp-sync-fns.tsindex 92e863799c..9fc901c341 100644--- a/backend/src/services/secret-sync/gcp/gcp-sync-fns.ts+++ b/backend/src/services/secret-sync/gcp/gcp-sync-fns.ts@@ -16,6 +16,13 @@ import {TGcpSyncWithCredentials} from "./gcp-sync-types";+const getGlobalReplication = (locationId?: string) => {+ if (locationId) {+ return { userManaged: { replicas: [{ location: locationId }] } };+ }+ return { automatic: {} };+};+const getProjectUrl = (secretSync: TGcpSyncWithCredentials) => {const { destinationConfig } = secretSync;@@ -123,15 +130,7 @@ export const GcpSyncFns = {{replication:destinationConfig.scope === GcpSyncScope.Global- ? destinationConfig.locationId- ? {- userManaged: {- replicas: [{ location: destinationConfig.locationId }]- }- }- : {- automatic: {}- }+ ? getGlobalReplication(destinationConfig.locationId): undefined},{diff --git a/backend/src/services/secret-sync/secret-sync-maps.ts b/backend/src/services/secret-sync/secret-sync-maps.tsindex fee1690e67..84074236b6 100644--- a/backend/src/services/secret-sync/secret-sync-maps.ts+++ b/backend/src/services/secret-sync/secret-sync-maps.ts@@ -158,7 +158,7 @@ export const SECRET_SYNC_SKIP_FIELDS_MAP: Record<SecretSync, string[]> = {[SecretSync.AWSParameterStore]: [],[SecretSync.AWSSecretsManager]: ["mappingBehavior"],[SecretSync.GitHub]: [],- [SecretSync.GCPSecretManager]: [],+ [SecretSync.GCPSecretManager]: ["locationId"],[SecretSync.AzureKeyVault]: [],[SecretSync.AzureAppConfiguration]: ["label"],[SecretSync.AzureDevOps]: ["devopsProjectName"],diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsxindex f443165aa5..b6acddca2d 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsx@@ -170,8 +170,8 @@ export const GcpSyncFields = () => {<Info /></TooltipTrigger><TooltipContent className="max-w-md">- Optionally specify a region for user-managed replication. If not set, automatic- replication will be used.+ Optionally specify a region for user-managed replication. If not set,+ automatic replication will be used.</TooltipContent></Tooltip>)}diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/helpers/index.ts b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/helpers/index.tsindex 04c6b4d049..8fec85b6f0 100644--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/helpers/index.ts+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/helpers/index.ts@@ -53,12 +53,13 @@ export const getSecretSyncDestinationColValues = (secretSync: TSecretSync) => {break;case SecretSync.GCPSecretManager:primaryText = destinationConfig.projectId;- secondaryText =- destinationConfig.scope === GcpSyncScope.Global- ? destinationConfig.locationId- ? `Global - ${destinationConfig.locationId}`- : "Global"- : destinationConfig.locationId;+ if (destinationConfig.scope === GcpSyncScope.Global) {+ secondaryText = destinationConfig.locationId+ ? `Global - ${destinationConfig.locationId}`+ : "Global";+ } else {+ secondaryText = destinationConfig.locationId;+ }break;case SecretSync.AzureKeyVault:primaryText = destinationConfig.vaultBaseUrl;