Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Minor improvements
Carlos Monastyrski243ed6fc4d37
diff --git a/docs/documentation/platform/pki/discovery/linux-server.mdx b/docs/documentation/platform/pki/discovery/linux-server.mdxindex 970209bafb..d161c7be22 100644--- a/docs/documentation/platform/pki/discovery/linux-server.mdx+++ b/docs/documentation/platform/pki/discovery/linux-server.mdx@@ -47,16 +47,18 @@ Certificate files are often readable only by root. Give the SSH user read accessThe second command makes files created later in the folder readable too.</Tab><Tab title="sudo">- Allow the SSH user to run `find`, `readlink`, and `head` as root without a password. Add a file under `/etc/sudoers.d/`:+ Allow the SSH user to run `find`, `readlink`, `head`, and `timeout` as root without a password. Add a file under `/etc/sudoers.d/`:```bash- <ssh-user> ALL=(root) NOPASSWD: /usr/bin/find, /usr/bin/readlink, /usr/bin/head+ <ssh-user> ALL=(root) NOPASSWD: /usr/bin/find, /usr/bin/readlink, /usr/bin/head, /usr/bin/timeout```- The gateway tries every folder and file as the SSH user first, and uses `sudo` only for the ones it can't read.+ The gateway tries every folder and file as the SSH user first, and uses `sudo` only for the ones it can't read. It runs each command as root through `timeout`, so a command that runs too long is stopped on the server.++ If the rule doesn't allow `timeout`, the gateway doesn't use `sudo`, and the folders the SSH user can't read are listed as skipped.<Warning>- This rule lets the SSH user read any file on the server and run commands as root through `find`. Use it only for a dedicated scan account that nothing else can sign in with, and prefer a group or ACL.+ This rule lets the SSH user read any file on the server and run any command as root through `find` or `timeout`. Use it only for a dedicated scan account that nothing else can sign in with, and prefer a group or ACL.</Warning></Tab></Tabs>diff --git a/frontend/src/components/v3/generic/TagsInput/TagsInput.tsx b/frontend/src/components/v3/generic/TagsInput/TagsInput.tsxindex fc09460237..90a69f2ab3 100644--- a/frontend/src/components/v3/generic/TagsInput/TagsInput.tsx+++ b/frontend/src/components/v3/generic/TagsInput/TagsInput.tsx@@ -16,6 +16,7 @@ import {import "../../utils/ScrollEdgeFade.css";const NO_ITEMS: string[] = [];+const DEFAULT_SEPARATORS = [",", " "];type TagsInputProps = Omit<React.ComponentPropsWithoutRef<"input">,@@ -29,6 +30,7 @@ type TagsInputProps = Omit</** Returning a reason refuses the commit. `existing` never contains the value being checked. */validateTag?: (tag: string, existing: string[]) => string | null;onValidationError?: (reason: string | null) => void;+ separators?: readonly string[];inputValue?: string;onInputValueChange?: (draft: string) => void;className?: string;@@ -43,6 +45,7 @@ const TagsInput = React.forwardRef<HTMLInputElement, TagsInputProps>(isError,validateTag,onValidationError,+ separators = DEFAULT_SEPARATORS,inputValue,onInputValueChange,className,@@ -89,7 +92,7 @@ const TagsInput = React.forwardRef<HTMLInputElement, TagsInputProps>(return;}- if (event.key === "," || event.key === " ") {+ if (separators.includes(event.key)) {event.preventDefault();commit(draft);}@@ -97,13 +100,13 @@ const TagsInput = React.forwardRef<HTMLInputElement, TagsInputProps>(const handlePaste = (event: React.ClipboardEvent<HTMLInputElement>) => {const pasted = event.clipboardData.getData("text");- const splitOn = /[\n\r, ]/;- if (!splitOn.test(pasted)) return;+ const lines = pasted.split(/[\n\r]/);+ if (lines.length === 1 && !separators.some((separator) => pasted.includes(separator))) return;event.preventDefault();- const parts = pasted- .split(splitOn)+ const parts = separators+ .reduce((pieces, separator) => pieces.flatMap((piece) => piece.split(separator)), lines).map((part) => part.trim()).filter(Boolean);@@ -127,7 +130,7 @@ const TagsInput = React.forwardRef<HTMLInputElement, TagsInputProps>(return;}- setDraft(parts.slice(refusedFrom).join(","));+ setDraft(separators.length ? parts.slice(refusedFrom).join(separators[0]) : parts[refusedFrom]);};return (diff --git a/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/DiscoveryJobForm.tsx b/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/DiscoveryJobForm.tsxindex 27e1229a88..1086bf0b5e 100644--- a/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/DiscoveryJobForm.tsx+++ b/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/DiscoveryJobForm.tsx@@ -71,7 +71,7 @@ const STEP_META: Record<short: "Folders to search",subtitle: "Choose the folders to search and the ones to leave out.",rightDescription:- "Only files with certificate extensions are opened, such as .pem, .crt, .cer, .der, .p7b, .pfx, .p12, .jks and .keystore.\n\nThe SSH user needs read access to these folders. Give it access through a group or ACL, or allow it to run find, readlink and head with sudo without a password. Folders it still cannot read are listed in the scan."+ "Only files with certificate extensions are opened, such as .pem, .crt, .cer, .der, .p7b, .pfx, .p12, .jks and .keystore.\n\nThe SSH user needs read access to these folders. Give it access through a group or ACL, or allow it to run find, readlink, head and timeout with sudo without a password. Folders it still cannot read are listed in the scan."},[DiscoveryJobStep.Options]: {name: "Options",diff --git a/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/LinuxServerFoldersFields.tsx b/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/LinuxServerFoldersFields.tsxindex 6821f82995..ec425a1fec 100644--- a/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/LinuxServerFoldersFields.tsx+++ b/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/LinuxServerFoldersFields.tsx@@ -10,6 +10,8 @@ import {validateLinuxFolder} from "./discovery-job-form-schema";+const FOLDER_SEPARATORS: string[] = [];+const FolderListField = ({name,label,@@ -45,6 +47,7 @@ const FolderListField = ({return validateLinuxFolder(tag);}}onValidationError={setTagError}+ separators={FOLDER_SEPARATORS}placeholder={placeholder}isError={Boolean(message)}className="font-mono"diff --git a/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/LinuxServerHostsFields.tsx b/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/LinuxServerHostsFields.tsxindex ffb7349579..c59b63ca3d 100644--- a/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/LinuxServerHostsFields.tsx+++ b/frontend/src/pages/cert-manager/DiscoveryPage/components/DiscoveryJobSheet/LinuxServerHostsFields.tsx@@ -30,7 +30,7 @@ const CREATE_OPTION_ID = "_create";export const LinuxServerHostsFields = () => {const { permission } = useProjectPermission();const { currentProject } = useProject();- const { control, getValues, setValue } = useFormContext<TLinuxServerDiscoveryJobForm>();+ const { control, getValues, setValue, setError } = useFormContext<TLinuxServerDiscoveryJobForm>();const { popUp, handlePopUpToggle, handlePopUpOpen } = usePopUp(["addConnection"] as const);const { connections, isPending } = useListAvailableAppConnectionsForApps(@@ -124,6 +124,12 @@ export const LinuxServerHostsFields = () => {onComplete={(connection) => {const existing = getValues("connections") ?? [];if (existing.some((c) => c.id === connection.id)) return;+ if (!connection.gatewayId && !connection.gatewayPoolId) {+ setError("connections", {+ message: `SSH connection '${connection.name}' has no gateway. Add one to the connection to scan this server.`+ });+ return;+ }setValue("connections", [...existing, { id: connection.id, name: connection.name }], {shouldDirty: true,shouldValidate: true