Skip to content

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

misc: added proper handling of common non-kv paths

Sheen Capadngand97adb043e7f
diff --git a/frontend/src/pages/project/RoleDetailsBySlugPage/components/VaultPolicyAnalyzer.utils.ts b/frontend/src/pages/project/RoleDetailsBySlugPage/components/VaultPolicyAnalyzer.utils.ts
index 9a37e23110..fd46d860e6 100644
--- a/frontend/src/pages/project/RoleDetailsBySlugPage/components/VaultPolicyAnalyzer.utils.ts
+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/VaultPolicyAnalyzer.utils.ts
@@ -56,13 +56,35 @@ const canTranslateBlock = (
return { canTranslate: true };
}
+ // Check for common non-KV system paths
+ if (path.startsWith("auth/")) {
+ return {
+ canTranslate: false,
+ reason: "Authentication paths (auth/*) cannot be translated"
+ };
+ }
+
+ if (path.startsWith("sys/")) {
+ return {
+ canTranslate: false,
+ reason: "System paths (sys/*) cannot be translated"
+ };
+ }
+
+ if (path.startsWith("identity/")) {
+ return {
+ canTranslate: false,
+ reason: "Identity paths (identity/*) cannot be translated"
+ };
+ }
+
const sortedMounts = [...mounts].sort((a, b) => b.path.length - a.path.length);
const mount = sortedMounts.find((m) => path.startsWith(m.path));
if (!mount) {
return {
canTranslate: false,
- reason: "KV mount path not found in your Vault configuration"
+ reason: "Mount path not found (only KV secret engines are supported)"
};
}