Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Refactor secret path handling in InfisicalSecretInput to use folderPath directly, enhancing clarity in permission validation logic.

Victor Santos7b91e7192cac
diff --git a/frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx b/frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx
index d1f2e1a624..8da31d67db 100644
--- a/frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx
+++ b/frontend/src/components/v2/InfisicalSecretInput/InfisicalSecretInput.tsx
@@ -387,8 +387,6 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
}
}
- const secretPath = segment === environmentSlug ? "/" : folderPath;
-
// Only validate secret permission, users can always view environments and folders
if (segment === secretName) {
const canReadSecretValue = hasSecretReadValueOrDescribePermission(
@@ -396,8 +394,8 @@ export const InfisicalSecretInput = forwardRef<HTMLTextAreaElement, Props>(
ProjectPermissionSecretActions.ReadValue,
{
environment: environmentSlug,
- secretPath,
- secretName: secretName ?? "*",
+ secretPath: folderPath,
+ secretName,
secretTags: ["*"]
}
);