before_code stringlengths 30 149k | reviewer_comment stringlengths 16 20.6k | after_code stringlengths 30 163k | diff_context stringlengths 0 22.4k | file_path stringlengths 6 155 | comment_line int64 0 26 | language stringclasses 19
values | quality_score float64 0.07 1 | comment_type stringclasses 9
values | comment_length int64 16 20.6k | before_lines int64 2 4.61k | after_lines int64 2 4.4k | is_negative bool 2
classes | pr_title stringlengths 7 140 | pr_number int64 18 61.2k | repo_name stringclasses 29
values | repo_stars int64 321 56k | repo_language stringclasses 14
values | reviewer_username stringclasses 378
values | author_username stringclasses 739
values | user stringlengths 361 200k | assistant stringlengths 16 20.6k | system stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| "findUserEncKeyByUserId"
| "delete"
| "findAllMyAccounts"
>;
groupProjectDAL: Pick<TGroupProjectDALFactory, "findByUserId">;
orgMembershipDAL: Pick<TOrgMembershipDALFactory, "find" | "insertMany" | "findOne" | "updateById">;
tokenService: Pick<TAuthTokenServiceFactory, "createTokenForUser" | "vali... | instead of referer you can send the token from the frontend directly | | "findUserEncKeyByUserId"
| "delete"
| "findAllMyAccounts"
>;
groupProjectDAL: Pick<TGroupProjectDALFactory, "findByUserId">;
orgMembershipDAL: Pick<TOrgMembershipDALFactory, "find" | "insertMany" | "findOne" | "updateById">;
tokenService: Pick<TAuthTokenServiceFactory, "createTokenForUser" | "vali... | @@ -48,17 +51,32 @@ export const userServiceFactory = ({
groupProjectDAL,
tokenService,
smtpService,
- permissionService
+ permissionService,
+ userAliasDAL
}: TUserServiceFactoryDep) => {
- const sendEmailVerificationCode = async (username: string) => {
+ const sendEmailVerificationCode = async (referer... | backend/src/services/user/user-service.ts | 26 | TypeScript | 0.286 | suggestion | 68 | 51 | 51 | false | Fix SAML duplicate accounts when signing in the first time on an existing account | 4,344 | Infisical/infisical | 22,351 | TypeScript | akhilmhdh | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/services/user/user-service.ts
PR Title: Fix SAML duplicate accounts when signing in the first time on an existing account
BEFORE CODE: | "findUserEncKeyByUserId"
| "delete"
| "findAllMyAccounts"
>;
groupProjectDAL: Pick<TGroupPr... | instead of referer you can send the token from the frontend directly | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
OTEL_OTLP_PUSH_INTERVAL: z.coerce.number().default(30000),
OTEL_COLLECTOR_BASIC_AUTH_USERNAME: zpStr(z.string().optional()),
OTEL_COLLECTOR_BASIC_AUTH_PASSWORD: zpStr(z.string().optional()),
OTEL_EXPORT_TYPE: z.enum(["prometheus", "otlp"]).optional(),
PYLON_API_KEY: zpStr(z.string().optional()),
... | Maybe we can lower this to 3.7 so we can catch a few more cases, tested it with a few examples from here `https://github.com/gitleaks/gitleaks/blob/master/detect/detect_test.go` and have a 3.7/4 entropy in most cases | OTEL_OTLP_PUSH_INTERVAL: z.coerce.number().default(30000),
OTEL_COLLECTOR_BASIC_AUTH_USERNAME: zpStr(z.string().optional()),
OTEL_COLLECTOR_BASIC_AUTH_PASSWORD: zpStr(z.string().optional()),
OTEL_EXPORT_TYPE: z.enum(["prometheus", "otlp"]).optional(),
PYLON_API_KEY: zpStr(z.string().optional()),
... | @@ -215,6 +215,7 @@ const envSchema = z
return JSON.parse(val) as { secretPath: string; projectId: string }[];
})
),
+ PARAMS_FOLDER_SECRET_DETECTION_ENTROPY: z.coerce.number().optional().default(4.5), | backend/src/lib/config/env.ts | 26 | TypeScript | 0.714 | suggestion | 216 | 51 | 51 | false | misc: added entropy check for params secret scanning | 4,350 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | sheensantoscapadngan | Review this pull request change.
Language: TypeScript
File: backend/src/lib/config/env.ts
PR Title: misc: added entropy check for params secret scanning
BEFORE CODE: OTEL_OTLP_PUSH_INTERVAL: z.coerce.number().default(30000),
OTEL_COLLECTOR_BASIC_AUTH_USERNAME: zpStr(z.string().optional()),
OTEL_COLLECTO... | Maybe we can lower this to 3.7 so we can catch a few more cases, tested it with a few examples from here `https://github.com/gitleaks/gitleaks/blob/master/detect/detect_test.go` and have a 3.7/4 entropy in most cases | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { ApiDocsTags, AUDIT_LOGS, ORGANIZATIONS } from "@app/lib/api-docs";
import { getLastMidnightDateISO, removeTrailingSlash } from "@app/lib/fn";
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
import { GenericResourceNameSchema, slugSchema } from "@app/server/lib/schemas";
import { verifyA... | why do we return a completely different schema for identities?
Can we unify it to use `sanitizedOrganizationSchema` without the `.extend` section? It might be better if always just returns an array so that it's predictable | import { ApiDocsTags, AUDIT_LOGS, ORGANIZATIONS } from "@app/lib/api-docs";
import { getLastMidnightDateISO, removeTrailingSlash } from "@app/lib/fn";
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
import { GenericResourceNameSchema, slugSchema } from "@app/server/lib/schemas";
import { verifyA... | @@ -29,18 +29,30 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => {
},
schema: {
response: {
- 200: z.object({
- organizations: sanitizedOrganizationSchema
- .extend({
- orgAuthMethod: z.string(),
- userRole: z.string()
- ... | backend/src/server/routes/v1/organization-router.ts | 26 | TypeScript | 0.643 | security | 226 | 51 | 51 | false | Add machine identities to /organization endpoint | 4,359 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/server/routes/v1/organization-router.ts
PR Title: Add machine identities to /organization endpoint
BEFORE CODE: import { ApiDocsTags, AUDIT_LOGS, ORGANIZATIONS } from "@app/lib/api-docs";
import { getLastMidnightDateISO, removeTrailingSlash } f... | why do we return a completely different schema for identities?
Can we unify it to use `sanitizedOrganizationSchema` without the `.extend` section? It might be better if always just returns an array so that it's predictable | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
const identityMemberships = await server.services.identity.listProjectIdentitiesByIdentityId({
actor: req.permission.type,
actorId: req.permission.id,
actorAuthMethod: req.permission.authMethod,
actorOrgId: req.permission.orgId,
identityId: req.params.identityId
});
... | these should be behind an "organization" property right? just in case we add more in the future | const identityMemberships = await server.services.identity.listProjectIdentitiesByIdentityId({
actor: req.permission.type,
actorId: req.permission.id,
actorAuthMethod: req.permission.authMethod,
actorOrgId: req.permission.orgId,
identityId: req.params.identityId
});
... | @@ -478,4 +478,27 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => {
return { identityMemberships };
}
});
+
+ server.route({
+ method: "GET",
+ url: "/details",
+ config: {
+ rateLimit: readLimit
+ },
+ schema: {
+ response: {
+ 200: z.objec... | backend/src/server/routes/v1/identity-router.ts | 26 | TypeScript | 0.286 | suggestion | 95 | 36 | 39 | false | Add machine identities to /organization endpoint | 4,359 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/server/routes/v1/identity-router.ts
PR Title: Add machine identities to /organization endpoint
BEFORE CODE: const identityMemberships = await server.services.identity.listProjectIdentitiesByIdentityId({
actor: req.permission.type,... | these should be behind an "organization" property right? just in case we add more in the future | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
</div>
<div className="sticky top-0 z-[51] w-1/5 cursor-default pt-2" style={{ minWidth: "240px" }}>
<div className="text-sm text-bunker-300">Reviewers</div>
<div className="mt-2 flex flex-col space-y-2 text-sm">
{secretApprovalRequestDetails?.policy?.approvers
.filter(... | I think the tooltip should show when you hover over the name as well and we should move the tooltip to the left to be consistent with the other tooltip for active users (can probably just re-use that tooltip and change the content based on status
<img width="3456" height="1920" alt="CleanShot 2025-08-19 at 16 54 36@... | </div>
</div>
<div className="sticky top-0 z-[51] w-1/5 cursor-default pt-2" style={{ minWidth: "240px" }}>
<div className="text-sm text-bunker-300">Reviewers</div>
<div className="mt-2 flex flex-col space-y-2 text-sm">
{secretApprovalRequestDetails?.policy?.approvers
... | @@ -533,26 +539,48 @@ export const SecretApprovalRequestChanges = ({
)
.map((requiredApprover) => {
const reviewer = reviewedUsers?.[requiredApprover.userId];
+ const { isOrgMembershipActive } = requiredApprover;
+
return (
<div
... | frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChanges.tsx | 26 | TypeScript | 0.5 | suggestion | 414 | 51 | 51 | false | feat(approvals): visualization of deprovisioned scim users | 4,363 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | varonix0 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChanges.tsx
PR Title: feat(approvals): visualization of deprovisioned scim users
BEFORE CODE: </div>
<div className="sticky t... | I think the tooltip should show when you hover over the name as well and we should move the tooltip to the left to be consistent with the other tooltip for active users (can probably just re-use that tooltip and change the content based on status
<img width="3456" height="1920" alt="CleanShot 2025-08-19 at 16 54 36@... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
{labels?.map((el, index) => (
<div key={`approval-list-${index + 1}`} className="flex">
{labels.length > 1 && (
<div className="flex w-12 flex-col items-center gap-2 pr-4">
<div
className={twMerge(
... | needs to be comma separated and inactive should be inline (i would just do a paragraph with fragments/span also think this would look better as a badge instead of inactive in parenthesis?)
<img width="3456" height="1920" alt="CleanShot 2025-08-19 at 17 24 33@2x" src="https://github.com/user-attachments/assets/f2321c... | {labels?.map((el, index) => (
<div key={`approval-list-${index + 1}`} className="flex">
{labels.length > 1 && (
<div className="flex w-12 flex-col items-center gap-2 pr-4">
<div
className={twMerge(
... | @@ -212,7 +213,27 @@ export const ApprovalPolicyRow = ({
)}
<div className="grid flex-1 grid-cols-5 border-b border-mineshaft-600 p-4">
<GenericFieldLabel className="col-span-2" icon={faUser} label="Users">
- {el.userLabels}
+ ... | frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/components/ApprovalPolicyRow.tsx | 26 | TypeScript | 0.5 | suggestion | 356 | 51 | 51 | false | feat(approvals): visualization of deprovisioned scim users | 4,363 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | varonix0 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/components/ApprovalPolicyRow.tsx
PR Title: feat(approvals): visualization of deprovisioned scim users
BEFORE CODE: {labels?.map((el, index) => (
... | needs to be comma separated and inactive should be inline (i would just do a paragraph with fragments/span also think this would look better as a badge instead of inactive in parenthesis?)
<img width="3456" height="1920" alt="CleanShot 2025-08-19 at 17 24 33@2x" src="https://github.com/user-attachments/assets/f2321c... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
code: z.ZodIssueCode.custom,
message: "At least one approver should be provided"
});
}
}
});
type TFormSchema = z.infer<typeof formSchema>;
const Form = ({
onToggle,
members = [],
projectId,
projectSlug,
editValues,
modalContainer,
isEditMode
}: Props & { modalCon... | remove once console log is removed | message: "At least one approver should be provided"
});
}
}
});
type TFormSchema = z.infer<typeof formSchema>;
const Form = ({
onToggle,
members = [],
projectId,
projectSlug,
editValues,
modalContainer,
isEditMode
}: Props & { modalContainer: RefObject<HTMLDivElement>; isEd... | @@ -129,7 +144,7 @@ const Form = ({
handleSubmit,
watch,
resetField,
- formState: { isSubmitting }
+ formState: { isSubmitting, errors } | frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/components/AccessPolicyModal.tsx | 26 | TypeScript | 0.143 | suggestion | 34 | 51 | 51 | false | feat(approvals): visualization of deprovisioned scim users | 4,363 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | varonix0 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/secret-manager/SecretApprovalsPage/components/ApprovalPolicyList/components/AccessPolicyModal.tsx
PR Title: feat(approvals): visualization of deprovisioned scim users
BEFORE CODE: code: z.ZodIssueCode.custom,
message:... | remove once console log is removed | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
if (!member) return null;
return member.user.isOrgMembershipActive ? (
<span key={el.id}>{member.user.username}</span>
) : (
<span className="opacity-40" key={el.id}... | needs to be comma separated and inactive should be inline (i would just do a paragraph with fragments/span also think this would look better as a badge instead of inactive in parenthesis?)
<img width="3456" height="1920" alt="CleanShot 2025-08-19 at 17 04 30@2x" src="https://github.com/user-attachments/assets/3beb48... |
return (
<div
key={`approval-list-${index + 1}`}
className={twMerge("flex", isInactive && "opacity-50")}
>
{approverSequence.approvers!.length > 1 && (
<div className="flex w-12 flex-co... | @@ -383,12 +400,31 @@ export const ReviewAccessRequestModal = ({
</div>
)}
<div className="grid flex-1 grid-cols-5 border-b border-mineshaft-600 p-4">
- <GenericFieldLabel className="col-span-2" label="Users">
- ... | frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/components/ReviewAccessModal.tsx | 26 | TypeScript | 0.5 | suggestion | 354 | 51 | 51 | false | feat(approvals): visualization of deprovisioned scim users | 4,363 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | varonix0 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/components/ReviewAccessModal.tsx
PR Title: feat(approvals): visualization of deprovisioned scim users
BEFORE CODE: if (!member) return null... | needs to be comma separated and inactive should be inline (i would just do a paragraph with fragments/span also think this would look better as a badge instead of inactive in parenthesis?)
<img width="3456" height="1920" alt="CleanShot 2025-08-19 at 17 04 30@2x" src="https://github.com/user-attachments/assets/3beb48... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
TAccessApprovalPolicy,
TAccessApprovalRequest
} from "@app/hooks/api/accessApproval/types";
import { EnforcementLevel } from "@app/hooks/api/policies/enums";
import { ApprovalStatus, TWorkspaceUser } from "@app/hooks/api/types";
import { groupBy } from "@app/lib/fn/array";
const getReviewedStatusSymbol = (status?:... | think we should make this gray instead of red? like the policy user option badge | Approver,
ApproverType,
TAccessApprovalPolicy,
TAccessApprovalRequest
} from "@app/hooks/api/accessApproval/types";
import { EnforcementLevel } from "@app/hooks/api/policies/enums";
import { ApprovalStatus, TWorkspaceUser } from "@app/hooks/api/types";
import { groupBy } from "@app/lib/fn/array";
import { EditA... | @@ -46,6 +49,16 @@ const getReviewedStatusSymbol = (status?: ApprovalStatus) => {
<FontAwesomeIcon icon={faBan} size="xs" />
</Badge>
);
+
+ if (!isOrgMembershipActive) {
+ return (
+ // Can't do a tooltip here because nested tooltips doesn't work properly as of yet.
+ // TODO(daniel)... | frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/components/ReviewAccessModal.tsx | 26 | TypeScript | 0.286 | suggestion | 80 | 51 | 51 | false | feat(approvals): visualization of deprovisioned scim users | 4,363 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | varonix0 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/components/ReviewAccessModal.tsx
PR Title: feat(approvals): visualization of deprovisioned scim users
BEFORE CODE: TAccessApprovalPolicy,
TAccessApprovalRequest
} fr... | think we should make this gray instead of red? like the policy user option badge | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
)
);
const usedBySecretSyncsFiltered = useMemo(() => {
if (selectedKeysCount === 0 || usedBySecretSyncs.length === 0) return null;
const envs = Object.values(selectedEntries.secret).flatMap((entries) => Object.keys(entries));
return usedBySecretSyncs.filter((syncItem) => envs.includes(syncItem.envi... | I think for bulk we should say all folders and their content | )
);
const usedBySecretSyncsFiltered = useMemo(() => {
if (selectedKeysCount === 0 || usedBySecretSyncs.length === 0) return null;
const envs = Object.values(selectedEntries.secret).flatMap((entries) => Object.keys(entries));
return usedBySecretSyncs.filter((syncItem) => envs.includes(syncItem.envi... | @@ -101,6 +103,16 @@ export const SelectionPanel = ({
return "Do you want to delete the selected folders across environments?";
};
+ const getDeleteModalSubTitle = () => {
+ if (selectedFolderCount > 0) {
+ if (subscription?.pitRecovery) {
+ return "This folder and all its contents will be rem... | frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/SelectionPanel.tsx | 26 | TypeScript | 0.286 | suggestion | 60 | 51 | 51 | false | Improve delete folder message | 4,375 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/secret-manager/OverviewPage/components/SelectionPanel/SelectionPanel.tsx
PR Title: Improve delete folder message
BEFORE CODE: )
);
const usedBySecretSyncsFiltered = useMemo(() => {
if (selectedKeysCount === 0 || usedBySecret... | I think for bulk we should say all folders and their content | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
});
const getFullPath = ({ path, keySchema, environment }: { path: string; keySchema?: string; environment: string }) => {
if (!keySchema || !keySchema.includes("/")) return path;
const keySchemaSegments = handlebars
.compile(keySchema)({
environment,
secretKey: "{{secretKey}}"
})
.split... | Can we guarantee that path ends in a trailing slash? If not, there could be issues | });
const getFullPath = ({ path, keySchema, environment }: { path: string; keySchema?: string; environment: string }) => {
if (!keySchema || !keySchema.includes("/")) return path;
if (keySchema.startsWith("/")) {
throw new SecretSyncError({ message: `Key schema cannot contain leading '/'`, shouldRetry: fals... | @@ -34,18 +35,47 @@ const sleep = async () =>
setTimeout(resolve, 1000);
});
-const getParametersByPath = async (ssm: AWS.SSM, path: string): Promise<TAWSParameterStoreRecord> => {
+const getFullPath = ({ path, keySchema, environment }: { path: string; keySchema?: string; environment: string }) => {
+ if (!k... | backend/src/services/secret-sync/aws-parameter-store/aws-parameter-store-sync-fns.ts | 26 | TypeScript | 0.286 | question | 82 | 51 | 51 | false | fix(aws-parameter-store-sync): handle keyschema with path segments for aws parameter store | 4,384 | Infisical/infisical | 22,351 | TypeScript | x032205 | scott-ray-wilson | Review this pull request change.
Language: TypeScript
File: backend/src/services/secret-sync/aws-parameter-store/aws-parameter-store-sync-fns.ts
PR Title: fix(aws-parameter-store-sync): handle keyschema with path segments for aws parameter store
BEFORE CODE: });
const getFullPath = ({ path, keySchema, environmen... | Can we guarantee that path ends in a trailing slash? If not, there could be issues | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
});
}
throw new DatabaseError({ error });
}
};
// delete all audit log that have expired
const pruneAuditLog: TAuditLogDALFactory["pruneAuditLog"] = async (tx) => {
const runPrune = async (dbClient: knex.Knex) => {
const AUDIT_LOG_PRUNE_BATCH_SIZE = 10000;
const MAX_RETRY... | why don't we just call `del` here directly? | if (error instanceof knex.KnexTimeoutError) {
throw new GatewayTimeoutError({
error,
message: "Failed to fetch audit logs due to timeout. Add more search filters."
});
}
throw new DatabaseError({ error });
}
};
// delete all audit log that have expired
c... | @@ -151,56 +155,46 @@ export const auditLogDALFactory = (db: TDbClient) => {
};
// delete all audit log that have expired
- const pruneAuditLog: TAuditLogDALFactory["pruneAuditLog"] = async (tx) => {
- const runPrune = async (dbClient: knex.Knex) => {
- const AUDIT_LOG_PRUNE_BATCH_SIZE = 10000;
- ... | backend/src/ee/services/audit-log/audit-log-dal.ts | 26 | TypeScript | 0.214 | question | 44 | 51 | 51 | false | fix(audit-logs): move prune audit log transaction inside while loop | 4,399 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | scott-ray-wilson | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/audit-log/audit-log-dal.ts
PR Title: fix(audit-logs): move prune audit log transaction inside while loop
BEFORE CODE: });
}
throw new DatabaseError({ error });
}
};
// delete all audit log that have exp... | why don't we just call `del` here directly? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { Knex } from "knex";
import { TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
if (!(await knex.schema.hasColumn(TableName.SecretApprovalPolicy, "secretReadAccessCompat"))) {
await knex.schema.alterTable(TableName.SecretApprovalPolicy, (t) => {
t.boolean("secret... | maybe we can use a better name for the field? Current one is a bit tricky to parse. Maybe something like `shouldCheckSecretPermission`? | import { Knex } from "knex";
import { TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
if (!(await knex.schema.hasColumn(TableName.SecretApprovalPolicy, "shouldCheckSecretPermission"))) {
await knex.schema.alterTable(TableName.SecretApprovalPolicy, (t) => {
t.boolean("s... | @@ -0,0 +1,19 @@
+import { Knex } from "knex";
+
+import { TableName } from "../schemas";
+
+export async function up(knex: Knex): Promise<void> {
+ if (!(await knex.schema.hasColumn(TableName.SecretApprovalPolicy, "secretReadAccessCompat"))) { | backend/src/db/migrations/20250824173438_add-approval-secret-read-compat.ts | 6 | TypeScript | 0.571 | security | 136 | 20 | 20 | false | feat: allow secret approval reviewers to read secrets | 4,411 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | sidwebworks | Review this pull request change.
Language: TypeScript
File: backend/src/db/migrations/20250824173438_add-approval-secret-read-compat.ts
PR Title: feat: allow secret approval reviewers to read secrets
BEFORE CODE: import { Knex } from "knex";
import { TableName } from "../schemas";
export async function up(knex: K... | maybe we can use a better name for the field? Current one is a bit tricky to parse. Maybe something like `shouldCheckSecretPermission`? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
const v = option as SingleValue<TChecklyAccount>;
onChange(v?.id ?? null);
setValue("destinationConfig.accountName", v?.name ?? "");
}}
options={accounts}
placeholder="Select an account..."
getOptionLabel={(option) =... | Think this needs `isClearable` - can't unselect a group
<img width="1456" height="1098" alt="CleanShot 2025-08-26 at 09 02 46@2x" src="https://github.com/user-attachments/assets/7464e974-a3ba-402c-a909-bd01f2f2181f" />
| const v = option as SingleValue<TChecklyAccount>;
onChange(v?.id ?? null);
setValue("destinationConfig.accountName", v?.name ?? "");
}}
options={accounts}
placeholder="Select an account..."
getOptionLabel={(option) =... | @@ -60,6 +73,36 @@ export const ChecklySyncFields = () => {
</FormControl>
)}
/>
+
+ <Controller
+ name="destinationConfig.groupId"
+ control={control}
+ render={({ field: { value, onChange }, fieldState: { error } }) => (
+ <FormControl
+ isError... | frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsx | 26 | TypeScript | 0.643 | suggestion | 221 | 46 | 47 | false | feat: Support Checkly group variables (ENG-3478) | 4,418 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | sidwebworks | Review this pull request change.
Language: TypeScript
File: frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsx
PR Title: feat: Support Checkly group variables (ENG-3478)
BEFORE CODE: const v = option as SingleValue<TChecklyAccount>;
onChange(... | Think this needs `isClearable` - can't unselect a group
<img width="1456" height="1098" alt="CleanShot 2025-08-26 at 09 02 46@2x" src="https://github.com/user-attachments/assets/7464e974-a3ba-402c-a909-bd01f2f2181f" />
| You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
value: v.value,
locked: v.locked ?? false,
secret: true
}));
const group = await this.getCheckGroup(connection, accountId, groupId);
await this.send(connection, {
accountId,
method: "PUT",
url: `/v2/check-groups/${groupId}`,
data: { name: group?.name, environmentV... | not sure we should use this batch function; this only let's me sync 50 variables while the individual upsert calls let's me add over 50 at the global level - I can sync 100 secrets to global scope but it fails to batch group more than 50; unless this is a check group limitation we should handle the same way as global) | throw new SecretSyncError({
message: "Checkly does not support syncing more than 50 variables to Check Group",
shouldRetry: false
});
}
const apiVariables = environmentVariables.map((v) => ({
key: v.key,
value: v.value,
locked: v.locked ?? false,
secret: true... | @@ -181,6 +181,115 @@ class ChecklyPublicClient {
return res;
}
+
+ async getCheckGroups(connection: TChecklyConnectionConfig, accountId: string, limit = 50, page = 1) {
+ const res = await this.send<{ id: number; name: string }[]>(connection, {
+ accountId,
+ method: "GET",
+ url: `/v1/che... | backend/src/services/app-connection/checkly/checkly-connection-public-client.ts | 26 | TypeScript | 0.643 | bug | 319 | 51 | 51 | false | feat: Support Checkly group variables (ENG-3478) | 4,418 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | sidwebworks | Review this pull request change.
Language: TypeScript
File: backend/src/services/app-connection/checkly/checkly-connection-public-client.ts
PR Title: feat: Support Checkly group variables (ENG-3478)
BEFORE CODE: value: v.value,
locked: v.locked ?? false,
secret: true
}));
const group = aw... | not sure we should use this batch function; this only let's me sync 50 variables while the individual upsert calls let's me add over 50 at the global level - I can sync 100 secrets to global scope but it fails to batch group more than 50; unless this is a check group limitation we should handle the same way as global) | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
getOptionValue={(option) => option.id}
/>
</FormControl>
)}
/>
<Controller
name="destinationConfig.groupId"
control={control}
render={({ field: { value, onChange }, fieldState: { error } }) => (
<FormControl
isError={... | for some reason when editing an existing sync the clear button doesn't work (at least visually - I think it's because it's being set to undefined instead of null?) - works fine when creating one
<img width="1716" height="1422" alt="CleanShot 2025-08-27 at 14 14 26@2x" src="https://github.com/user-attachments/assets/d7... | getOptionValue={(option) => option.id}
/>
</FormControl>
)}
/>
<Controller
name="destinationConfig.groupId"
control={control}
render={({ field: { value, onChange }, fieldState: { error } }) => (
<FormControl
isError={... | @@ -60,6 +73,37 @@ export const ChecklySyncFields = () => {
</FormControl>
)}
/>
+
+ <Controller
+ name="destinationConfig.groupId"
+ control={control}
+ render={({ field: { value, onChange }, fieldState: { error } }) => (
+ <FormControl
+ isError... | frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsx | 26 | TypeScript | 0.643 | suggestion | 360 | 40 | 40 | false | feat: Support Checkly group variables (ENG-3478) | 4,418 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | sidwebworks | Review this pull request change.
Language: TypeScript
File: frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsx
PR Title: feat: Support Checkly group variables (ENG-3478)
BEFORE CODE: getOptionValue={(option) => option.id}
/>
</FormControl... | for some reason when editing an existing sync the clear button doesn't work (at least visually - I think it's because it's being set to undefined instead of null?) - works fine when creating one
<img width="1716" height="1422" alt="CleanShot 2025-08-27 at 14 14 26@2x" src="https://github.com/user-attachments/assets/d7... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
url: `/v1/check-groups/${groupId}`
});
if (!res) return null;
return {
id: res.id.toString(),
name: res.name,
environmentVariables: res.environmentVariables
};
} catch (error) {
if (isAxiosError(error) && error.response?.status === HttpStatusCode.NotFo... | let's throw a SecretSyncError with `shouldRetry` false so it fails fast instead of retyring:
```
throw new SecretSyncError({
message: "Checkly does not support syncing more than 50 variables to Check Group",
shouldRetry: false
});
``` | method: "GET",
url: `/v1/check-groups/${groupId}`
});
if (!res) return null;
return {
id: res.id.toString(),
name: res.name,
environmentVariables: res.environmentVariables
};
} catch (error) {
if (isAxiosError(error) && error.response?.status =... | @@ -181,6 +181,119 @@ class ChecklyPublicClient {
return res;
}
+
+ async getCheckGroups(connection: TChecklyConnectionConfig, accountId: string, limit = 50, page = 1) {
+ const res = await this.send<{ id: number; name: string }[]>(connection, {
+ accountId,
+ method: "GET",
+ url: `/v1/che... | backend/src/services/app-connection/checkly/checkly-connection-public-client.ts | 26 | TypeScript | 1 | bug | 258 | 51 | 51 | false | feat: Support Checkly group variables (ENG-3478) | 4,418 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | sidwebworks | Review this pull request change.
Language: TypeScript
File: backend/src/services/app-connection/checkly/checkly-connection-public-client.ts
PR Title: feat: Support Checkly group variables (ENG-3478)
BEFORE CODE: url: `/v1/check-groups/${groupId}`
});
if (!res) return null;
return {
... | let's throw a SecretSyncError with `shouldRetry` false so it fails fast instead of retyring:
```
throw new SecretSyncError({
message: "Checkly does not support syncing more than 50 variables to Check Group",
shouldRetry: false
});
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { Button } from "@app/components/v2";
export enum ProjectListView {
MyProjects = "my-projects",
AllProjects = "all-projects"
}
type Props = {
value: ProjectListView;
onChange: (value: ProjectListView) => void;
};
export const ProjectListToggle = ({ value, onChange }: Props) => {
return (
<div cl... | Let's try a gap-1 here to add some space between the buttons. Right now hovering looks weird
<img width="1024" height="281" alt="Image" src="https://github.com/user-attachments/assets/c5b0325b-0cab-49b8-9db7-95e3ddde0e8f" /> | import { Button } from "@app/components/v2";
export enum ProjectListView {
MyProjects = "my-projects",
AllProjects = "all-projects"
}
type Props = {
value: ProjectListView;
onChange: (value: ProjectListView) => void;
};
export const ProjectListToggle = ({ value, onChange }: Props) => {
return (
<div cl... | @@ -14,28 +11,32 @@ type Props = {
};
export const ProjectListToggle = ({ value, onChange }: Props) => {
- const getDisplayText = (listView: ProjectListView) => {
- return listView === ProjectListView.MyProjects ? "My Projects" : "All Projects";
- };
-
return (
- <div className="group relative flex curso... | frontend/src/pages/organization/ProjectsPage/components/ProjectListToggle.tsx | 15 | TypeScript | 0.5 | suggestion | 225 | 40 | 40 | false | improvement(frontend): Revise Project View Select UI on Project Overview Page | 4,432 | Infisical/infisical | 22,351 | TypeScript | x032205 | scott-ray-wilson | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/organization/ProjectsPage/components/ProjectListToggle.tsx
PR Title: improvement(frontend): Revise Project View Select UI on Project Overview Page
BEFORE CODE: import { Button } from "@app/components/v2";
export enum ProjectListView {
... | Let's try a gap-1 here to add some space between the buttons. Right now hovering looks weird
<img width="1024" height="281" alt="Image" src="https://github.com/user-attachments/assets/c5b0325b-0cab-49b8-9db7-95e3ddde0e8f" /> | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
// await tx.raw("SELECT pg_advisory_xact_lock(?)", [PgSqlLock.IdentityLogin(identityUa.identityId, clientId)]);
// Lockout Check
const lockoutRaw = await keyStore.getItem(LOCKOUT_KEY);
let lockout: LockoutObject | undefined;
if (lockoutRaw) {
lockout = JSON.parse(lockoutRaw) as L... | should not be inside a transaction because the database connection waits until this is resolved... and this is a computationally expensive synchronous method | clientSecretPrefix
});
let validClientSecretInfo: (typeof clientSecrtInfo)[0] | null = null;
for await (const info of clientSecrtInfo) {
const isMatch = await crypto.hashing().compareHash(clientSecret, info.clientSecretHash);
if (isMatch) {
validClientSecretInfo = info;
b... | @@ -62,128 +62,85 @@ export const identityUaServiceFactory = ({
const login = async (clientId: string, clientSecret: string, ip: string) => {
const identityUa = await identityUaDAL.findOne({ clientId });
if (!identityUa) {
- throw new UnauthorizedError({
- message: "Invalid credentials"
+ ... | backend/src/services/identity-ua/identity-ua-service.ts | 26 | TypeScript | 0.429 | performance | 157 | 51 | 51 | false | feat: reverted lockout in login completely | 4,444 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | akhilmhdh | Review this pull request change.
Language: TypeScript
File: backend/src/services/identity-ua/identity-ua-service.ts
PR Title: feat: reverted lockout in login completely
BEFORE CODE: // await tx.raw("SELECT pg_advisory_xact_lock(?)", [PgSqlLock.IdentityLogin(identityUa.identityId, clientId)]);
// Lockou... | should not be inside a transaction because the database connection waits until this is resolved... and this is a computationally expensive synchronous method | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
try {
const accessToken = await getHCVaultAccessToken(connection, gatewayService);
// Verify token
await requestWithHCVaultGateway(connection, gatewayService, {
url: `${instanceUrl}/v1/auth/token/lookup-self`,
method: "GET",
headers: { "X-Vault-Token": accessToken }
});
return ... | Change \` to `"`, no string interpolation here |
try {
const accessToken = await getHCVaultAccessToken(connection, gatewayService);
// Verify token
await requestWithHCVaultGateway(connection, gatewayService, {
url: `${instanceUrl}/v1/auth/token/lookup-self`,
method: "GET",
headers: { "X-Vault-Token": accessToken }
});
return... | @@ -71,38 +141,55 @@ export const getHCVaultAccessToken = async (connection: TValidateHCVaultConnecti
}
};
-export const validateHCVaultConnectionCredentials = async (config: THCVaultConnectionConfig) => {
- const instanceUrl = await getHCVaultInstanceUrl(config);
+export const validateHCVaultConnectionCredentia... | backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts | 26 | TypeScript | 0.286 | suggestion | 46 | 51 | 51 | false | feat(app-connection, secret-sync): HC Vault Gateway Support | 4,455 | Infisical/infisical | 22,351 | TypeScript | varonix0 | x032205 | Review this pull request change.
Language: TypeScript
File: backend/src/services/app-connection/hc-vault/hc-vault-connection-fns.ts
PR Title: feat(app-connection, secret-sync): HC Vault Gateway Support
BEFORE CODE: try {
const accessToken = await getHCVaultAccessToken(connection, gatewayService);
// Veri... | Change \` to `"`, no string interpolation here | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
className="w-full border border-mineshaft-500"
position="popper"
dropdownContainerClassName="max-w-none"
>
{Object.values(HCVaultConnectionMethod).map((method) => {
return (
<SelectItem value={method} key... | Agree with greptile, do we need to set a default value here? | className="w-full border border-mineshaft-500"
position="popper"
dropdownContainerClassName="max-w-none"
>
{Object.values(HCVaultConnectionMethod).map((method) => {
return (
<SelectItem value={method} key... | @@ -115,6 +128,55 @@ export const HCVaultConnectionForm = ({ appConnection, onSubmit }: Props) => {
</FormControl>
)}
/>
+ {subscription.gateway && (
+ <OrgPermissionCan
+ I={OrgGatewayPermissionActions.AttachGateways}
+ a={OrgPermissionSubjects.Gat... | frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HCVaultConnectionForm.tsx | 26 | TypeScript | 0.214 | question | 60 | 51 | 51 | false | feat(app-connection, secret-sync): HC Vault Gateway Support | 4,455 | Infisical/infisical | 22,351 | TypeScript | varonix0 | x032205 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HCVaultConnectionForm.tsx
PR Title: feat(app-connection, secret-sync): HC Vault Gateway Support
BEFORE CODE: className="w-full border border-mine... | Agree with greptile, do we need to set a default value here? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
OTEL_COLLECTOR_BASIC_AUTH_PASSWORD: zpStr(z.string().optional()),
OTEL_EXPORT_TYPE: z.enum(["prometheus", "otlp"]).optional(),
PYLON_API_KEY: zpStr(z.string().optional()),
DISABLE_AUDIT_LOG_GENERATION: zodStrBool.default("false"),
SSL_CLIENT_CERTIFICATE_HEADER_KEY: zpStr(z.string().optional()).defa... | let's call it INFISICAL_PRIMARY_INSTANCE_URL | OTEL_COLLECTOR_BASIC_AUTH_PASSWORD: zpStr(z.string().optional()),
OTEL_EXPORT_TYPE: z.enum(["prometheus", "otlp"]).optional(),
PYLON_API_KEY: zpStr(z.string().optional()),
DISABLE_AUDIT_LOG_GENERATION: zodStrBool.default("false"),
SSL_CLIENT_CERTIFICATE_HEADER_KEY: zpStr(z.string().optional()).defa... | @@ -218,6 +218,8 @@ const envSchema = z
),
PARAMS_FOLDER_SECRET_DETECTION_ENTROPY: z.coerce.number().optional().default(3.7),
+ INFISICAL_PRIMARY_URL: zpStr(z.string().optional()), | backend/src/lib/config/env.ts | 26 | TypeScript | 0.071 | suggestion | 44 | 51 | 51 | false | feat: primary forwarding mode completed | 4,476 | Infisical/infisical | 22,351 | TypeScript | maidul98 | akhilmhdh | Review this pull request change.
Language: TypeScript
File: backend/src/lib/config/env.ts
PR Title: feat: primary forwarding mode completed
BEFORE CODE: OTEL_COLLECTOR_BASIC_AUTH_PASSWORD: zpStr(z.string().optional()),
OTEL_EXPORT_TYPE: z.enum(["prometheus", "otlp"]).optional(),
PYLON_API_KEY: zpStr(z.... | let's call it INFISICAL_PRIMARY_INSTANCE_URL | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
resourceName: string;
};
};
identityPermissionMetadata?: Record<string, unknown>; // filled by permission service
assumedPrivilegeDetails?: { requesterId: string; actorId: string; actorType: ActorType; projectId: string };
}
}
declare module "fastify" {
interface Session {
callbackPor... | ForwardWritesToPrimaryInstance would be better | resourceType: string;
resourceName: string;
};
};
identityPermissionMetadata?: Record<string, unknown>; // filled by permission service
assumedPrivilegeDetails?: { requesterId: string; actorId: string; actorType: ActorType; projectId: string };
}
}
declare module "fastify" {
inter... | @@ -161,6 +161,7 @@ declare module "fastify" {
};
// identity injection. depending on which kinda of token the information is filled in auth
auth: TAuthMode;
+ isPrimaryForwardingMode: boolean; | backend/src/@types/fastify.d.ts | 26 | TypeScript | 0.143 | suggestion | 47 | 51 | 51 | false | feat: primary forwarding mode completed | 4,476 | Infisical/infisical | 22,351 | TypeScript | maidul98 | akhilmhdh | Review this pull request change.
Language: TypeScript
File: backend/src/@types/fastify.d.ts
PR Title: feat: primary forwarding mode completed
BEFORE CODE: resourceName: string;
};
};
identityPermissionMetadata?: Record<string, unknown>; // filled by permission service
assumedPrivilegeDetai... | ForwardWritesToPrimaryInstance would be better | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import replyFrom from "@fastify/reply-from";
import fp from "fastify-plugin";
export const primaryForwardingMode = fp(async (server, opt: { primaryUrl: string }) => {
await server.register(replyFrom, {
base: opt.primaryUrl
});
server.addHook("preValidation", async (request, reply) => {
if (request.url.s... | might be better to include something about forwarding writes so that it is more specific. like forward mutations/writes | import replyFrom from "@fastify/reply-from";
import fp from "fastify-plugin";
export const forwardWritesToPrimary = fp(async (server, opt: { primaryUrl: string }) => {
await server.register(replyFrom, {
base: opt.primaryUrl
});
server.addHook("preValidation", async (request, reply) => {
if (request.url.... | @@ -0,0 +1,14 @@
+import replyFrom from "@fastify/reply-from";
+import fp from "fastify-plugin";
+
+export const primaryForwardingMode = fp(async (server, opt: { primaryUrl: string }) => { | backend/src/server/plugins/primary-forwarding-mode.ts | 4 | TypeScript | 0.429 | suggestion | 121 | 15 | 15 | false | feat: primary forwarding mode completed | 4,476 | Infisical/infisical | 22,351 | TypeScript | maidul98 | akhilmhdh | Review this pull request change.
Language: TypeScript
File: backend/src/server/plugins/primary-forwarding-mode.ts
PR Title: feat: primary forwarding mode completed
BEFORE CODE: import replyFrom from "@fastify/reply-from";
import fp from "fastify-plugin";
export const primaryForwardingMode = fp(async (server, opt: ... | might be better to include something about forwarding writes so that it is more specific. like forward mutations/writes | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
actor: ActorType.USER
} as const;
case AuthTokenType.API_KEY:
// throw new Error("API Key auth is no longer supported.");
return { authMode: AuthMode.API_KEY, token: decodedToken, actor: ActorType.USER } as const;
case AuthTokenType.IDENTITY_ACCESS_TOKEN:
return {
authMod... | q: why do we decorate it here and not in the main plugin to forward? | actor: ActorType.USER
} as const;
case AuthTokenType.API_KEY:
// throw new Error("API Key auth is no longer supported.");
return { authMode: AuthMode.API_KEY, token: decodedToken, actor: ActorType.USER } as const;
case AuthTokenType.IDENTITY_ACCESS_TOKEN:
return {
authMod... | @@ -107,11 +107,16 @@ export const extractAuth = async (req: FastifyRequest, jwtSecret: string) => {
};
// ! Important: You can only 100% count on the `req.permission.orgId` field being present when the auth method is Identity Access Token (Machine Identity).
-export const injectIdentity = fp(async (server: Fastify... | backend/src/server/plugins/auth/inject-identity.ts | 26 | TypeScript | 0.214 | question | 68 | 51 | 51 | false | feat: primary forwarding mode completed | 4,476 | Infisical/infisical | 22,351 | TypeScript | maidul98 | akhilmhdh | Review this pull request change.
Language: TypeScript
File: backend/src/server/plugins/auth/inject-identity.ts
PR Title: feat: primary forwarding mode completed
BEFORE CODE: actor: ActorType.USER
} as const;
case AuthTokenType.API_KEY:
// throw new Error("API Key auth is no longer supported.... | q: why do we decorate it here and not in the main plugin to forward? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
? {
sslCA: sslCertificate,
sslServerDNMatch: sslRejectUnauthorized
}
: false
};
}
default:
throw new Error(`Unhandled SQL Connection Config: ${app as AppConnection}`);
}
};
export const getSqlConnectionClient = async (appConnection: Pick... | wait isn't this inverted? like for Postgres, we should be using the resolved IP else just pass in the original host input value? | ? {
sslCA: sslCertificate,
sslServerDNMatch: sslRejectUnauthorized
}
: false
};
}
default:
throw new Error(`Unhandled SQL Connection Config: ${app as AppConnection}`);
}
};
export const getSqlConnectionClient = async (appConnection: Pick... | @@ -90,7 +90,7 @@ export const getSqlConnectionClient = async (appConnection: Pick<TSqlConnection,
connection: {
database,
port,
- host,
+ host: app === AppConnection.Postgres ? baseHost : host, | backend/src/services/app-connection/shared/sql/sql-connection-fns.ts | 26 | TypeScript | 0.429 | question | 129 | 51 | 51 | false | feat: removed internal ip transformation | 4,479 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | akhilmhdh | Review this pull request change.
Language: TypeScript
File: backend/src/services/app-connection/shared/sql/sql-connection-fns.ts
PR Title: feat: removed internal ip transformation
BEFORE CODE: ? {
sslCA: sslCertificate,
sslServerDNMatch: sslRejectUnauthorized
}
... | wait isn't this inverted? like for Postgres, we should be using the resolved IP else just pass in the original host input value? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
actionProjectType: ActionProjectType.Any,
actorAuthMethod: permission.authMethod,
actorOrgId: permission.orgId
})
.catch(() => {
return null;
});
if (projectMember) throw new BadRequestError({ message: "User already has access to the project" });
const projectM... | this works but I'm thinking to keep this a little more future proof we should use unpackPermissions and can permission.can? | actorId: permission.id,
projectId,
actionProjectType: ActionProjectType.Any,
actorAuthMethod: permission.authMethod,
actorOrgId: permission.orgId
})
.catch(() => {
return null;
});
if (projectMember) throw new BadRequestError({ message: "User already... | @@ -1852,9 +1853,53 @@ export const projectServiceFactory = ({
if (projectMember) throw new BadRequestError({ message: "User already has access to the project" });
const projectMembers = await projectMembershipDAL.findAllProjectMembers(projectId);
- const filteredProjectMembers = projectMembers
+
+ le... | backend/src/services/project/project-service.ts | 26 | TypeScript | 0.429 | security | 123 | 51 | 51 | false | Improve requestProjectAccess check to retrieve users with permissions to grant access when no admin user is set | 4,488 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/services/project/project-service.ts
PR Title: Improve requestProjectAccess check to retrieve users with permissions to grant access when no admin user is set
BEFORE CODE: actionProjectType: ActionProjectType.Any,
actorAuthMethod... | this works but I'm thinking to keep this a little more future proof we should use unpackPermissions and can permission.can? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
message: `SAML or OIDC configuration for organization with ID '${orgId}' not found`
});
if (samlCfg && !samlCfg.lastUsed) {
throw new BadRequestError({
message:
"To apply the new SAML auth enforcement, please log in via SAML at least once. This step is required to ... | we are retrieving these on the previous if block as well, shouldn't we just have an if to check if any of both conditions are set, initialize these only once and use them on both checks for authEnforced and googleAuthEnforced? | });
}
if (authEnforced) {
if (!samlCfg && !oidcCfg)
throw new NotFoundError({
message: `SAML or OIDC configuration for organization with ID '${orgId}' not found`
});
if (samlCfg && !samlCfg.lastUsed) {
throw new BadRequestError({
message:
... | @@ -483,6 +486,42 @@ export const orgServiceFactory = ({
});
}
+ const samlCfg = await samlConfigDAL.findOne({ | backend/src/services/org/org-service.ts | 26 | TypeScript | 0.5 | security | 226 | 51 | 51 | false | improvement(google-oauth-enforcement): prevent conflicting sso enforcement configuration | 4,501 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | scott-ray-wilson | Review this pull request change.
Language: TypeScript
File: backend/src/services/org/org-service.ts
PR Title: improvement(google-oauth-enforcement): prevent conflicting sso enforcement configuration
BEFORE CODE: message: `SAML or OIDC configuration for organization with ID '${orgId}' not found`
}... | we are retrieving these on the previous if block as well, shouldn't we just have an if to check if any of both conditions are set, initialize these only once and use them on both checks for authEnforced and googleAuthEnforced? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { forwardRef, TextareaHTMLAttributes, useCallback, useMemo, useRef, useState } from "react";
import { faFolder, faKey, faLayerGroup } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import * as Popover from "@radix-ui/react-popover";
import { useWorksp... | If I have a secret with values not present in other environments I get this error when trying to expand the row (guessing it doesn't handle undefined)
<img width="3456" height="1912" alt="CleanShot 2025-09-09 at 10 35 15@2x" src="https://github.com/user-attachments/assets/9a160592-438f-4bc6-8cb9-d3c1a2124fca" />
<img... | import { forwardRef, TextareaHTMLAttributes, useCallback, useMemo, useRef, useState } from "react";
import { faFolder, faKey, faLayerGroup, faSearch } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import * as Popover from "@radix-ui/react-popover";
import {... | frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx | 1 | TypeScript | 0.643 | security | 480 | 26 | 26 | false | Stop blocking secret references with no matching reference and improve UI edit secret behavior to better highlight this | 4,505 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx
PR Title: Stop blocking secret references with no matching reference and improve UI edit secret behavior to better highlight this
BEFORE CODE: import { forwardRef, TextareaHTMLAttribu... | If I have a secret with values not present in other environments I get this error when trying to expand the row (guessing it doesn't handle undefined)
<img width="3456" height="1912" alt="CleanShot 2025-09-09 at 10 35 15@2x" src="https://github.com/user-attachments/assets/9a160592-438f-4bc6-8cb9-d3c1a2124fca" />
<img... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
import { forwardRef, TextareaHTMLAttributes, useCallback, useMemo, useRef, useState } from "react";
import { faFolder, faKey, faLayerGroup } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import * as Popover from "@radix-ui/react-popover";
import { useWorksp... | the error display doesn't seem to persist in a few scenarios
https://github.com/user-attachments/assets/a7873d8b-1412-4cd5-a607-97082529aa21
| import { forwardRef, TextareaHTMLAttributes, useCallback, useMemo, useRef, useState } from "react";
import { faFolder, faKey, faLayerGroup, faSearch } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import * as Popover from "@radix-ui/react-popover";
import {... | frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx | 1 | TypeScript | 0.571 | suggestion | 145 | 26 | 26 | false | Stop blocking secret references with no matching reference and improve UI edit secret behavior to better highlight this | 4,505 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx
PR Title: Stop blocking secret references with no matching reference and improve UI edit secret behavior to better highlight this
BEFORE CODE: import { forwardRef, TextareaHTMLAttribu... | the error display doesn't seem to persist in a few scenarios
https://github.com/user-attachments/assets/a7873d8b-1412-4cd5-a607-97082529aa21
| You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
projectId: string,
permission: MongoAbility<ProjectPermissionSet>,
references: ReturnType<typeof getAllSecretReferences>["nestedReferences"],
tx?: Knex
) => {
if (!references.length) return;
const uniqueReferenceEnvironmentSlugs = Array.from(new Set(references.map((el) => el.environment)));
... | realized up above still throws an error if I do ${not.valid} because the environment isn't found - think this should be handled? | projectId: string,
permission: MongoAbility<ProjectPermissionSet>,
references: ReturnType<typeof getAllSecretReferences>["nestedReferences"],
tx?: Knex
) => {
if (!references.length) return;
const uniqueReferenceEnvironmentSlugs = Array.from(new Set(references.map((el) => el.environment)));
... | @@ -177,58 +177,71 @@ export const secretV2BridgeServiceFactory = ({
);
const referencesFolderGroupByPath = groupBy(referredFolders.filter(Boolean), (i) => `${i?.envId}-${i?.path}`);
+ | backend/src/services/secret-v2-bridge/secret-v2-bridge-service.ts | 26 | TypeScript | 0.571 | question | 128 | 51 | 51 | false | Stop blocking secret references with no matching reference and improve UI edit secret behavior to better highlight this | 4,505 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/services/secret-v2-bridge/secret-v2-bridge-service.ts
PR Title: Stop blocking secret references with no matching reference and improve UI edit secret behavior to better highlight this
BEFORE CODE: projectId: string,
permission: MongoAbi... | realized up above still throws an error if I do ${not.valid} because the environment isn't found - think this should be handled? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { Knex } from "knex";
import { TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
if (!(await knex.schema.hasTable(TableName.KeyValueStore))) {
await knex.schema.createTable(TableName.KeyValueStore, (t) => {
t.text("key").primary();
t.bigint("integerValue");
... | thoughts on renaming to be "CacheKeyValueVersions"?
I think the KeyValueStore implies that it really has the actual key & value pair | import { Knex } from "knex";
import { TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
if (!(await knex.schema.hasTable(TableName.KeyValueStore))) {
await knex.schema.createTable(TableName.KeyValueStore, (t) => {
t.text("key").primary();
t.bigint("integerValue");
... | @@ -0,0 +1,17 @@
+import { Knex } from "knex";
+
+import { TableName } from "../schemas";
+
+export async function up(knex: Knex): Promise<void> {
+ if (!(await knex.schema.hasTable(TableName.KeyValueStore))) { | backend/src/db/migrations/20250908193226_sql-cache_int.ts | 6 | TypeScript | 0.357 | performance | 137 | 18 | 19 | false | Local redis for geo | 4,506 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | akhilmhdh | Review this pull request change.
Language: TypeScript
File: backend/src/db/migrations/20250908193226_sql-cache_int.ts
PR Title: Local redis for geo
BEFORE CODE: import { Knex } from "knex";
import { TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
if (!(await knex.schema.hasT... | thoughts on renaming to be "CacheKeyValueVersions"?
I think the KeyValueStore implies that it really has the actual key & value pair | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
const handleOTPModalClose = () => {
setIsOTPModalOpen(false);
setPendingEmail("");
setTypedOTP("");
};
return (
<>
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
<h2 className="mb-8 flex-1 text-xl font-semibold text-mineshaft-100">Change email</h... | I think we should replace "You can change this back after..." with "You may disable email authentication after logging in with your new email if needed." |
const handleOTPModalClose = () => {
setIsOTPModalOpen(false);
setPendingEmail("");
setTypedOTP("");
};
return (
<>
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
<h2 className="mb-8 flex-1 text-xl font-semibold text-mineshaft-100">Change email</h... | @@ -177,6 +179,11 @@ export const ChangeEmailSection = () => {
label="New email address"
isError={Boolean(error)}
errorText={error?.message}
+ tooltipText={
+ hasEmailAuth
+ ? "Your email authentication met... | frontend/src/pages/user/PersonalSettingsPage/components/ChangeEmailSection/ChangeEmailSection.tsx | 26 | TypeScript | 0.429 | security | 153 | 51 | 51 | false | Enable email login on change of emails flows to avoid blocked users | 4,539 | Infisical/infisical | 22,351 | TypeScript | x032205 | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/user/PersonalSettingsPage/components/ChangeEmailSection/ChangeEmailSection.tsx
PR Title: Enable email login on change of emails flows to avoid blocked users
BEFORE CODE:
const handleOTPModalClose = () => {
setIsOTPModalOpen(false)... | I think we should replace "You can change this back after..." with "You may disable email authentication after logging in with your new email if needed." | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { Knex } from "knex";
import { TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
const hasEnableGroupSyncCol = await knex.schema.hasColumn(TableName.SamlConfig, "enableGroupSync");
await knex.schema.alterTable(TableName.SamlConfig, (tb) => {
if (!hasEnableGroupSyncCo... | total nit: can move if check out side alter table call (same for down) | import { Knex } from "knex";
import { TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
const hasEnableGroupSyncCol = await knex.schema.hasColumn(TableName.SamlConfig, "enableGroupSync");
if (!hasEnableGroupSyncCol) {
await knex.schema.alterTable(TableName.SamlConfig, (tb) ... | @@ -0,0 +1,23 @@
+import { Knex } from "knex";
+
+import { TableName } from "../schemas";
+
+export async function up(knex: Knex): Promise<void> {
+ const hasEnableGroupSyncCol = await knex.schema.hasColumn(TableName.SamlConfig, "enableGroupSync");
+
+ await knex.schema.alterTable(TableName.SamlConfig, (tb) => {
+ ... | backend/src/db/migrations/20250926000000_saml-configs-group-sync-fields.ts | 9 | TypeScript | 0.286 | nitpick | 70 | 24 | 24 | false | Add SAML group mapping | 4,588 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/db/migrations/20250926000000_saml-configs-group-sync-fields.ts
PR Title: Add SAML group mapping
BEFORE CODE: import { Knex } from "knex";
import { TableName } from "../schemas";
export async function up(knex: Knex): Promise<void> {
const ha... | total nit: can move if check out side alter table call (same for down) | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
const orgGroupIds = new Set(orgGroups.map((g) => g.id));
const currentOrgGroupMemberships = currentGroupMemberships.filter((m) => orgGroupIds.has(m.groupId));
const currentGroupNames = new Set(
currentOrgGroupMemberships
.map((m) => {
const group = orgGroups.find((g) => ... | maybe this should be no access? thinking out loud | }
return samlGroups;
};
const syncUserGroupMemberships = async ({
userId,
orgId,
samlGroups,
tx
}: {
userId: string;
orgId: string;
samlGroups: string[];
tx?: Knex;
}) => {
const processGroupSync = async (transaction: Knex) => {
const currentGroupMemberships =... | @@ -54,13 +90,127 @@ export const samlConfigServiceFactory = ({
orgMembershipDAL,
userDAL,
userAliasDAL,
+ groupDAL,
+ userGroupMembershipDAL,
+ groupProjectDAL,
+ projectDAL,
+ projectBotDAL,
+ projectKeyDAL,
permissionService,
licenseService,
tokenService,
smtpService,
identityMetadataDA... | backend/src/ee/services/saml-config/saml-config-service.ts | 26 | TypeScript | 0.143 | suggestion | 49 | 51 | 51 | false | Add SAML group mapping | 4,588 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/saml-config/saml-config-service.ts
PR Title: Add SAML group mapping
BEFORE CODE: const orgGroupIds = new Set(orgGroups.map((g) => g.id));
const currentOrgGroupMemberships = currentGroupMemberships.filter((m) => orgGroup... | maybe this should be no access? thinking out loud | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
const { permission } = await permissionService.getOrgPermission(actor, actorId, orgId, actorAuthMethod, actorOrgId);
ForbiddenError.from(permission).throwUnlessCan(OrgPermissionActions.Create, OrgPermissionSubjects.Sso);
const plan = await licenseService.getPlan(orgId);
if (!plan.samlSSO)
throw n... | I think we should use the same error message as below so we don't have to update this message whenever we add support to other providers | }
}
}
}
};
if (tx) {
await processGroupSync(tx);
} else {
await userDAL.transaction(processGroupSync);
}
};
const createSamlCfg: TSamlConfigServiceFactory["createSamlCfg"] = async ({
idpCert,
actor,
actorAuthMethod,
actorOrgId,
or... | @@ -96,6 +247,12 @@ export const samlConfigServiceFactory = ({
});
}
+ if (enableGroupSync && !GROUP_SYNC_SUPPORTED_PROVIDERS.includes(authProvider)) {
+ throw new BadRequestError({
+ message: "Group sync is only supported for Google SAML SSO." | backend/src/ee/services/saml-config/saml-config-service.ts | 26 | TypeScript | 0.571 | suggestion | 136 | 51 | 51 | false | Add SAML group mapping | 4,588 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/saml-config/saml-config-service.ts
PR Title: Add SAML group mapping
BEFORE CODE: const { permission } = await permissionService.getOrgPermission(actor, actorId, orgId, actorAuthMethod, actorOrgId);
ForbiddenError.from(permis... | I think we should use the same error message as below so we don't have to update this message whenever we add support to other providers | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
};
const id = UUIDToMongoId[dto.id] ?? dto.id;
samlConfig = await samlConfigDAL.findById(id);
}
if (!samlConfig) throw new NotFoundError({ message: `Failed to find SSO data` });
// when dto is type id means it's internally used
if (dto.type === "org") {
const { permission } = ... | more just curious; why removing context comments here and above? |
const [ssoConfig] = await samlConfigDAL.update({ orgId }, updateQuery);
await orgDAL.updateById(orgId, { authEnforced: false, scimEnabled: false });
return ssoConfig;
};
const getSaml: TSamlConfigServiceFactory["getSaml"] = async (dto) => {
let samlConfig: TSamlConfigs | undefined;
if (dto.ty... | @@ -395,12 +605,11 @@ export const samlConfigServiceFactory = ({
orgId,
role,
roleId,
- status: newUser.isAccepted ? OrgMembershipStatus.Accepted : OrgMembershipStatus.Invited, // if user is fully completed, then set status to accepted, otherwise set it to invit... | backend/src/ee/services/saml-config/saml-config-service.ts | 26 | TypeScript | 0.214 | question | 64 | 51 | 51 | false | Add SAML group mapping | 4,588 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/saml-config/saml-config-service.ts
PR Title: Add SAML group mapping
BEFORE CODE: };
const id = UUIDToMongoId[dto.id] ?? dto.id;
samlConfig = await samlConfigDAL.findById(id);
}
if (!samlConfig) throw new ... | more just curious; why removing context comments here and above? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const parsed = JSON.parse(groupsMetadata.value);
if (Array.isArray(parsed)) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
samlGroups = parsed;
} else if... | maybe we could extract this into a function (at least the parsing logic) since it's duplicated? |
if (metadata && newUser.id) {
await identityMetadataDAL.delete({ userId: newUser.id, orgId }, tx);
if (metadata.length) {
await identityMetadataDAL.insertMany(
metadata.map(({ key, value }) => ({
userId: newUser?.id,
orgId,
... | @@ -425,6 +634,39 @@ export const samlConfigServiceFactory = ({
);
}
}
+
+ if (shouldSyncGroups && metadata && newUser.id && groupsMetadata?.value) {
+ let samlGroups: string[] = [];
+
+ try {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe... | backend/src/ee/services/saml-config/saml-config-service.ts | 26 | TypeScript | 0.286 | refactor | 95 | 51 | 51 | false | Add SAML group mapping | 4,588 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/saml-config/saml-config-service.ts
PR Title: Add SAML group mapping
BEFORE CODE: // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const parsed = JSON.parse(groupsMetadata.value);
... | maybe we could extract this into a function (at least the parsing logic) since it's duplicated? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
<p>
When this feature is enabled, Infisical will automatically sync group
memberships between the SAML provider and Infisical. Users will be added to
Infisical groups that match their SAML group names.
</p>
... | I think we should also add this note to the docs | <>
<p>
When this feature is enabled, Infisical will automatically sync group
memberships between the SAML provider and Infisical. Users will be added to
Infisical groups that match their SAML group names.
... | @@ -132,6 +165,66 @@ export const OrgSSOSection = (): JSX.Element => {
Allow members to authenticate into Infisical with SAML
</p>
</div>
+ {data && GROUP_SYNC_SUPPORTED_PROVIDERS.includes(data.authProvider) && (
+ <div className="py-4">
+ <div className="mb-2 flex justif... | frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx | 26 | TypeScript | 0.143 | suggestion | 48 | 51 | 51 | false | Add SAML group mapping | 4,588 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx
PR Title: Add SAML group mapping
BEFORE CODE: <p>
When this feature is enabled, Infisical will automatically sync group
... | I think we should also add this note to the docs | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
authProvider,
orgId,
relayState,
metadata
}) => {
const appCfg = getConfig();
const serverCfg = await getServerCfg();
if (serverCfg.enabledLoginMethods && !serverCfg.enabledLoginMethods.includes(LoginMethod.SAML)) {
throw new ForbiddenRequestError({
message: "Login with SAML... | handle `undefined` (also below) | type: KmsDataKey.Organization,
orgId: samlConfig.orgId
});
let entryPoint = "";
if (samlConfig.encryptedSamlEntryPoint) {
entryPoint = decryptor({ cipherTextBlob: samlConfig.encryptedSamlEntryPoint }).toString();
}
let issuer = "";
if (samlConfig.encryptedSamlIssuer) {
... | @@ -282,6 +456,10 @@ export const samlConfigServiceFactory = ({
const organization = await orgDAL.findOrgById(orgId);
if (!organization) throw new NotFoundError({ message: `Organization with ID '${orgId}' not found` });
+ const samlConfig = await samlConfigDAL.findOne({ orgId });
+ const groupsMetadat... | backend/src/ee/services/saml-config/saml-config-service.ts | 26 | TypeScript | 0.357 | suggestion | 31 | 51 | 51 | false | Add SAML group mapping | 4,588 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/saml-config/saml-config-service.ts
PR Title: Add SAML group mapping
BEFORE CODE: authProvider,
orgId,
relayState,
metadata
}) => {
const appCfg = getConfig();
const serverCfg = await getServerCfg();
if... | handle `undefined` (also below) | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
tagColor: color,
tagSlug: slug
});
append(data);
onToggle(false);
reset();
createNotification({
text: "Successfully created a tag",
type: "success"
});
} catch (error) {
console.error(error);
createNotification({
text: "Failed t... | Maybe something like "Create a new tag, and it will be automatically linked to secret: {secretKey}."? | tagColor: color,
tagSlug: slug
});
append(data);
onToggle(false);
reset();
createNotification({
text: "Successfully created a tag",
type: "success"
});
} catch (error) {
console.error(error);
createNotification({
text: "Failed t... | @@ -151,8 +155,12 @@ export const CreateTagModal = ({ isOpen, onToggle }: Props): JSX.Element => {
return (
<Modal isOpen={isOpen} onOpenChange={onToggle}>
<ModalContent
- title="Create tag"
- subTitle="Specify your tag name, and the slug will be created automatically."
+ title={curr... | frontend/src/components/tags/CreateTagModal/CreateTagModal.tsx | 26 | TypeScript | 0.357 | security | 101 | 51 | 51 | false | Fix: tag modal to create and add a tag to the secret. | 4,641 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: frontend/src/components/tags/CreateTagModal/CreateTagModal.tsx
PR Title: Fix: tag modal to create and add a tag to the secret.
BEFORE CODE: tagColor: color,
tagSlug: slug
});
append(data);
onToggle(false);
reset();
... | Maybe something like "Create a new tag, and it will be automatically linked to secret: {secretKey}."? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
}
await queueService.stopRepeatableJob(
QueueName.HealthAlert,
QueueJobs.HealthAlert,
{ pattern: "*/5 * * * *", utc: true },
QueueName.HealthAlert // job id
);
await queueService.startPg<QueueName.HealthAlert>(
QueueJobs.HealthAlert,
async () => {
try {
... | Let's set the polling interval to a much higher number because there's no real-time expectation here. Probably 60 should be okay?
For reference, the polling interval is what determines how often the queue polls our PG database for new jobs.. with the configuration, it will result in a READ query every second | }
await queueService.stopRepeatableJob(
QueueName.HealthAlert,
QueueJobs.HealthAlert,
{ pattern: "*/5 * * * *", utc: true },
QueueName.HealthAlert // job id
);
await queueService.startPg<QueueName.HealthAlert>(
QueueJobs.HealthAlert,
async () => {
try {
... | @@ -0,0 +1,65 @@
+import { TGatewayV2ServiceFactory } from "@app/ee/services/gateway-v2/gateway-v2-service";
+import { TRelayServiceFactory } from "@app/ee/services/relay/relay-service";
+import { getConfig } from "@app/lib/config/env";
+import { logger } from "@app/lib/logger";
+import { QueueJobs, QueueName, TQueueSe... | backend/src/services/health-alert/health-alert-queue.ts | 26 | TypeScript | 0.5 | suggestion | 314 | 42 | 42 | false | move health alert to queue | 4,661 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | x032205 | Review this pull request change.
Language: TypeScript
File: backend/src/services/health-alert/health-alert-queue.ts
PR Title: move health alert to queue
BEFORE CODE: }
await queueService.stopRepeatableJob(
QueueName.HealthAlert,
QueueJobs.HealthAlert,
{ pattern: "*/5 * * * *", utc: true }... | Let's set the polling interval to a much higher number because there's no real-time expectation here. Probably 60 should be okay?
For reference, the polling interval is what determines how often the queue polls our PG database for new jobs.. with the configuration, it will result in a READ query every second | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { useMemo, useState } from "react";
import { faCopy } from "@fortawesome/free-regular-svg-icons";
import { faUpRightFromSquare } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import ms from "ms";
import { createNotification } from "@app/components/no... | We can skip this check as the duration can never be undefined, null, or falsy. | import { useMemo, useState } from "react";
import { faCopy } from "@fortawesome/free-regular-svg-icons";
import { faUpRightFromSquare } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import ms from "ms";
import { createNotification } from "@app/components/no... | @@ -19,12 +19,44 @@ export const PamAccessAccountModal = ({ isOpen, onOpenChange, account }: Props)
const isDurationValid = useMemo(() => duration && ms(duration || "1s") > 0, [duration]);
+ const cliDuration = useMemo(() => {
+ if (!duration) return duration; | frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx | 23 | TypeScript | 0.357 | suggestion | 78 | 48 | 48 | false | feat(pam): ui improvements | 4,691 | Infisical/infisical | 22,351 | TypeScript | gupta-piyush19 | x032205 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
PR Title: feat(pam): ui improvements
BEFORE CODE: import { useMemo, useState } from "react";
import { faCopy } from "@fortawesome/free-regular-svg-icons";
import { faUpRightFromSqu... | We can skip this check as the duration can never be undefined, null, or falsy. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
const isDurationValid = useMemo(() => duration && ms(duration || "1s") > 0, [duration]);
const cliDuration = useMemo(() => {
if (!duration) return duration;
const unit = duration.replace(/[\d\s.-]/g, "");
const dayOrLargerUnits = [
"d",
"day",
"days",
"w",
"week",
... | we are making an assumption here about the 30 days in a month | const isDurationValid = useMemo(() => duration && ms(duration || "1s") > 0, [duration]);
const cliDuration = useMemo(() => {
if (!duration) return duration;
const unit = duration.replace(/[\d\s.-]/g, "");
const dayOrLargerUnits = [
"d",
"day",
"days",
"w",
"week",
... | @@ -19,12 +19,53 @@ export const PamAccessAccountModal = ({ isOpen, onOpenChange, account }: Props)
const isDurationValid = useMemo(() => duration && ms(duration || "1s") > 0, [duration]);
+ const cliDuration = useMemo(() => {
+ if (!duration) return duration;
+
+ const unit = duration.replace(/[\d\s.-]/g... | frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx | 26 | TypeScript | 0.214 | suggestion | 61 | 51 | 51 | false | feat(pam): ui improvements | 4,691 | Infisical/infisical | 22,351 | TypeScript | gupta-piyush19 | x032205 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
PR Title: feat(pam): ui improvements
BEFORE CODE: const isDurationValid = useMemo(() => duration && ms(duration || "1s") > 0, [duration]);
const cliDuration = useMemo(() => {
... | we are making an assumption here about the 30 days in a month | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
throw new Error(
"Invalid Secret Sync source configuration: folder no longer exists. Please update source environment and secret path."
);
const importedSecrets = await SecretSyncFns.getSecrets(secretSync, {
appConnectionDAL,
kmsService,
gatewayService,
gatewayV2Service
... | let's throw a `SecretSyncError` here with `shouldRetry` set to `false`; explicit imports fail on first attempt but if you select import during creation it runs inside the sync job and will retry 5 times - using this error tells it not to retry | throw new Error(
"Invalid Secret Sync source configuration: folder no longer exists. Please update source environment and secret path."
);
const importedSecrets = await SecretSyncFns.getSecrets(secretSync, {
appConnectionDAL,
kmsService,
gatewayService,
gatewayV2Service
... | @@ -408,6 +409,23 @@ export const secretSyncQueueFactory = ({
if (!Object.keys(importedSecrets).length) return {};
+ let invalidNameCount = 0;
+ let errorMessage = "";
+
+ for (const [key] of Object.entries(importedSecrets)) {
+ const result = SecretNameSchema.safeParse(key);
+ if (!result.s... | backend/src/services/secret-sync/secret-sync-queue.ts | 26 | TypeScript | 0.786 | bug | 245 | 51 | 51 | false | fix: validate secret names before import | 4,737 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | victorvhs017 | Review this pull request change.
Language: TypeScript
File: backend/src/services/secret-sync/secret-sync-queue.ts
PR Title: fix: validate secret names before import
BEFORE CODE: throw new Error(
"Invalid Secret Sync source configuration: folder no longer exists. Please update source environment and se... | let's throw a `SecretSyncError` here with `shouldRetry` set to `false`; explicit imports fail on first attempt but if you select import during creation it runs inside the sync job and will retry 5 times - using this error tells it not to retry | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
orgId,
"Failed to import secrets due to plan restriction. Upgrade plan to access enterprise secret syncs."
);
if (!environment || !folder)
throw new Error(
"Invalid Secret Sync source configuration: folder no longer exists. Please update source environment and secret path."
);
... | thoughts on storing the failing keys and concatenating them to the message at the end? That way users know the problematic keys | orgId,
"Failed to import secrets due to plan restriction. Upgrade plan to access enterprise secret syncs."
);
if (!environment || !folder)
throw new Error(
"Invalid Secret Sync source configuration: folder no longer exists. Please update source environment and secret path."
);
... | @@ -408,6 +409,23 @@ export const secretSyncQueueFactory = ({
if (!Object.keys(importedSecrets).length) return {};
+ let invalidNameCount = 0;
+ let errorMessage = "";
+
+ for (const [key] of Object.entries(importedSecrets)) {
+ const result = SecretNameSchema.safeParse(key);
+ if (!result.s... | backend/src/services/secret-sync/secret-sync-queue.ts | 26 | TypeScript | 0.429 | bug | 127 | 51 | 51 | false | fix: validate secret names before import | 4,737 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | victorvhs017 | Review this pull request change.
Language: TypeScript
File: backend/src/services/secret-sync/secret-sync-queue.ts
PR Title: fix: validate secret names before import
BEFORE CODE: orgId,
"Failed to import secrets due to plan restriction. Upgrade plan to access enterprise secret syncs."
);
if (!en... | thoughts on storing the failing keys and concatenating them to the message at the end? That way users know the problematic keys | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
onCheckedChange={onChange}
isChecked={value}
>
<p className="w-[8.4rem]">Auto-Sync {value ? "Enabled" : "Disabled"}</p>
</Switch>
</FormControl>
);
}}... | I don't have block enabled but the create button is disabled
<img width="3456" height="1918" alt="CleanShot 2025-10-27 at 09 59 06@2x" src="https://github.com/user-attachments/assets/fc7f9f59-9342-426f-b43f-dfa78747784e" />
<img width="3456" height="1918" alt="CleanShot 2025-10-27 at 09 59 35@2x" src="https://githu... | onCheckedChange={onChange}
isChecked={value}
>
<p className="w-[8.4rem]">Auto-Sync {value ? "Enabled" : "Disabled"}</p>
</Switch>
</FormControl>
);
}}... | @@ -245,7 +256,11 @@ export const CreateSecretSyncForm = ({
</FormProvider>
<div className="flex w-full flex-row-reverse justify-between gap-4 pt-4">
- <Button onClick={handleNext} colorSchema="secondary">
+ <Button
+ onClick={handleNext}
+ colorSchema="secondary"
+ ... | frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx | 26 | TypeScript | 0.5 | suggestion | 392 | 38 | 34 | false | Add org option to block duplicate destinations on secret syncs | 4,746 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx
PR Title: Add org option to block duplicate destinations on secret syncs
BEFORE CODE: onCheckedChange={onChange}
isChecked={value}
... | I don't have block enabled but the create button is disabled
<img width="3456" height="1918" alt="CleanShot 2025-10-27 at 09 59 06@2x" src="https://github.com/user-attachments/assets/fc7f9f59-9342-426f-b43f-dfa78747784e" />
<img width="3456" height="1918" alt="CleanShot 2025-10-27 at 09 59 35@2x" src="https://githu... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
<div
className={`mb-2 flex items-start rounded-md border px-3 py-2 ${
currentOrg?.blockDuplicateSecretSyncDestinations
? "border-red-600 bg-red-900/20"
: "border-yellow-600 bg-yellow-900/20"
}`}
>
<div
cl... | nit: I think it might read better with something like "Your organization does not allow duplicate destination configurations." for the second sentence | <div
className={`mb-2 flex items-start rounded-md border px-3 py-2 ${
currentOrg?.blockDuplicateSecretSyncDestinations
? "border-red-600 bg-red-900/20"
: "border-yellow-600 bg-yellow-900/20"
}`}
>
<div
cl... | @@ -193,18 +194,50 @@ export const SecretSyncReviewFields = () => {
{isChecking && <span className="text-xs text-mineshaft-400">Checking...</span>}
</div>
{hasDuplicate && (
- <div className="mb-2 flex items-start rounded-md border border-yellow-600 bg-yellow-900/20 px-3 py-2">
- ... | frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx | 26 | TypeScript | 0.429 | refactor | 150 | 51 | 51 | false | Add org option to block duplicate destinations on secret syncs | 4,746 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx
PR Title: Add org option to block duplicate destinations on secret syncs
BEFORE CODE: <div
className={`mb-2 flex items-start rounded-md borde... | nit: I think it might read better with something like "Your organization does not allow duplicate destination configurations." for the second sentence | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
<p className="mt-4 text-sm text-mineshaft-400">Loading options...</p>
</div>
);
}
return (
<div className="flex flex-col gap-4">
<Input
value={search}
onChange={(e) => setSearch(e.target.value)}
leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
plac... | All Certificate Syncs can be unlocked if you switch to ... | <p className="mt-4 text-sm text-mineshaft-400">Loading options...</p>
</div>
);
}
return (
<div className="flex flex-col gap-4">
<Input
value={search}
onChange={(e) => setSearch(e.target.value)}
leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
plac... | @@ -69,7 +69,10 @@ export const PkiSyncSelect = ({ onSelect }: Props) => {
type="button"
onClick={() =>
enterprise && !subscription.enterpriseCertificateSyncs
- ? handlePopUpOpen("upgradePlan")
+ ? handlePopUpOpen("upgradePlan", {
+ ... | frontend/src/components/pki-syncs/PkiSyncSelect.tsx | 26 | TypeScript | 0.214 | suggestion | 58 | 51 | 51 | false | fix: Pro/Enterprise plan clarification in ui popup | 4,757 | Infisical/infisical | 22,351 | TypeScript | maidul98 | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: frontend/src/components/pki-syncs/PkiSyncSelect.tsx
PR Title: fix: Pro/Enterprise plan clarification in ui popup
BEFORE CODE: <p className="mt-4 text-sm text-mineshaft-400">Loading options...</p>
</div>
);
}
return (
<div classNa... | All Certificate Syncs can be unlocked if you switch to ... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { useEffect } from "react";
import { Link, Outlet, useLocation } from "@tanstack/react-router";
import { motion } from "framer-motion";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
import { Tab, TabList, Tabs } from "@app/components/v2";
import { useProject, useProjectPermission,... | Your current plan does not provide access to Infisical PAM. To unlock this feature, please upgrade to Infisical Enterprise plan. | import { useEffect } from "react";
import { Link, Outlet, useLocation } from "@tanstack/react-router";
import { motion } from "framer-motion";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
import { Tab, TabList, Tabs } from "@app/components/v2";
import { useProject, useProjectPermission,... | @@ -18,7 +18,10 @@ export const PamLayout = () => {
useEffect(() => {
if (subscription && !subscription.pam) {
- handlePopUpOpen("upgradePlan");
+ handlePopUpOpen("upgradePlan", {
+ description: "You can use PAM if you switch to Infisical's Enterprise plan.", | frontend/src/layouts/PamLayout/PamLayout.tsx | 22 | TypeScript | 0.357 | suggestion | 128 | 47 | 47 | false | fix: Pro/Enterprise plan clarification in ui popup | 4,757 | Infisical/infisical | 22,351 | TypeScript | maidul98 | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: frontend/src/layouts/PamLayout/PamLayout.tsx
PR Title: fix: Pro/Enterprise plan clarification in ui popup
BEFORE CODE: import { useEffect } from "react";
import { Link, Outlet, useLocation } from "@tanstack/react-router";
import { motion } from "framer-mot... | Your current plan does not provide access to Infisical PAM. To unlock this feature, please upgrade to Infisical Enterprise plan. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
],
[
<FontAwesomeIcon key={6} className="pr-4 text-sm" icon={faToolbox} />,
"Version Upgrade Tool",
() => "/upgrade-path"
]
] as const;
export const Navbar = () => {
const { user } = useUser();
const { subscription } = useSubscription();
const { currentOrg, isSubOrganization } = useOrganization... | `cardDeclinedDays` can be null as well right? 🤔 shouldn't we just check `subscription?.cardDeclinedDays && subscription?.cardDeclinedDays >= 30` so we cover both cases undefined and null? | ],
[
<FontAwesomeIcon key={6} className="pr-4 text-sm" icon={faToolbox} />,
"Version Upgrade Tool",
() => "/upgrade-path"
]
] as const;
export const Navbar = () => {
const { user } = useUser();
const { subscription } = useSubscription();
const { currentOrg, isSubOrganization } = useOrganization... | @@ -144,12 +144,12 @@ export const Navbar = () => {
enabled: Boolean(subscription.subOrganization)
});
- useEffect(() => {
- if (subscription?.cardDeclined && !sessionStorage.getItem("paymentFailed")) {
- sessionStorage.setItem("paymentFailed", "true");
- setShowCardDeclinedModal(true);
- }
-... | frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx | 26 | TypeScript | 0.714 | question | 188 | 51 | 51 | false | [ENG-3937] fix: makes upgrade license modal intrusive | 4,772 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx
PR Title: [ENG-3937] fix: makes upgrade license modal intrusive
BEFORE CODE: ],
[
<FontAwesomeIcon key={6} className="pr-4 text-sm" icon={faToolbox} />,
"Version Upgrade Tool"... | `cardDeclinedDays` can be null as well right? 🤔 shouldn't we just check `subscription?.cardDeclinedDays && subscription?.cardDeclinedDays >= 30` so we cover both cases undefined and null? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
projectId
});
if (!key) {
throw new NotFoundError({ message: `Key with ID ${id} not found` });
}
if (key.isReserved) {
throw new BadRequestError({ message: "Cannot get reserved keys" });
}
const completeKeyDetails = await kmsDAL.findByIdWithAssociatedKms(id);
if (!compl... | Why do we need to do this cast? Wouldn't it work to do z.unknown() instead of z.any() on the kmipMetadata zod fields? | projectId
});
if (!key) {
throw new NotFoundError({ message: `Key with ID ${id} not found` });
}
if (key.isReserved) {
throw new BadRequestError({ message: "Cannot get reserved keys" });
}
const completeKeyDetails = await kmsDAL.findByIdWithAssociatedKms(id);
if (!compl... | @@ -341,7 +341,8 @@ export const kmipOperationServiceFactory = ({
algorithm: completeKeyDetails.internalKms.encryptionAlgorithm,
isActive: !key.isDisabled,
createdAt: key.createdAt,
- updatedAt: key.updatedAt
+ updatedAt: key.updatedAt,
+ kmipMetadata: key.kmipMetadata as Record<stri... | backend/src/ee/services/kmip/kmip-operation-service.ts | 26 | TypeScript | 0.571 | question | 117 | 51 | 51 | false | misc: add kmip metadata to the other kmip routes | 4,775 | Infisical/infisical | 22,351 | TypeScript | varonix0 | sheensantoscapadngan | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/kmip/kmip-operation-service.ts
PR Title: misc: add kmip metadata to the other kmip routes
BEFORE CODE: projectId
});
if (!key) {
throw new NotFoundError({ message: `Key with ID ${id} not found` });
}
if... | Why do we need to do this cast? Wouldn't it work to do z.unknown() instead of z.any() on the kmipMetadata zod fields? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
}: {
environmentIds: string[];
parentIds: string[];
search?: string;
limit?: number;
offset?: number;
orderBy?: SecretsOrderBy;
orderDirection?: OrderByDirection;
},
tx?: Knex
) => {
try {
const query = (tx || db.replicaNode())(TableName.SecretFolder)
... | let's do the same ternary here since this is raw | }: {
environmentIds: string[];
parentIds: string[];
search?: string;
limit?: number;
offset?: number;
orderBy?: SecretsOrderBy;
orderDirection?: OrderByDirection;
},
tx?: Knex
) => {
try {
const query = (tx || db.replicaNode())(TableName.SecretFolder)
... | @@ -419,13 +419,14 @@ export const secretFolderDALFactory = (db: TDbClient) => {
.select(
selectAllTableCols(TableName.SecretFolder),
db.raw(
- `DENSE_RANK() OVER (ORDER BY ${TableName.SecretFolder}."name" ${
- orderDirection ?? OrderByDirection.ASC
- })... | backend/src/services/secret-folder/secret-folder-dal.ts | 26 | TypeScript | 0.071 | suggestion | 48 | 51 | 51 | false | [ENG-4074] fix: folder name sorting | 4,797 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/services/secret-folder/secret-folder-dal.ts
PR Title: [ENG-4074] fix: folder name sorting
BEFORE CODE: }: {
environmentIds: string[];
parentIds: string[];
search?: string;
limit?: number;
offset?: number;
... | let's do the same ternary here since this is raw | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
const { cipherTextBlob: encryptedPamSessionKey } = encryptor({ plainText: newPamSessionKey });
await gatewayV2DAL.updateById(gateway.id, { encryptedPamSessionKey }, tx);
return newPamSessionKey;
});
};
const healthcheckNotify = async () => {
const unhealthyGateways = await gatewayV2DAL.... | Can we please use enums instead of a string literal for "invited"? We should have an enum for the different role status's | const { cipherTextBlob: encryptedPamSessionKey } = encryptor({ plainText: newPamSessionKey });
await gatewayV2DAL.updateById(gateway.id, { encryptedPamSessionKey }, tx);
return newPamSessionKey;
});
};
const healthcheckNotify = async () => {
const unhealthyGateways = await gatewayV2DAL.... | @@ -909,7 +909,9 @@ export const gatewayV2ServiceFactory = ({
for await (const [orgId, gateways] of Object.entries(gatewaysByOrg)) {
try {
- const admins = await orgDAL.findOrgMembersByRole(orgId, OrgMembershipRole.Admin);
+ const admins = (await orgDAL.findOrgMembersByRole(orgId, OrgMembers... | backend/src/ee/services/gateway-v2/gateway-v2-service.ts | 26 | TypeScript | 0.429 | question | 121 | 51 | 51 | false | don't notify "invited" admins about health alerts | 4,799 | Infisical/infisical | 22,351 | TypeScript | varonix0 | x032205 | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/gateway-v2/gateway-v2-service.ts
PR Title: don't notify "invited" admins about health alerts
BEFORE CODE: const { cipherTextBlob: encryptedPamSessionKey } = encryptor({ plainText: newPamSessionKey });
await gatewayV2DAL... | Can we please use enums instead of a string literal for "invited"? We should have an enum for the different role status's | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
// Update URL to match filter state
navigate({
search: (prev) => ({
...prev,
search: searchFilter || ""
})
});
},
[navigate]
);
const handleToggleVisibility = useCallback(() => setIsVisible((state) => !state), []);
// snapshot functions
const handl... | Filter handlers (handleSearchChange, handleTagToggle, handleToggleRowType) now update both state and URL, creating a bidirectional sync for proper browser history.
Without this change, the browser back button wouldn't work after clicking a secret reference, making the feature a lot less useful. |
navigate({
search: (prev) => ({
...prev,
filterBy: filterByList.length > 0 ? filterByList.join(",") : ""
})
});
return {
...state,
include: newInclude
};
});
},
[navigate]
);
const handleClearFilters = u... | @@ -544,21 +583,27 @@ const Page = () => {
updatedTags[tag] = true;
});
+ const filterBy = routerQueryParams.filterBy
+ ? (routerQueryParams.filterBy as string).split(",").filter(Boolean)
+ : [];
+
+ const includeFilter: Record<RowType, boolean> = {
+ [RowType.Folder]: filterBy.includ... | frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx | 26 | TypeScript | 0.643 | security | 298 | 51 | 51 | false | feature: secret reference shortcut | 4,804 | Infisical/infisical | 22,351 | TypeScript | victorvhs017 | victorvhs017 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
PR Title: feature: secret reference shortcut
BEFORE CODE: // Update URL to match filter state
navigate({
search: (prev) => ({
...prev,
sea... | Filter handlers (handleSearchChange, handleTagToggle, handleToggleRowType) now update both state and URL, creating a bidirectional sync for proper browser history.
Without this change, the browser back button wouldn't work after clicking a secret reference, making the feature a lot less useful. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
}
}
};
const handlePopUpOpen = () => {
setHighlightedIndex(-1);
};
// to handle multiple ref for single component
const handleRef = useCallback((el: HTMLTextAreaElement) => {
// @ts-expect-error this is for multiple ref single component
inputRef.current = el;
... | two things we should account for in this function:
- permissions - can the user actually view/access this folder/env/secret (can use `permission.can` to check)
- is this actually a secret reference (users can save non-valid "references" that this tries to navigate to even though they don't exists) | }
if (["ArrowDown", "ArrowUp", "Tab"].includes(e.key)) {
e.preventDefault();
}
}
};
const handlePopUpOpen = () => {
setHighlightedIndex(-1);
};
// to handle multiple ref for single component
const handleRef = useCallback((el: HTMLTextAreaElement) => {
... | @@ -307,6 +311,77 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
}
}, []);
+ const handleClickSegment = useCallback( | frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx | 26 | TypeScript | 0.643 | security | 304 | 51 | 51 | false | feature: secret reference shortcut | 4,804 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | victorvhs017 | Review this pull request change.
Language: TypeScript
File: frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx
PR Title: feature: secret reference shortcut
BEFORE CODE: }
}
};
const handlePopUpOpen = () => {
setHighlightedIndex(-1);
};
// to handle multipl... | two things we should account for in this function:
- permissions - can the user actually view/access this folder/env/secret (can use `permission.can` to check)
- is this actually a secret reference (users can save non-valid "references" that this tries to navigate to even though they don't exists) | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
text: "Invalid secret reference",
type: "error"
});
return;
}
const pathSegment = pathSegments[i];
folderPath += `${pathSegment}`;
if (pathSegment === segment) {
folderPath += "/";
br... | I think if these aren't set (because of the segment clicked) we should use wildcards (same above):
```
secretName: secretName ?? "*",
secretTags: ["*"]
``` | }
const pathSegment = pathSegments[i];
folderPath += `${pathSegment}`;
if (pathSegment === segment) {
folderPath += "/";
break;
}
folderPath += "/";
}
}
// Only validate secret permission, use... | @@ -365,6 +392,32 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
}
}
+ const secretPath = segment === environmentSlug ? "/" : folderPath;
+
+ const canReadSecretValue = hasSecretReadValueOrDescribePermission(
+ permission,
+ ProjectPe... | frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx | 26 | TypeScript | 0.786 | security | 168 | 51 | 51 | false | feature: secret reference shortcut | 4,804 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | victorvhs017 | Review this pull request change.
Language: TypeScript
File: frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx
PR Title: feature: secret reference shortcut
BEFORE CODE: text: "Invalid secret reference",
type: "error"
});
return;
... | I think if these aren't set (because of the segment clicked) we should use wildcards (same above):
```
secretName: secretName ?? "*",
secretTags: ["*"]
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
<br /> If this is the desired format, you need to provide it as{" "}
<code className="rounded-md bg-mineshaft-500 px-1 py-0.5">
{encodeURIComponent(secretKey.trim())}
</code>{" "}
when making API requests.
... | Can we add this to the environment view create modal too? Also maybe just some subtle styling on the `<code>` blocks to make them a little more differentiated `rounded-sm bg-mineshaft-600` or something subtle
<img width="1284" height="990" alt="CleanShot 2025-11-06 at 15 47 26@2x" src="https://github.com/user-attac... | <br /> If this is the desired format, you need to provide it as{" "}
<code className="rounded-md bg-mineshaft-500 px-1 py-0.5">
{encodeURIComponent(secretKey.trim())}
</code>{" "}
when making API requests.
... | @@ -249,6 +249,19 @@ export const CreateSecretForm = ({ secretPath = "/", onClose }: Props) => {
name="value"
render={({ field }) => (
<FormControl
+ tooltipText={ | frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx | 26 | TypeScript | 0.643 | question | 376 | 51 | 51 | false | feature: secret reference shortcut | 4,804 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | victorvhs017 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx
PR Title: feature: secret reference shortcut
BEFORE CODE: <br /> If this is the desired format, you need to provide it as{" "}
... | Can we add this to the environment view create modal too? Also maybe just some subtle styling on the `<code>` blocks to make them a little more differentiated `rounded-sm bg-mineshaft-600` or something subtle
<img width="1284" height="990" alt="CleanShot 2025-11-06 at 15 47 26@2x" src="https://github.com/user-attac... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
</code>{" "}
when making API requests.
</div>
}
>
<FontAwesomeIcon
icon={faWarning}
className="absolute right-0 mr-3 text-yellow-600"
/>
</Tooltip>
... | I think we should do the same styling on this code block too, helps it stand out | </code>{" "}
when making API requests.
</div>
}
>
<FontAwesomeIcon
icon={faWarning}
className="absolute right-0 mr-3 text-yellow-600"
/>
</Tooltip>
... | @@ -249,6 +249,21 @@ export const CreateSecretForm = ({ secretPath = "/", onClose }: Props) => {
name="value"
render={({ field }) => (
<FormControl
+ tooltipText={
+ <div>
+ You can add references to other secrets using the format{" "}
+ ... | frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx | 26 | TypeScript | 0.286 | suggestion | 80 | 51 | 51 | false | feature: secret reference shortcut | 4,804 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | victorvhs017 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/secret-manager/OverviewPage/components/CreateSecretForm/CreateSecretForm.tsx
PR Title: feature: secret reference shortcut
BEFORE CODE: </code>{" "}
when making API requests.
</div... | I think we should do the same styling on this code block too, helps it stand out | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
return;
}
if (allSegments.length === 1) {
const canReadSecretValue = hasSecretReadValueOrDescribePermission(
permission,
ProjectPermissionSecretActions.ReadValue,
{
environment: propEnvironment ?? "*",
secretPath: propS... | I realized we probably don't want to spread - IE if I have tag filters on when I click a secret ref, the tag filters persist and can hide the referenced secret it doesn't have the tags, we probably just want explicitly set the secret path, secret search and filter by | return;
}
if (allSegments.length === 1) {
const canReadSecretValue = hasSecretReadValueOrDescribePermission(
permission,
ProjectPermissionSecretActions.ReadValue,
{
environment: propEnvironment ?? "*",
secretPath: propS... | @@ -307,6 +314,118 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
}
}, []);
+ const handleClickSegment = useCallback(
+ (segment: string, allSegments: string[]) => {
+ if (!projectId) {
+ createNotification({
+ text: "Project ID is not set... | frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx | 26 | TypeScript | 0.429 | security | 267 | 51 | 51 | false | feature: secret reference shortcut | 4,804 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | victorvhs017 | Review this pull request change.
Language: TypeScript
File: frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx
PR Title: feature: secret reference shortcut
BEFORE CODE: return;
}
if (allSegments.length === 1) {
const canReadSecretValue = hasSecretReadValueO... | I realized we probably don't want to spread - IE if I have tag filters on when I click a secret ref, the tag filters persist and can hide the referenced secret it doesn't have the tags, we probably just want explicitly set the secret path, secret search and filter by | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
ProjectPermissionCertificateActions,
ProjectPermissionSub,
useProject
} from "@app/context";
import { useUpdateRenewalConfig } from "@app/hooks/api";
import { caSupportsCapability } from "@app/hooks/api/ca/constants";
import { CaCapability, CaType } from "@app/hooks/api/ca/enums";
import { useListCasByProjectId }... | Nit: Can we rename to `issueCertificate` to be consistent with `deleteCertificate`, `revokeCertificate`, etc. | ProjectPermissionCertificateActions,
ProjectPermissionSub,
useProject
} from "@app/context";
import { useUpdateRenewalConfig } from "@app/hooks/api";
import { caSupportsCapability } from "@app/hooks/api/ca/constants";
import { CaCapability, CaType } from "@app/hooks/api/ca/enums";
import { useListCasByProjectId }... | @@ -64,7 +64,7 @@ type Props = {
handlePopUpOpen: (
popUpName: keyof UsePopUpState<
[
- "certificate",
+ "certificateIssuance", | frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.tsx | 26 | TypeScript | 0.571 | nitpick | 109 | 51 | 51 | false | Add new option on legacy templates to issue new certificates | 4,819 | Infisical/infisical | 22,351 | TypeScript | dangtony98 | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/cert-manager/CertificatesPage/components/CertificatesTable.tsx
PR Title: Add new option on legacy templates to issue new certificates
BEFORE CODE: ProjectPermissionCertificateActions,
ProjectPermissionSub,
useProject
} from "@app/c... | Nit: Can we rename to `issueCertificate` to be consistent with `deleteCertificate`, `revokeCertificate`, etc. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
}
>
<FontAwesomeIcon icon={faQuestionCircle} size="sm" />
</Tooltip>
}
/>
</div>
}
errorText={error?.message}
... | Not sure I'm understanding this part here. In what case would you have a `preselectedTemplate` that isn't present in `templatesData?.certificateTemplates` that you would still want rendered as an option in this dropdown?
Wouldn't the expectation be that users would pass in a valid `preselectedTemplate` in the first ... | <span>
When a template is selected, the details provided are validated
against the template policies.
</span>
}
>
... | @@ -269,15 +272,25 @@ export const CertificateModal = ({ popUp, handlePopUpToggle }: Props) => {
isRequired
>
<Select
- defaultValue={field.value}
- {...field}
+ value={field.value}
onVal... | frontend/src/pages/cert-manager/CertificatesPage/components/CertificateModal.tsx | 26 | TypeScript | 0.643 | question | 383 | 51 | 51 | false | Add new option on legacy templates to issue new certificates | 4,819 | Infisical/infisical | 22,351 | TypeScript | dangtony98 | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/cert-manager/CertificatesPage/components/CertificateModal.tsx
PR Title: Add new option on legacy templates to issue new certificates
BEFORE CODE: }
>
<Font... | Not sure I'm understanding this part here. In what case would you have a `preselectedTemplate` that isn't present in `templatesData?.certificateTemplates` that you would still want rendered as an option in this dropdown?
Wouldn't the expectation be that users would pass in a valid `preselectedTemplate` in the first ... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
instanceUrl: "The Hashicrop Vault instance URL to connect with.",
namespace: "The Hashicrop Vault namespace to connect with.",
accessToken: "The access token used to connect with Hashicorp Vault.",
roleId: "The Role ID used to connect with Hashicorp Vault.",
secretId: "The Secret ID used t... | Any thoughts on renaming this field to `certificateBody`? since it's not the certificate itself but the base64 certificate body 🤔 | instanceUrl: "The Hashicrop Vault instance URL to connect with.",
namespace: "The Hashicrop Vault namespace to connect with.",
accessToken: "The access token used to connect with Hashicorp Vault.",
roleId: "The Role ID used to connect with Hashicorp Vault.",
secretId: "The Secret ID used t... | @@ -2308,7 +2308,10 @@ export const AppConnections = {
code: "The OAuth code to use to connect with Azure Client Secrets.",
tenantId: "The Tenant ID to use to connect with Azure Client Secrets.",
clientId: "The Client ID to use to connect with Azure Client Secrets.",
- clientSecret: "The Clien... | backend/src/lib/api-docs/constants.ts | 26 | TypeScript | 0.5 | style | 129 | 51 | 51 | false | feat(app-connections/azure-client-secrets): certificate auth | 4,820 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | varonix0 | Review this pull request change.
Language: TypeScript
File: backend/src/lib/api-docs/constants.ts
PR Title: feat(app-connections/azure-client-secrets): certificate auth
BEFORE CODE: instanceUrl: "The Hashicrop Vault instance URL to connect with.",
namespace: "The Hashicrop Vault namespace to connect wit... | Any thoughts on renaming this field to `certificateBody`? since it's not the certificate itself but the base64 certificate body 🤔 | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
namespace: "The Hashicrop Vault namespace to connect with.",
accessToken: "The access token used to connect with Hashicorp Vault.",
roleId: "The Role ID used to connect with Hashicorp Vault.",
secretId: "The Secret ID used to connect with Hashicorp Vault."
},
LDAP: {
provider: "The... | Ignore comment placement
When editing the credentials it's not getting correctly the tenant ID
<img width="1398" height="1294" alt="CleanShot 2025-11-06 at 10 38 39@2x" src="https://github.com/user-attachments/assets/e2e2315c-575a-4c78-bcea-b71bc0f718b4" />
| namespace: "The Hashicrop Vault namespace to connect with.",
accessToken: "The access token used to connect with Hashicorp Vault.",
roleId: "The Role ID used to connect with Hashicorp Vault.",
secretId: "The Secret ID used to connect with Hashicorp Vault."
},
LDAP: {
provider: "The... | @@ -2308,7 +2308,10 @@ export const AppConnections = {
code: "The OAuth code to use to connect with Azure Client Secrets.",
tenantId: "The Tenant ID to use to connect with Azure Client Secrets.",
clientId: "The Client ID to use to connect with Azure Client Secrets.",
- clientSecret: "The Clien... | backend/src/lib/api-docs/constants.ts | 26 | TypeScript | 0.5 | security | 263 | 51 | 51 | false | feat(app-connections/azure-client-secrets): certificate auth | 4,820 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | varonix0 | Review this pull request change.
Language: TypeScript
File: backend/src/lib/api-docs/constants.ts
PR Title: feat(app-connections/azure-client-secrets): certificate auth
BEFORE CODE: namespace: "The Hashicrop Vault namespace to connect with.",
accessToken: "The access token used to connect with Hashicorp... | Ignore comment placement
When editing the credentials it's not getting correctly the tenant ID
<img width="1398" height="1294" alt="CleanShot 2025-11-06 at 10 38 39@2x" src="https://github.com/user-attachments/assets/e2e2315c-575a-4c78-bcea-b71bc0f718b4" />
| You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
res.on("end", () => {
if (userDn) {
resolve(userDn);
} else {
reject(new Error(`Unable to resolve DN for ${dn}.`));
}
});
});
});
};
export const ldapPasswordRotationFactory: TRotationFactory<
TLdapPasswordRotationWithConnection,
TLdapPasswordRotationG... | I think we should slowly drop support for the old gateway so that people are incentivized to use our new Gateway. Can we remove this altogether and just have gatewayV2Service? |
res.on("end", () => {
if (userDn) {
resolve(userDn);
} else {
reject(new Error(`Unable to resolve DN for ${dn}.`));
}
});
});
});
};
export const ldapPasswordRotationFactory: TRotationFactory<
TLdapPasswordRotationWithConnection,
TLdapPasswordRotationG... | @@ -71,17 +71,19 @@ export const ldapPasswordRotationFactory: TRotationFactory<
TLdapPasswordRotationWithConnection,
TLdapPasswordRotationGeneratedCredentials,
TLdapPasswordRotationInput["temporaryParameters"]
-> = (secretRotation, appConnectionDAL, kmsService) => {
+> = (secretRotation, appConnectionDAL, kmsS... | backend/src/ee/services/secret-rotation-v2/ldap-password/ldap-password-rotation-fns.ts | 26 | TypeScript | 0.429 | performance | 176 | 51 | 51 | false | feature: ldap gateway support | 4,825 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | victorvhs017 | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/secret-rotation-v2/ldap-password/ldap-password-rotation-fns.ts
PR Title: feature: ldap gateway support
BEFORE CODE:
res.on("end", () => {
if (userDn) {
resolve(userDn);
} else {
reject(new ... | I think we should slowly drop support for the old gateway so that people are incentivized to use our new Gateway. Can we remove this altogether and just have gatewayV2Service? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
ca: sslCertificate ? [sslCertificate] : undefined
}
: undefined
});
return setupLdapClientHandlers<ldap.Client>(client, dn, password, (ldapClient) => ldapClient);
};
export const executeWithPotentialGateway = async <T>(
config: TLdapConnectionConfig,
gatewayV2Service: Pick<TGatewayV2Se... | let's throw an error when this is missing | ca: sslCertificate ? [sslCertificate] : undefined
}
: undefined
});
return setupLdapClientHandlers<ldap.Client>(client, dn, password, (ldapClient) => ldapClient);
};
export const executeWithPotentialGateway = async <T>(
config: TLdapConnectionConfig,
gatewayV2Service: Pick<TGatewayV2Se... | @@ -16,87 +81,117 @@ export const getLdapConnectionListItem = () => {
};
};
-const LDAP_TIMEOUT = 15_000;
-
export const getLdapConnectionClient = async ({
url,
dn,
password,
sslCertificate,
sslRejectUnauthorized = true
}: TLdapConnectionConfig["credentials"]) => {
- await blockLocalAndPrivateIp... | backend/src/services/app-connection/ldap/ldap-connection-fns.ts | 26 | TypeScript | 0.214 | suggestion | 42 | 51 | 51 | false | feature: ldap gateway support | 4,825 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | victorvhs017 | Review this pull request change.
Language: TypeScript
File: backend/src/services/app-connection/ldap/ldap-connection-fns.ts
PR Title: feature: ldap gateway support
BEFORE CODE: ca: sslCertificate ? [sslCertificate] : undefined
}
: undefined
});
return setupLdapClientHandlers<ldap.Client... | let's throw an error when this is missing | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
certificateChain: z.string().nullable(),
privateKey: z.string().nullable(),
serialNumber: z.string().nullable()
})
}
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
handler: async (req) => {
const bundle = await server.services.cert... | Don't we need an audit log for this endpoint? | certificateChain: z.string().nullable(),
privateKey: z.string().nullable(),
serialNumber: z.string().nullable()
})
}
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
handler: async (req) => {
const response = await server.services.ce... | @@ -498,6 +498,51 @@ export const registerCertificateProfilesRouter = async (server: FastifyZodProvid
}
});
+ server.route({
+ method: "GET",
+ url: "/:id/certificates/latest-active-bundle",
+ config: {
+ rateLimit: readLimit
+ },
+ schema: {
+ hide: false,
+ tags: [ApiDocsTags.... | backend/src/server/routes/v1/certificate-profiles-router.ts | 26 | TypeScript | 0.071 | question | 45 | 51 | 51 | false | misc: endpoint for fetching latest active bundle of profile | 4,833 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | sheensantoscapadngan | Review this pull request change.
Language: TypeScript
File: backend/src/server/routes/v1/certificate-profiles-router.ts
PR Title: misc: endpoint for fetching latest active bundle of profile
BEFORE CODE: certificateChain: z.string().nullable(),
privateKey: z.string().nullable(),
serialN... | Don't we need an audit log for this endpoint? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
export const pkiAcmeServiceFactory = ({
projectDAL,
certificateProfileDAL,
certificateBodyDAL,
acmeAccountDAL,
acmeOrderDAL,
acmeAuthDAL,
acmeOrderAuthDAL,
acmeChallengeDAL,
keyStore,
kmsService,
licenseService,
certificateV3Service,
acmeChallengeService
}: TPkiAcmeServiceFactoryDep): TPkiAcme... | Maybe we can send a message like "Failed to validate ACME profile: Plan restriction. Upgrade plan to continue" instead? | export const pkiAcmeServiceFactory = ({
projectDAL,
certificateProfileDAL,
certificateBodyDAL,
acmeAccountDAL,
acmeOrderDAL,
acmeAuthDAL,
acmeOrderAuthDAL,
acmeChallengeDAL,
keyStore,
kmsService,
licenseService,
certificateV3Service,
acmeChallengeService
}: TPkiAcmeServiceFactoryDep): TPkiAcme... | @@ -127,6 +131,10 @@ export const pkiAcmeServiceFactory = ({
if (profile.enrollmentType !== EnrollmentType.ACME) {
throw new NotFoundError({ message: "Certificate profile is not configured for ACME enrollment" });
}
+ const orgLicensePlan = await licenseService.getPlan(profile.project!.orgId);
+ ... | backend/src/ee/services/pki-acme/pki-acme-service.ts | 26 | TypeScript | 0.429 | bug | 119 | 51 | 51 | false | [PKI-34] Add license check for PKI ACME feature | 4,848 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | fangpenlin | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/pki-acme/pki-acme-service.ts
PR Title: [PKI-34] Add license check for PKI ACME feature
BEFORE CODE: export const pkiAcmeServiceFactory = ({
projectDAL,
certificateProfileDAL,
certificateBodyDAL,
acmeAccountDAL,
acmeOrderDA... | Maybe we can send a message like "Failed to validate ACME profile: Plan restriction. Upgrade plan to continue" instead? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
config: {
rateLimit: writeLimit
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
schema: {
hide: false,
tags: [ApiDocsTags.TokenAuth],
description: "Create token for machine identity with Token Auth",
security: [
{
bearerAuth: []
... | wouldn't this change be breaking? | config: {
rateLimit: writeLimit
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
schema: {
hide: false,
tags: [ApiDocsTags.TokenAuth],
description: "Create token for machine identity with Token Auth",
security: [
{
bearerAuth: []
... | @@ -312,9 +312,7 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider
response: {
200: z.object({
accessToken: z.string(),
- expiresIn: z.coerce.number(),
- accessTokenMaxTTL: z.coerce.number(),
- tokenType: z.literal("Bearer")
+ ... | backend/src/server/routes/v1/identity-token-auth-router.ts | 26 | TypeScript | 0.143 | question | 34 | 51 | 51 | false | [ENG-4142] feat: adds GET endpoint for single auth token by ID | 4,858 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/server/routes/v1/identity-token-auth-router.ts
PR Title: [ENG-4142] feat: adds GET endpoint for single auth token by ID
BEFORE CODE: config: {
rateLimit: writeLimit
},
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACC... | wouldn't this change be breaking? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
identityId: req.params.identityId,
tokenId: req.params.tokenId,
actor: req.permission.type,
actorId: req.permission.id,
actorOrgId: req.permission.orgId,
actorAuthMethod: req.permission.authMethod,
isActorSuperAdmin: isSuperAdmin(req.auth)
});
await s... | let's also include the machine identity name here please! primarily because when users look at the audit logs, they wouldn't really know which identity the "identity ID" would be referring to | token: IdentityAccessTokensSchema
})
}
},
handler: async (req) => {
const { token, identityMembershipOrg } = await server.services.identityTokenAuth.getTokenAuthTokenById({
identityId: req.params.identityId,
tokenId: req.params.tokenId,
actor: req.permission... | @@ -406,6 +402,59 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider
}
});
+ server.route({
+ method: "GET",
+ url: "/token-auth/identities/:identityId/tokens/:tokenId",
+ config: {
+ rateLimit: readLimit
+ },
+ onRequest: verifyAuth([AuthMode.JWT, AuthMod... | backend/src/server/routes/v1/identity-token-auth-router.ts | 26 | TypeScript | 0.429 | suggestion | 192 | 51 | 51 | false | [ENG-4142] feat: adds GET endpoint for single auth token by ID | 4,858 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/server/routes/v1/identity-token-auth-router.ts
PR Title: [ENG-4142] feat: adds GET endpoint for single auth token by ID
BEFORE CODE: identityId: req.params.identityId,
tokenId: req.params.tokenId,
actor: req.permission.t... | let's also include the machine identity name here please! primarily because when users look at the audit logs, they wouldn't really know which identity the "identity ID" would be referring to | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
let viewsRemaining: number | null = null;
if (secret.expiresAfterViews) {
viewsRemaining = secret.expiresAfterViews - 1;
}
if (!timeRemaining && viewsRemaining === null) {
return null;
}
return (
<div className="mt-4 flex flex-col gap-2 rounded-md border border-mineshaft-600 bg-mineshaft-700... | nit: I think I prefer just "5 more views remaining" (ie drop "after this") - sounds a little more professional to me - thoughts? |
let viewsRemaining: number | null = null;
if (secret.expiresAfterViews) {
viewsRemaining = secret.expiresAfterViews - 1;
}
if (!timeRemaining && viewsRemaining === null) {
return null;
}
return (
<div className="mt-4 flex flex-col gap-2 rounded-md border border-mineshaft-600 bg-mineshaft-700... | @@ -0,0 +1,52 @@
+import { faClock, faEye } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { format } from "date-fns";
+
+import { TViewSharedSecretResponse } from "@app/hooks/api/secretSharing";
+
+type Props = {
+ secret: TViewSharedSecretResponse... | frontend/src/pages/public/ViewSharedSecretByIDPage/components/SecretShareInfo.tsx | 26 | TypeScript | 0.429 | question | 128 | 33 | 33 | false | [PLATFRM-87] feat: adds secret sharing validity info | 4,864 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/public/ViewSharedSecretByIDPage/components/SecretShareInfo.tsx
PR Title: [PLATFRM-87] feat: adds secret sharing validity info
BEFORE CODE:
let viewsRemaining: number | null = null;
if (secret.expiresAfterViews) {
viewsRemaining... | nit: I think I prefer just "5 more views remaining" (ie drop "after this") - sounds a little more professional to me - thoughts? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
metadata: Record<string, string>; // no metadata yet
}
interface OrgAdminAccessProjectEvent {
type: EventType.ORG_ADMIN_ACCESS_PROJECT;
metadata: {
userId: string;
username: string;
email: string;
projectId: string;
}; // no metadata yet
}
interface OrgAdminBypassSSOEvent {
type: EventType.O... | Let's remove `email`, `userAgent`, and `ipAddress` as it's handled by other audit log metadata. | type: EventType.LOAD_PROJECT_KMS_BACKUP;
metadata: Record<string, string>; // no metadata yet
}
interface OrgAdminAccessProjectEvent {
type: EventType.ORG_ADMIN_ACCESS_PROJECT;
metadata: {
userId: string;
username: string;
email: string;
projectId: string;
}; // no metadata yet
}
interface O... | @@ -2657,6 +2659,31 @@ interface OrgAdminBypassSSOEvent {
metadata: Record<string, string>; // no metadata yet
}
+interface UserLoginEvent {
+ type: EventType.USER_LOGIN;
+ metadata: {
+ email: string;
+ userAgent: string;
+ ipAddress: string;
+ authMethod: string;
+ organizationId?: string;
+ ... | backend/src/ee/services/audit-log/audit-log-types.ts | 26 | TypeScript | 0.571 | suggestion | 95 | 51 | 51 | false | Add user login and select organization audit logs | 4,865 | Infisical/infisical | 22,351 | TypeScript | x032205 | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/audit-log/audit-log-types.ts
PR Title: Add user login and select organization audit logs
BEFORE CODE: metadata: Record<string, string>; // no metadata yet
}
interface OrgAdminAccessProjectEvent {
type: EventType.ORG_ADMIN_ACCES... | Let's remove `email`, `userAgent`, and `ipAddress` as it's handled by other audit log metadata. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
email: string;
projectId: string;
}; // no metadata yet
}
interface OrgAdminBypassSSOEvent {
type: EventType.ORG_ADMIN_BYPASS_SSO;
metadata: Record<string, string>; // no metadata yet
}
interface UserLoginEvent {
type: EventType.USER_LOGIN;
metadata: {
email: string;
userAgent: string;
i... | Let's remove `email`, `userAgent`, and `ipAddress` as it's handled by other audit log metadata. | username: string;
email: string;
projectId: string;
}; // no metadata yet
}
interface OrgAdminBypassSSOEvent {
type: EventType.ORG_ADMIN_BYPASS_SSO;
metadata: Record<string, string>; // no metadata yet
}
interface UserLoginEvent {
type: EventType.USER_LOGIN;
metadata: {
organizationId?: stri... | @@ -2657,6 +2659,31 @@ interface OrgAdminBypassSSOEvent {
metadata: Record<string, string>; // no metadata yet
}
+interface UserLoginEvent {
+ type: EventType.USER_LOGIN;
+ metadata: {
+ email: string;
+ userAgent: string;
+ ipAddress: string;
+ authMethod: string;
+ organizationId?: string;
+ ... | backend/src/ee/services/audit-log/audit-log-types.ts | 26 | TypeScript | 0.571 | suggestion | 95 | 51 | 51 | false | Add user login and select organization audit logs | 4,865 | Infisical/infisical | 22,351 | TypeScript | x032205 | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/audit-log/audit-log-types.ts
PR Title: Add user login and select organization audit logs
BEFORE CODE: email: string;
projectId: string;
}; // no metadata yet
}
interface OrgAdminBypassSSOEvent {
type: EventType.ORG_ADMI... | Let's remove `email`, `userAgent`, and `ipAddress` as it's handled by other audit log metadata. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
};
export type TOrgPmtMethodsDTO = TOrgPermission;
export type TAddOrgPmtMethodDTO = TOrgPermission & { success_url: string; cancel_url: string };
export type TDelOrgPmtMethodDTO = TOrgPermission & { pmtMethodId: string };
export type TGetOrgTaxIdDTO = TOrgPermission;
export type TAddOrgTaxIdDTO = TOrgPermission &... | Let's use an enum for these values | };
export type TOrgPmtMethodsDTO = TOrgPermission;
export type TAddOrgPmtMethodDTO = TOrgPermission & { success_url: string; cancel_url: string };
export type TDelOrgPmtMethodDTO = TOrgPermission & { pmtMethodId: string };
export type TGetOrgTaxIdDTO = TOrgPermission;
export type TAddOrgTaxIdDTO = TOrgPermission &... | @@ -136,3 +136,13 @@ export type TDelOrgTaxIdDTO = TOrgPermission & { taxId: string };
export type TOrgInvoiceDTO = TOrgPermission;
export type TOrgLicensesDTO = TOrgPermission;
+
+export type TLicenseKeyConfig =
+ | {
+ isValid: false;
+ }
+ | {
+ isValid: true;
+ licenseKey: string;
+ typ... | backend/src/ee/services/license/license-types.ts | 26 | TypeScript | 0.143 | suggestion | 34 | 28 | 33 | false | [ENG-4019] chore: unify license key env variables | 4,868 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/license/license-types.ts
PR Title: [ENG-4019] chore: unify license key env variables
BEFORE CODE: };
export type TOrgPmtMethodsDTO = TOrgPermission;
export type TAddOrgPmtMethodDTO = TOrgPermission & { success_url: string; cancel_... | Let's use an enum for these values | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
export type TOfflineUsageReportServiceFactory = ReturnType<typeof offlineUsageReportServiceFactory>;
export const offlineUsageReportServiceFactory = ({
offlineUsageReportDAL,
licenseService
}: TOfflineUsageReportServiceFactoryDep) => {
const signReportContent = (content: string, licenseId: string): string => {
... | Maybe we can just say here `Offline usage reports are not enabled. Usage reports are only available for self-hosted offline instances` | };
export type TOfflineUsageReportServiceFactory = ReturnType<typeof offlineUsageReportServiceFactory>;
export const offlineUsageReportServiceFactory = ({
offlineUsageReportDAL,
licenseService
}: TOfflineUsageReportServiceFactoryDep) => {
const signReportContent = (content: string, licenseId: string): string =>... | @@ -30,10 +30,12 @@ export const offlineUsageReportServiceFactory = ({
};
const generateUsageReportCSV = async () => {
- const cfg = getConfig();
- if (!cfg.LICENSE_KEY_OFFLINE) {
+ const licenseKeyConfig = getLicenseKeyConfig();
+ const hasOfflineLicense = licenseKeyConfig.isValid && licenseKeyConf... | backend/src/services/offline-usage-report/offline-usage-report-service.ts | 26 | TypeScript | 0.5 | suggestion | 134 | 51 | 51 | false | [ENG-4019] chore: unify license key env variables | 4,868 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/services/offline-usage-report/offline-usage-report-service.ts
PR Title: [ENG-4019] chore: unify license key env variables
BEFORE CODE:
export type TOfflineUsageReportServiceFactory = ReturnType<typeof offlineUsageReportServiceFactory>;
export... | Maybe we can just say here `Offline usage reports are not enabled. Usage reports are only available for self-hosted offline instances` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { CronJob } from "cron";
import { Knex } from "knex";
import { monitorEventLoopDelay } from "perf_hooks";
import { z } from "zod";
import { registerCertificateEstRouter } from "@app/ee/routes/est/certificate-est-router";
import { registerV1EERoutes } from "@app/ee/routes/v1";
import { registerV2EERoutes } from ... | why were the imports here reordered?
<img width="1091" height="608" alt="image" src="https://github.com/user-attachments/assets/ce059964-09d4-498b-8ec0-c51c9fb6f52b" />
Running ESLINT also shows the warning
<img width="838" height="441" alt="image" src="https://github.com/user-attachments/assets/0a8cb49b-0ae9-41... | import { registerBddNockRouter } from "@bdd_routes/bdd-nock-router";
import { CronJob } from "cron";
import { Knex } from "knex";
import { monitorEventLoopDelay } from "perf_hooks";
import { z } from "zod";
import { registerCertificateEstRouter } from "@app/ee/routes/est/certificate-est-router";
import { registerV1EER... | @@ -17,30 +17,30 @@ import { accessApprovalRequestDALFactory } from "@app/ee/services/access-approva
import { accessApprovalRequestReviewerDALFactory } from "@app/ee/services/access-approval-request/access-approval-request-reviewer-dal"; | backend/src/server/routes/index.ts | 18 | TypeScript | 0.5 | question | 348 | 43 | 43 | false | Move nock to dev deps and include the route only for dev/test builds | 4,874 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | fangpenlin | Review this pull request change.
Language: TypeScript
File: backend/src/server/routes/index.ts
PR Title: Move nock to dev deps and include the route only for dev/test builds
BEFORE CODE: import { CronJob } from "cron";
import { Knex } from "knex";
import { monitorEventLoopDelay } from "perf_hooks";
import { z } fro... | why were the imports here reordered?
<img width="1091" height="608" alt="image" src="https://github.com/user-attachments/assets/ce059964-09d4-498b-8ec0-c51c9fb6f52b" />
Running ESLINT also shows the warning
<img width="838" height="441" alt="image" src="https://github.com/user-attachments/assets/0a8cb49b-0ae9-41... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
ca: sslCertificate,
serverName: host
}
: false
};
}
case AppConnection.OracleDB: {
return {
ssl: sslEnabled
? {
sslCA: sslCertificate,
sslServerDNMatch: sslRejectUnauthorized
}
: fa... | > Additionally, the regex only allows letters after the underscore, but Oracle TNS aliases can have more complex formats.
Greptile mentioned this, is this format intentional? | rejectUnauthorized: sslRejectUnauthorized,
ca: sslCertificate,
serverName: host
}
: false
};
}
case AppConnection.OracleDB: {
return {
ssl: sslEnabled
? {
sslCA: sslCertificate,
sslServerDN... | @@ -79,12 +81,51 @@ const getConnectionConfig = ({
}
};
+const ORACLE_WALLET_REGEX = /^[a-z0-9]+_[a-z]+$/i;
+
+const isOracleWalletConnection = (app: AppConnection, database: string): boolean => {
+ return app === AppConnection.OracleDB && ORACLE_WALLET_REGEX.test(database); | backend/src/services/app-connection/shared/sql/sql-connection-fns.ts | 26 | TypeScript | 0.357 | question | 175 | 51 | 51 | false | feature(oracle): allow usage of wallet for oracleDB on self hosted instances | 4,879 | Infisical/infisical | 22,351 | TypeScript | varonix0 | x032205 | Review this pull request change.
Language: TypeScript
File: backend/src/services/app-connection/shared/sql/sql-connection-fns.ts
PR Title: feature(oracle): allow usage of wallet for oracleDB on self hosted instances
BEFORE CODE: ca: sslCertificate,
serverName: host
}
... | > Additionally, the regex only allows letters after the underscore, but Oracle TNS aliases can have more complex formats.
Greptile mentioned this, is this format intentional? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
case AppConnection.OracleDB: {
return {
ssl: sslEnabled
? {
sslCA: sslCertificate,
sslServerDNMatch: sslRejectUnauthorized
}
: false
};
}
default:
throw new Error(`Unhandled SQL Connection Config: ${app as AppConnection}`... | q: why aren't we setting these env vars in the appConfig? (env.ts) | }
case AppConnection.OracleDB: {
return {
ssl: sslEnabled
? {
sslCA: sslCertificate,
sslServerDNMatch: sslRejectUnauthorized
}
: false
};
}
default:
throw new Error(`Unhandled SQL Connection Config: ${app as AppConnec... | @@ -79,12 +81,51 @@ const getConnectionConfig = ({
}
};
+const ORACLE_WALLET_REGEX = /^[a-z0-9]+_[a-z]+$/i;
+
+const isOracleWalletConnection = (app: AppConnection, database: string): boolean => {
+ return app === AppConnection.OracleDB && ORACLE_WALLET_REGEX.test(database);
+};
+
+const getOracleWalletKnexClien... | backend/src/services/app-connection/shared/sql/sql-connection-fns.ts | 26 | TypeScript | 0.214 | suggestion | 66 | 51 | 51 | false | feature(oracle): allow usage of wallet for oracleDB on self hosted instances | 4,879 | Infisical/infisical | 22,351 | TypeScript | varonix0 | x032205 | Review this pull request change.
Language: TypeScript
File: backend/src/services/app-connection/shared/sql/sql-connection-fns.ts
PR Title: feature(oracle): allow usage of wallet for oracleDB on self hosted instances
BEFORE CODE:
case AppConnection.OracleDB: {
return {
ssl: sslEnabled
? ... | q: why aren't we setting these env vars in the appConfig? (env.ts) | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
throw new Error(`Unhandled SQL Connection Config: ${app as AppConnection}`);
}
};
const ORACLE_WALLET_REGEX = /^[a-z0-9]+_[a-z]+$/i;
const isOracleWalletConnection = (app: AppConnection, database: string): boolean => {
return app === AppConnection.OracleDB && ORACLE_WALLET_REGEX.test(database);
};
const ge... | Do we know if the error message may ever contain sensitive information? If we're uncertain it would be better to log it out (`logger.error()`) and just reference the log with the request ID that's always returned | default:
throw new Error(`Unhandled SQL Connection Config: ${app as AppConnection}`);
}
};
// if TNS_ADMIN is set and the directory exists, we assume it's a wallet connection for OracleDB
const isOracleWalletConnection = (app: AppConnection): boolean => {
const { TNS_ADMIN } = getConfig();
return app ... | @@ -79,12 +81,51 @@ const getConnectionConfig = ({
}
};
+const ORACLE_WALLET_REGEX = /^[a-z0-9]+_[a-z]+$/i;
+
+const isOracleWalletConnection = (app: AppConnection, database: string): boolean => {
+ return app === AppConnection.OracleDB && ORACLE_WALLET_REGEX.test(database);
+};
+
+const getOracleWalletKnexClien... | backend/src/services/app-connection/shared/sql/sql-connection-fns.ts | 26 | TypeScript | 0.786 | security | 212 | 51 | 51 | false | feature(oracle): allow usage of wallet for oracleDB on self hosted instances | 4,879 | Infisical/infisical | 22,351 | TypeScript | varonix0 | x032205 | Review this pull request change.
Language: TypeScript
File: backend/src/services/app-connection/shared/sql/sql-connection-fns.ts
PR Title: feature(oracle): allow usage of wallet for oracleDB on self hosted instances
BEFORE CODE: throw new Error(`Unhandled SQL Connection Config: ${app as AppConnection}`);
}
... | Do we know if the error message may ever contain sensitive information? If we're uncertain it would be better to log it out (`logger.error()`) and just reference the log with the request ID that's always returned | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
[EventType.DELETE_SECRET_REMINDER]: "Delete Secret Reminder",
[EventType.DASHBOARD_LIST_SECRETS]: "Dashboard List Secrets",
[EventType.DASHBOARD_GET_SECRET_VALUE]: "Dashboard Get Secret Value",
[EventType.DASHBOARD_GET_SECRET_VERSION_VALUE]: "Dashboard Get Secret Version Value",
[EventType.CREATE_PROJECT_RO... | nit - shouldn't this be "Get PAM Session Credentials" ? | [EventType.DELETE_SECRET_REMINDER]: "Delete Secret Reminder",
[EventType.DASHBOARD_LIST_SECRETS]: "Dashboard List Secrets",
[EventType.DASHBOARD_GET_SECRET_VALUE]: "Dashboard Get Secret Value",
[EventType.DASHBOARD_GET_SECRET_VERSION_VALUE]: "Dashboard Get Secret Version Value",
[EventType.CREATE_PROJECT_RO... | @@ -262,6 +262,7 @@ export const eventToNameMap: { [K in EventType]: string } = {
[EventType.UPDATE_IDENTITY_PROJECT_MEMBERSHIP]: "Update Identity Project Membership",
[EventType.DELETE_IDENTITY_PROJECT_MEMBERSHIP]: "Delete Identity Project Membership",
+ [EventType.PAM_SESSION_CREDENTIALS_GET]: "PAM Session C... | frontend/src/hooks/api/auditLogs/constants.tsx | 26 | TypeScript | 0.286 | security | 55 | 51 | 51 | false | pam: allow account credentials to be fetched more than once | 4,905 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | x032205 | Review this pull request change.
Language: TypeScript
File: frontend/src/hooks/api/auditLogs/constants.tsx
PR Title: pam: allow account credentials to be fetched more than once
BEFORE CODE: [EventType.DELETE_SECRET_REMINDER]: "Delete Secret Reminder",
[EventType.DASHBOARD_LIST_SECRETS]: "Dashboard List Secrets... | nit - shouldn't this be "Get PAM Session Credentials" ? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
throw new BadRequestError({ message: "Missing project data key" });
}
const kmsDecryptor = await decryptWithKmsKey({
kmsId: kmsKeyId,
tx: trx
});
return kmsDecryptor({
cipherTextBlob: project.kmsSecretManagerEncryptedDataKey
});
};
const $getDataKey = async (dto: TEncr... | Can be removed, since we are using ENCRYPTION_KEY | throw new BadRequestError({ message: "Missing project data key" });
}
const kmsDecryptor = await decryptWithKmsKey({
kmsId: kmsKeyId,
tx: trx
});
return kmsDecryptor({
cipherTextBlob: project.kmsSecretManagerEncryptedDataKey
});
};
const $getDataKey = async (dto: TEncr... | @@ -828,9 +828,9 @@ export const kmsServiceFactory = ({
};
const $getBasicEncryptionKey = () => {
- const encryptionKey = envConfig.ENCRYPTION_KEY || envConfig.ROOT_ENCRYPTION_KEY;
+ const encryptionKey = envConfig.ROOT_ENCRYPTION_KEY || envConfig.ENCRYPTION_KEY; | backend/src/services/kms/kms-service.ts | 26 | TypeScript | 0.143 | suggestion | 49 | 51 | 51 | false | fix(encryption-key): add a new .env.dev.example file to be used by contributors | 4,919 | Infisical/infisical | 22,351 | TypeScript | varonix0 | victorvhs017 | Review this pull request change.
Language: TypeScript
File: backend/src/services/kms/kms-service.ts
PR Title: fix(encryption-key): add a new .env.dev.example file to be used by contributors
BEFORE CODE: throw new BadRequestError({ message: "Missing project data key" });
}
const kmsDecryptor = await d... | Can be removed, since we are using ENCRYPTION_KEY | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
hsmService,
kmsRootConfigDAL
});
// if the encryption strategy is software - user needs to provide an encryption key
// if the encryption strategy is null AND the hsm is not configured - user needs to provide an encryption key
const needsEncryptionKey =
hsmStatus.rootKms... | Same comment as above applies for all other changes except the .env.example file | const hsmStatus = await isHsmActiveAndEnabled({
hsmService,
kmsRootConfigDAL
});
// if the encryption strategy is software - user needs to provide an encryption key
// if the encryption strategy is null AND the hsm is not configured - user needs to provide an encryption key
... | @@ -135,18 +134,20 @@ const cryptographyFactory = () => {
// only perform encryption key validation if it's actually required.
if (needsEncryptionKey) {
- if (appCfg.ENCRYPTION_KEY) {
+ const encryptionKey = appCfg.ROOT_ENCRYPTION_KEY || appCfg.ENCRYPTION_KEY;
+
+ if (encryptionKey)... | backend/src/lib/crypto/cryptography/crypto.ts | 26 | TypeScript | 0.286 | suggestion | 80 | 51 | 51 | false | fix(encryption-key): add a new .env.dev.example file to be used by contributors | 4,919 | Infisical/infisical | 22,351 | TypeScript | varonix0 | victorvhs017 | Review this pull request change.
Language: TypeScript
File: backend/src/lib/crypto/cryptography/crypto.ts
PR Title: fix(encryption-key): add a new .env.dev.example file to be used by contributors
BEFORE CODE: hsmService,
kmsRootConfigDAL
});
// if the encryption strategy is software - u... | Same comment as above applies for all other changes except the .env.example file | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
);
await Promise.all(
deletedSecrets
.filter(({ reminderRepeatDays }) => Boolean(reminderRepeatDays))
.map(({ id, reminderRepeatDays }) =>
secretQueueService.removeSecretReminder(
{ secretId: id, repeatDays: reminderRepeatDays as number, projectId },
tx
)
)... | why don't we just add this to the first filter to avoid doing a third iteration? | );
await Promise.all(
deletedSecrets
.filter(({ reminderRepeatDays }) => Boolean(reminderRepeatDays))
.map(({ id, reminderRepeatDays }) =>
secretQueueService.removeSecretReminder(
{ secretId: id, repeatDays: reminderRepeatDays as number, projectId },
tx
)
)... | @@ -424,8 +424,10 @@ export const fnSecretBulkDelete = async ({
.filter(({ type }) => type === SecretType.Shared)
.map(({ id }) => ({
type: CommitType.DELETE,
- secretVersionId: secretVersions[id].id
- }));
+ secretVersionId: secretVersions[id]?.id
+ }))
+ .filter((el) => el.secretVe... | backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts | 26 | TypeScript | 0.286 | question | 80 | 51 | 51 | false | fix: default duplicate secret deletion | 4,939 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts
PR Title: fix: default duplicate secret deletion
BEFORE CODE: );
await Promise.all(
deletedSecrets
.filter(({ reminderRepeatDays }) => Boolean(reminderRepeatDays))
.map(({ i... | why don't we just add this to the first filter to avoid doing a third iteration? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { Knex } from "knex";
import { TDbClient } from "@app/db";
import { AccessScope, OrgMembershipRole, OrgMembershipStatus, TableName } from "@app/db/schemas";
import { DatabaseError } from "@app/lib/errors";
import { ormify } from "@app/lib/knex";
import { TExpiringScimToken } from "./scim-types";
export type T... | We should sent it may be one to two weeks ahead. | import { Knex } from "knex";
import { TDbClient } from "@app/db";
import { AccessScope, OrgMembershipRole, OrgMembershipStatus, TableName } from "@app/db/schemas";
import { DatabaseError } from "@app/lib/errors";
import { ormify } from "@app/lib/knex";
import { TExpiringScimToken } from "./scim-types";
export type T... | @@ -1,10 +1,65 @@
+import { Knex } from "knex";
+
import { TDbClient } from "@app/db";
-import { TableName } from "@app/db/schemas";
-import { ormify, TOrmify } from "@app/lib/knex";
+import { AccessScope, OrgMembershipRole, OrgMembershipStatus, TableName } from "@app/db/schemas";
+import { DatabaseError } from "@app/... | backend/src/ee/services/scim/scim-dal.ts | 24 | TypeScript | 0.143 | suggestion | 48 | 49 | 49 | false | feat: adds expiring scim token notification | 4,953 | Infisical/infisical | 22,351 | TypeScript | akhilmhdh | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/scim/scim-dal.ts
PR Title: feat: adds expiring scim token notification
BEFORE CODE: import { Knex } from "knex";
import { TDbClient } from "@app/db";
import { AccessScope, OrgMembershipRole, OrgMembershipStatus, TableName } from "@... | We should sent it may be one to two weeks ahead. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
tokenDescription?: string;
orgName: string;
url: string;
}
export const ScimTokenExpiryNoticeTemplate = ({
tokenDescription,
siteUrl,
orgName,
url
}: ScimTokenExpiryNoticeTemplateProps) => {
return (
<BaseEmailWrapper title="SCIM Token Expiring Soon" preview="A SCIM token is about to expire." siteU... | Update here as well when making the time change, also may be a bit more explanation like created on - | tokenDescription?: string;
orgName: string;
createdOn: Date;
expiringOn: Date;
url: string;
}
export const ScimTokenExpiryNoticeTemplate = ({
tokenDescription,
siteUrl,
orgName,
url,
createdOn,
expiringOn
}: ScimTokenExpiryNoticeTemplateProps) => {
const formatDate = (date: Date) =>
date.to... | @@ -0,0 +1,54 @@
+import { Heading, Section, Text } from "@react-email/components";
+import React from "react";
+
+import { BaseButton } from "./BaseButton";
+import { BaseEmailWrapper, BaseEmailWrapperProps } from "./BaseEmailWrapper";
+
+interface ScimTokenExpiryNoticeTemplateProps extends Omit<BaseEmailWrapperProps,... | backend/src/services/smtp/emails/ScimTokenExpiryNoticeTemplate.tsx | 26 | TypeScript | 0.429 | suggestion | 102 | 48 | 51 | false | feat: adds expiring scim token notification | 4,953 | Infisical/infisical | 22,351 | TypeScript | akhilmhdh | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/services/smtp/emails/ScimTokenExpiryNoticeTemplate.tsx
PR Title: feat: adds expiring scim token notification
BEFORE CODE: tokenDescription?: string;
orgName: string;
url: string;
}
export const ScimTokenExpiryNoticeTemplate = ({
tokenD... | Update here as well when making the time change, also may be a bit more explanation like created on - | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
export const scimDALFactory = (db: TDbClient) => {
const scimTokenOrm = ormify(db, TableName.ScimToken);
const findExpiringTokens = async (tx?: Knex, batchSize = 500, offset = 0): Promise<TExpiringScimToken[]> => {
try {
const conn = tx || db.replicaNode();
const batch = await conn(TableName.Scim... | Why are we doing this way - why not a simple join with select? |
export const scimDALFactory = (db: TDbClient) => {
const scimTokenOrm = ormify(db, TableName.ScimToken);
const findExpiringTokens = async (tx?: Knex, batchSize = 500, offset = 0): Promise<TExpiringScimToken[]> => {
try {
const batch = await (tx || db.replicaNode())(TableName.ScimToken)
.leftJoin... | @@ -1,10 +1,65 @@
+import { Knex } from "knex";
+
import { TDbClient } from "@app/db";
-import { TableName } from "@app/db/schemas";
-import { ormify, TOrmify } from "@app/lib/knex";
+import { AccessScope, OrgMembershipRole, OrgMembershipStatus, TableName } from "@app/db/schemas";
+import { DatabaseError } from "@app/... | backend/src/ee/services/scim/scim-dal.ts | 26 | TypeScript | 0.214 | question | 62 | 51 | 47 | false | feat: adds expiring scim token notification | 4,953 | Infisical/infisical | 22,351 | TypeScript | akhilmhdh | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/scim/scim-dal.ts
PR Title: feat: adds expiring scim token notification
BEFORE CODE:
export const scimDALFactory = (db: TDbClient) => {
const scimTokenOrm = ormify(db, TableName.ScimToken);
const findExpiringTokens = async (tx?... | Why are we doing this way - why not a simple join with select? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
pkiCollectionDAL: Pick<TPkiCollectionDALFactory, "findById">;
pkiCollectionItemDAL: Pick<TPkiCollectionItemDALFactory, "create">;
projectDAL: Pick<TProjectDALFactory, "findProjectBySlug" | "findOne" | "updateById" | "findById" | "transaction">;
kmsService: Pick<TKmsServiceFactory, "generateKmsKey" | "encryptWit... | first condition should be enough right | projectDAL: Pick<TProjectDALFactory, "findProjectBySlug" | "findOne" | "updateById" | "findById" | "transaction">;
kmsService: Pick<TKmsServiceFactory, "generateKmsKey" | "encryptWithKmsKey" | "decryptWithKmsKey">;
permissionService: Pick<TPermissionServiceFactory, "getProjectPermission">;
};
export type TIntern... | @@ -127,6 +125,22 @@ export const internalCertificateAuthorityServiceFactory = ({
kmsService,
permissionService
}: TInternalCertificateAuthorityServiceFactoryDep) => {
+ const $checkSignature = (caKeyAlg: string, requestedKeyType: string, signatureAlgorithm?: string) => {
+ const isRsaCa = caKeyAlg.startsWit... | backend/src/services/certificate-authority/internal/internal-certificate-authority-service.ts | 26 | TypeScript | 0.143 | suggestion | 39 | 51 | 51 | false | Fix CA signature check | 4,961 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/services/certificate-authority/internal/internal-certificate-authority-service.ts
PR Title: Fix CA signature check
BEFORE CODE: pkiCollectionDAL: Pick<TPkiCollectionDALFactory, "findById">;
pkiCollectionItemDAL: Pick<TPkiCollectionItemDALFa... | first condition should be enough right | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
setUserTablePreference
} from "@app/helpers/userTablePreferences";
import { withProjectPermission } from "@app/hoc";
import { usePagination, useResetPageHelper } from "@app/hooks";
import {
useDeleteProjectIdentity,
useDeleteProjectIdentityMembership,
useListProjectIdentityMemberships
} from "@app/hooks/api";
i... | Small nit: This could be an enum | setUserTablePreference
} from "@app/helpers/userTablePreferences";
import { withProjectPermission } from "@app/hoc";
import { usePagination, useResetPageHelper } from "@app/hooks";
import {
useDeleteProjectIdentity,
useDeleteProjectIdentityMembership,
useListProjectIdentityMemberships
} from "@app/hooks/api";
i... | @@ -83,19 +82,15 @@ import { ProjectLinkIdentityModal } from "./components/ProjectLinkIdentityModal"
const MAX_ROLES_TO_BE_SHOWN_IN_TABLE = 2;
-enum WizardSteps {
- SelectAction = "select-action",
- LinkIdentity = "link-identity",
- ProjectIdentity = "project-identity"
-}
-
export const IdentityTab = withProje... | frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx | 26 | TypeScript | 0.143 | suggestion | 32 | 51 | 51 | false | improvement(frontend): update project identity creation flow | 4,964 | Infisical/infisical | 22,351 | TypeScript | akhilmhdh | scott-ray-wilson | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
PR Title: improvement(frontend): update project identity creation flow
BEFORE CODE: setUserTablePreference
} from "@app/helpers/userTablePreferences";
import { withProjec... | Small nit: This could be an enum | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
bodyClassName="overflow-visible"
title="Add Machine Identity to Project"
subTitle="Create a new machine identity or assign an existing one"
>
<div className="mb-4 flex items-center justify-center gap-x-2">
<div className="flex w-3/4 gap-x-0.5 round... | Nit: could have used twmerge or clsx | onOpenChange={(open) => {
handlePopUpToggle("createIdentity", open);
}}
>
<ModalContent
bodyClassName="overflow-visible"
title="Add Machine Identity to Project"
subTitle="Create a new machine identity or assign an existing one"
... | @@ -510,93 +505,85 @@ export const IdentityTab = withProjectPermission(
isOpen={popUp.createIdentity.isOpen}
onOpenChange={(open) => {
handlePopUpToggle("createIdentity", open);
- if (!open) setWizardStep(WizardSteps.SelectAction);
}}
>
<Modal... | frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx | 26 | TypeScript | 0.143 | nitpick | 36 | 51 | 51 | false | improvement(frontend): update project identity creation flow | 4,964 | Infisical/infisical | 22,351 | TypeScript | akhilmhdh | scott-ray-wilson | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/project/AccessControlPage/components/IdentityTab/IdentityTab.tsx
PR Title: improvement(frontend): update project identity creation flow
BEFORE CODE: bodyClassName="overflow-visible"
title="Add Machine Identity to ... | Nit: could have used twmerge or clsx | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
actorOrgId: req.permission.orgId,
actorAuthMethod: req.permission.authMethod,
isActorSuperAdmin: isSuperAdmin(req.auth)
});
await server.services.auditLog.createAuditLog({
...req.auditLogInfo,
orgId: identityMembershipOrg.scopeOrgId,
event: {
type: ... | Where is this endpoint used? Is this safe to rename? | actor: req.permission.type,
actorId: req.permission.id,
actorOrgId: req.permission.orgId,
actorAuthMethod: req.permission.authMethod
});
await server.services.auditLog.createAuditLog({
...req.auditLogInfo,
orgId: identityMembershipOrg.scopeOrgId,
even... | @@ -410,7 +410,7 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider
server.route({
method: "GET",
- url: "/token-auth/identities/:identityId/tokens/:tokenId",
+ url: "/token-auth/tokens/:tokenId", | backend/src/server/routes/v1/identity-token-auth-router.ts | 26 | TypeScript | 0.286 | question | 52 | 51 | 51 | false | fix: get token auth token endpoint [ENG-4248] | 4,966 | Infisical/infisical | 22,351 | TypeScript | varonix0 | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/server/routes/v1/identity-token-auth-router.ts
PR Title: fix: get token auth token endpoint [ENG-4248]
BEFORE CODE: actorOrgId: req.permission.orgId,
actorAuthMethod: req.permission.authMethod,
isActorSuperAdmin: isSupe... | Where is this endpoint used? Is this safe to rename? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
await server.services.auditLog.createAuditLog({
...req.auditLogInfo,
orgId: identityMembershipOrg.scopeOrgId,
event: {
type: EventType.GET_TOKENS_IDENTITY_TOKEN_AUTH,
metadata: {
identityId: req.params.identityId
}
}
});
retur... | Set hide to `true` to remove it from the OpenAPI spec. I don't think we exposing this in the API docs right? |
await server.services.auditLog.createAuditLog({
...req.auditLogInfo,
orgId: identityMembershipOrg.scopeOrgId,
event: {
type: EventType.GET_TOKENS_IDENTITY_TOKEN_AUTH,
metadata: {
identityId: req.params.identityId
}
}
});
retur... | @@ -408,6 +408,60 @@ export const registerIdentityTokenAuthRouter = async (server: FastifyZodProvider
}
});
+ // deprecated - use the GET /token-auth/tokens/:tokenId instead, this endpoint will be removed in the future
+ server.route({
+ method: "GET",
+ url: "/token-auth/identities/:identityId/tokens... | backend/src/server/routes/v1/identity-token-auth-router.ts | 26 | TypeScript | 0.571 | question | 108 | 51 | 51 | false | fix: get token auth token endpoint [ENG-4248] | 4,966 | Infisical/infisical | 22,351 | TypeScript | varonix0 | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/server/routes/v1/identity-token-auth-router.ts
PR Title: fix: get token auth token endpoint [ENG-4248]
BEFORE CODE:
await server.services.auditLog.createAuditLog({
...req.auditLogInfo,
orgId: identityMembershipOrg.scopeO... | Set hide to `true` to remove it from the OpenAPI spec. I don't think we exposing this in the API docs right? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
const getTokenAuthTokenById = async ({
tokenId,
isActorSuperAdmin,
actorId,
actor,
actorAuthMethod,
actorOrgId
}: TGetTokenAuthTokenByIdDTO) => {
const foundToken = await identityAccessTokenDAL.findOne({
[`${TableName.IdentityAccessToken}.id` as "id"]: tokenId,
[`${TableName.... | Why are we doing this? We aren't updating the identity anywhere here | const getTokenAuthTokenById = async ({
tokenId,
actorId,
actor,
actorAuthMethod,
actorOrgId
}: TGetTokenAuthTokenByIdDTO) => {
const foundToken = await identityAccessTokenDAL.findOne({
[`${TableName.IdentityAccessToken}.id` as "id"]: tokenId,
[`${TableName.IdentityAccessToken}.au... | @@ -621,48 +621,64 @@ export const identityTokenAuthServiceFactory = ({
const getTokenAuthTokenById = async ({
tokenId,
- identityId,
isActorSuperAdmin,
actorId,
actor,
actorAuthMethod,
actorOrgId
}: TGetTokenAuthTokenByIdDTO) => {
- await validateIdentityUpdateForSuperAdminP... | backend/src/services/identity-token-auth/identity-token-auth-service.ts | 26 | TypeScript | 0.214 | question | 68 | 51 | 51 | false | fix: get token auth token endpoint [ENG-4248] | 4,966 | Infisical/infisical | 22,351 | TypeScript | varonix0 | gupta-piyush19 | Review this pull request change.
Language: TypeScript
File: backend/src/services/identity-token-auth/identity-token-auth-service.ts
PR Title: fix: get token auth token endpoint [ENG-4248]
BEFORE CODE: const getTokenAuthTokenById = async ({
tokenId,
isActorSuperAdmin,
actorId,
actor,
actorAuth... | Why are we doing this? We aren't updating the identity anywhere here | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
if (canReadPrivateKey) {
try {
const certPrivateKey = await certificateService.getCertPrivateKey({
id: certificateRequest.certificate.id,
actor,
actorId,
actorAuthMethod,
actorOrgId
});
privateKey = certPrivateKey.certPrivateKey;
... | why do we return projectId here?
| try {
const certPrivateKey = await certificateService.getCertPrivateKey({
id: certificateRequest.certificate.id,
actor,
actorId,
actorAuthMethod,
actorOrgId
});
privateKey = certPrivateKey.certPrivateKey;
} catch (error) {
pri... | @@ -240,13 +239,17 @@ export const certificateRequestServiceFactory = ({
}
return {
- status: certificateRequest.status as CertificateRequestStatus,
- certificate: certBody.certificate,
- privateKey,
- serialNumber: certificateRequest.certificate.serialNumber,
- errorMessage: certif... | backend/src/services/certificate-request/certificate-request-service.ts | 26 | TypeScript | 0.071 | question | 37 | 51 | 51 | false | fix: improvements on certificate request endpoint | 4,993 | Infisical/infisical | 22,351 | TypeScript | sheensantoscapadngan | carlosmonastyrski | Review this pull request change.
Language: TypeScript
File: backend/src/services/certificate-request/certificate-request-service.ts
PR Title: fix: improvements on certificate request endpoint
BEFORE CODE: if (canReadPrivateKey) {
try {
const certPrivateKey = await certificateService.getCertPrivate... | why do we return projectId here?
| You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
signatureAlgorithm: extractedSignatureAlgorithm,
validity: finalizingOrder.notAfter
? (() => {
const notBefore = finalizingOrder.notBefore ? new Date(finalizingOrder.notBefore) : new Date();
const notAfter = new Date(finalizingOrder.notAfter);
const diffMs = notAf... | maybe we want to also store the CSR? | signatureAlgorithm: extractedSignatureAlgorithm,
validity: finalizingOrder.notAfter
? (() => {
const notBefore = finalizingOrder.notBefore ? new Date(finalizingOrder.notBefore) : new Date();
const notAfter = new Date(finalizingOrder.notAfter);
const diffMs = notAf... | @@ -734,16 +777,141 @@ export const pkiAcmeServiceFactory = ({
if (!order) {
throw new NotFoundError({ message: "ACME order not found" });
}
+ // Sync order first in case if there is a certificate request that needs to be processed
+ await checkAndSyncAcmeOrderStatus({ orderId });
+ const upda... | backend/src/ee/services/pki-acme/pki-acme-service.ts | 26 | TypeScript | 0.071 | question | 36 | 51 | 51 | false | improvement(api): issue cert from acme in a background queue | 5,003 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | fangpenlin | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/pki-acme/pki-acme-service.ts
PR Title: improvement(api): issue cert from acme in a background queue
BEFORE CODE: signatureAlgorithm: extractedSignatureAlgorithm,
validity: finalizingOrder.notAfter
? (() => {
... | maybe we want to also store the CSR? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
<Controller
control={control}
name="name"
render={({ field, fieldState: { error } }) => (
<FormControl
label="Policy Name"
className="mb-0 flex-1"
isRequired
isError={Boolean(error)}
errorText={error?... | For now it's ok - but downside is customer using API does pass in an array | errorText={error?.message}
>
<Input {...field} placeholder="Enter policy name" />
</FormControl>
)}
/>
<Controller
control={control}
name="constraints.accessDuration.max"
render={({ field, fieldState: { error } ... | @@ -6,78 +7,72 @@ import { FormControl, Input } from "@app/components/v2";
import { TPolicyForm } from "../PolicySchema";
export const PolicyDetailsStep = () => {
- const { control } = useFormContext<TPolicyForm>();
+ const {
+ control,
+ formState: { errors }
+ } = useFormContext<TPolicyForm>();
+
+ useE... | frontend/src/pages/pam/ApprovalsPage/components/PolicyTab/components/PolicySteps/PolicyDetailsStep.tsx | 26 | TypeScript | 0.214 | suggestion | 74 | 51 | 48 | false | improvement(global-approvals): basic UI improvements | 5,009 | Infisical/infisical | 22,351 | TypeScript | akhilmhdh | x032205 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/pam/ApprovalsPage/components/PolicyTab/components/PolicySteps/PolicyDetailsStep.tsx
PR Title: improvement(global-approvals): basic UI improvements
BEFORE CODE: <Controller
control={control}
name="name"
... | For now it's ok - but downside is customer using API does pass in an array | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
authzId,
challengeId
}: {
profileId: string;
accountId: string;
authzId: string;
challengeId: string;
}): Promise<TAcmeResponse<TRespondToAcmeChallengeResponse>> => {
const profile = await validateAcmeProfile(profileId);
const result = await acmeChallengeDAL.findByAccountAuthAndChall... | Out of curiosity, I think that right now there is no way to get the details of an account by users so not really sure how useful is to have only the accountId shown here. Is there any other more representative name or field we can show here to have a clearer context of the source of this account? | const respondToAcmeChallenge = async ({
profileId,
accountId,
authzId,
challengeId
}: {
profileId: string;
accountId: string;
authzId: string;
challengeId: string;
}): Promise<TAcmeResponse<TRespondToAcmeChallengeResponse>> => {
const profile = await validateAcmeProfile(profile... | @@ -1008,13 +1101,31 @@ export const pkiAcmeServiceFactory = ({
authzId: string;
challengeId: string;
}): Promise<TAcmeResponse<TRespondToAcmeChallengeResponse>> => {
+ const profile = await validateAcmeProfile(profileId);
const result = await acmeChallengeDAL.findByAccountAuthAndChallengeId(accoun... | backend/src/ee/services/pki-acme/pki-acme-service.ts | 26 | TypeScript | 0.5 | question | 297 | 51 | 51 | false | improvement(api): add acme audit logs | 5,011 | Infisical/infisical | 22,351 | TypeScript | carlosmonastyrski | fangpenlin | Review this pull request change.
Language: TypeScript
File: backend/src/ee/services/pki-acme/pki-acme-service.ts
PR Title: improvement(api): add acme audit logs
BEFORE CODE: authzId,
challengeId
}: {
profileId: string;
accountId: string;
authzId: string;
challengeId: string;
}): Promise<... | Out of curiosity, I think that right now there is no way to get the details of an account by users so not really sure how useful is to have only the accountId shown here. Is there any other more representative name or field we can show here to have a clearer context of the source of this account? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
});
const [accountView, setAccountView] = useState<PamAccountView>(
initAccountView ?? PamAccountView.Flat
);
const [filter, setFilter] = useState<PamAccountFilter>({
resourceIds: []
});
const {
search,
debouncedSearch,
setSearch,
page,
perPage,
setPage,
setPerPage,
... | think the value should be 18 now that we're doing multiples of 3 | });
const [accountView, setAccountView] = useState<PamAccountView>(
initAccountView ?? PamAccountView.Flat
);
const [filter, setFilter] = useState<PamAccountFilter>({
resourceIds: []
});
const {
search,
debouncedSearch,
setSearch,
page,
perPage,
setPage,
setPerPage,
... | @@ -128,7 +129,7 @@ export const PamAccountsTable = ({ projectId }: Props) => {
setOrderDirection,
setOrderBy
} = usePagination<PamAccountOrderBy>(PamAccountOrderBy.Name, {
- initPerPage: getUserTablePreference("pamAccountsTable", PreferenceKey.PerPage, 20),
+ initPerPage: getUserTablePreference("pam... | frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx | 26 | TypeScript | 0.286 | suggestion | 64 | 51 | 51 | false | improvement(pam): cards for flat account view | 5,016 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | x032205 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
PR Title: improvement(pam): cards for flat account view
BEFORE CODE: });
const [accountView, setAccountView] = useState<PamAccountView>(
initAccountView ?? PamAccountView.Flat
... | think the value should be 18 now that we're doing multiples of 3 | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
fullAccountPath = `${path}/${account?.name}`;
}
accessAwsIam(account, fullAccountPath);
} else {
handlePopUpOpen("accessAccount", account);
}
}
return (
<div className="flex flex-col gap-4">
<div className="flex gap-2">
<ProjectPermissionCan I={ProjectPermission... | I would remove this and just use the same page size options for both views, otherwise user stored default page sizes will be reset when changing view, and reloads could result in a table size being used for the card view | fullAccountPath = `${path}/${account?.name}`;
}
accessAwsIam(account, fullAccountPath);
} else {
handlePopUpOpen("accessAccount", account);
}
}
return (
<div className="flex flex-col gap-4">
<div className="flex gap-2">
<ProjectPermissionCan I={ProjectPermission... | @@ -244,6 +260,12 @@ export const PamAccountsTable = ({ projectId }: Props) => {
setPage(1);
setFilter({ resourceIds: [] });
setAccountView(e);
+
+ // Reset perPage to appropriate default for the view
+ const newPerPage = e === P... | frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx | 26 | TypeScript | 0.5 | refactor | 220 | 51 | 51 | false | improvement(pam): cards for flat account view | 5,016 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | x032205 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
PR Title: improvement(pam): cards for flat account view
BEFORE CODE: fullAccountPath = `${path}/${account?.name}`;
}
accessAwsIam(account, fullAccountPath);
} e... | I would remove this and just use the same page size options for both views, otherwise user stored default page sizes will be reset when changing view, and reloads could result in a table size being used for the card view | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
)}
</div>
)}
</ProjectPermissionCan>
</div>
{accountView === PamAccountView.Nested && <FolderBreadCrumbs path={accountPath} />}
{accountView === PamAccountView.Flat ? (
<>
<div className="grid grid-cols-1 gap-4 md:grid-cols-3">
... | let's do bigger jumps, maybe 9, 18, 27, 36, 45? | {accountView === PamAccountView.Flat ? (
<>
<div className="grid grid-cols-1 gap-4 md:grid-cols-3">
{filteredAccounts.map((account) => (
<PamAccountCard
key={account.id}
account={account}
accountPath={account.folderId ? fo... | @@ -392,32 +414,55 @@ export const PamAccountsTable = ({ projectId }: Props) => {
)}
</ProjectPermissionCan>
</div>
- <TableContainer className="mt-4">
- <Table>
- <THead>
- <Tr>
- <Th>
- <div className="flex items-center">
- ... | frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx | 26 | TypeScript | 0.071 | question | 47 | 51 | 51 | false | improvement(pam): cards for flat account view | 5,016 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | x032205 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
PR Title: improvement(pam): cards for flat account view
BEFORE CODE: )}
</div>
)}
</ProjectPermissionCan>
</div>
{accountView ===... | let's do bigger jumps, maybe 9, 18, 27, 36, 45? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
{accountView === PamAccountView.Nested && <FolderBreadCrumbs path={accountPath} />}
{accountView === PamAccountView.Flat ? (
<>
<div className="grid grid-cols-1 gap-4 md:grid-cols-3">
{filteredAccounts.map((account) => (
<PamAccountCard
key={accoun... | no empty state display for cards
<img width="3456" height="1916" alt="CleanShot 2025-12-11 at 10 09 40@2x" src="https://github.com/user-attachments/assets/4d576c73-9d97-4298-8963-f2fbd7bc2828" />
| key={account.id}
account={account}
accountPath={account.folderId ? folderPaths[account.folderId] : undefined}
onAccess={(e: TPamAccount) => accessAccount(e)}
/>
))}
</div>
{!isLoading && isContentEmpty && (
... | @@ -392,32 +414,55 @@ export const PamAccountsTable = ({ projectId }: Props) => {
)}
</ProjectPermissionCan>
</div>
- <TableContainer className="mt-4">
- <Table>
- <THead>
- <Tr>
- <Th>
- <div className="flex items-center">
- ... | frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx | 26 | TypeScript | 0.429 | suggestion | 198 | 51 | 51 | false | improvement(pam): cards for flat account view | 5,016 | Infisical/infisical | 22,351 | TypeScript | scott-ray-wilson | x032205 | Review this pull request change.
Language: TypeScript
File: frontend/src/pages/pam/PamAccountsPage/components/PamAccountsTable.tsx
PR Title: improvement(pam): cards for flat account view
BEFORE CODE: {accountView === PamAccountView.Nested && <FolderBreadCrumbs path={accountPath} />}
{accountView === Pam... | no empty state display for cards
<img width="3456" height="1916" alt="CleanShot 2025-12-11 at 10 09 40@2x" src="https://github.com/user-attachments/assets/4d576c73-9d97-4298-8963-f2fbd7bc2828" />
| You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.