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 audit log comment
Andrey9b76bc8be82a
diff --git a/backend/src/ee/services/pam-discovery/pam-discovery-source-service.ts b/backend/src/ee/services/pam-discovery/pam-discovery-source-service.tsindex b8f17f5ed2..0d9533c2da 100644--- a/backend/src/ee/services/pam-discovery/pam-discovery-source-service.ts+++ b/backend/src/ee/services/pam-discovery/pam-discovery-source-service.ts@@ -778,6 +778,11 @@ export const pamDiscoverySourceServiceFactory = (deps: TPamDiscoverySourceServicconst { decryptor } = await getProjectCipher(projectId);const rotationLimit = pLimit(IMPORT_ROTATION_CONCURRENCY);+ const auditAfterImport = (event: Parameters<typeof auditLogService.createAuditLog>[0]) =>+ auditLogService+ .createAuditLog(event)+ .catch((err) => logger.error(err, `PAM discovery import audit log write failed [sourceId=${sourceId}]`));+const rotateImported = async (accountId: string, accountType: string, rotationAccountId: string) => {let names: { accountName: string; rotationAccountName: string | null; scheduledRotationEnabled: boolean };try {@@ -801,7 +806,7 @@ export const pamDiscoverySourceServiceFactory = (deps: TPamDiscoverySourceServic};}const { accountName, rotationAccountName, scheduledRotationEnabled } = names;- await auditLogService.createAuditLog({+ await auditAfterImport({...auditLogInfo,orgId: ctx.actorOrgId,projectId,@@ -821,7 +826,7 @@ export const pamDiscoverySourceServiceFactory = (deps: TPamDiscoverySourceServic`PAM discovery import rotation failed [accountId=${accountId}]`)}));- await auditLogService.createAuditLog({+ await auditAfterImport({...auditLogInfo,orgId: ctx.actorOrgId,projectId,