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 review lock for secret change
adilson554b362a7e1c
diff --git a/backend/src/db/migrations/20261013120000_migrate-access-approval-policies-to-global.ts b/backend/src/db/migrations/20261013120000_migrate-access-approval-policies-to-global.tsindex 2b62c9aeda..65d68f993c 100644--- a/backend/src/db/migrations/20261013120000_migrate-access-approval-policies-to-global.ts+++ b/backend/src/db/migrations/20261013120000_migrate-access-approval-policies-to-global.ts@@ -465,7 +465,7 @@ const readPolicyData = async (tx: Knex, policy: TLegacyPolicy, requests: TLegacyconst environments = await readPolicyEnvironments(tx, LEGACY_TABLES, policyId);const approvers = await readLegacyApprovers(tx, LEGACY_TABLES, policyId);const bypassers = await readLegacyBypassers(tx, LEGACY_TABLES, policyId);- const reviews = await readLegacyReviews(tx, LEGACY_TABLES, requestIds);+ const reviews = await readLegacyReviews(tx, LEGACY_TABLES, requestIds, { forUpdate: true });const requesters = requesterIds.length? ((await tx(TableName.Users)diff --git a/backend/src/db/migrations/utils/approval-migration.ts b/backend/src/db/migrations/utils/approval-migration.tsindex 9da427f5a2..00ec9a3998 100644--- a/backend/src/db/migrations/utils/approval-migration.ts+++ b/backend/src/db/migrations/utils/approval-migration.ts@@ -139,7 +139,12 @@ export const readLegacyReviews = async () => {if (!requestIds.length) return [] as TLegacyReview[];const columns = ["id", "requestId", "reviewerUserId", "status", "createdAt", ...(withComment ? ["comment"] : [])];- return (await tx(tables.legacyReviewers).whereIn("requestId", requestIds).select(columns)) as TLegacyReview[];+ return (await tx(tables.legacyReviewers)+ .whereIn("requestId", requestIds)+ .modify((qb) => {+ if (forUpdate) void qb.forUpdate();+ })+ .select(columns)) as TLegacyReview[];};export const readApproverGroupMembers = async (tx: Knex, approvers: TLegacyApprover[]) => {