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
misc: updated secret path component
Sheen Capadngan776822d7d5da
diff --git a/backend/src/services/webhook/webhook-fns.ts b/backend/src/services/webhook/webhook-fns.tsindex 391d1b3b76..fba5e3a49d 100644--- a/backend/src/services/webhook/webhook-fns.ts+++ b/backend/src/services/webhook/webhook-fns.ts@@ -101,7 +101,7 @@ export const getWebhookPayload = (switch (type) {case WebhookType.SLACK:return {- text: "A secret value has been updated",+ text: "A secret value has been added or modified.",attachments: [{color: "#E7F256",diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/WebhooksTab/AddWebhookForm.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/WebhooksTab/AddWebhookForm.tsxindex 89a65c7a0d..aac9a458a1 100644--- a/frontend/src/views/Settings/ProjectSettingsPage/components/WebhooksTab/AddWebhookForm.tsx+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/WebhooksTab/AddWebhookForm.tsx@@ -3,7 +3,6 @@ import { Controller, useForm } from "react-hook-form";import { zodResolver } from "@hookform/resolvers/zod";import z from "zod";-import GlobPatternExamples from "@app/components/basic/popups/GlobPatternExamples";import {Button,FormControl,@@ -14,6 +13,7 @@ import {Select,SelectItem} from "@app/components/v2";+import { SecretPathInput } from "@app/components/v2/SecretPathInput";enum WebhookType {GENERAL = "general",@@ -67,7 +67,8 @@ export const AddWebhookForm = ({}});- const webhookType = watch("type");+ const selectedWebhookType = watch("type");+ const selectedEnvironment = watch("environment");const generalFormFields = (<>@@ -165,20 +166,22 @@ export const AddWebhookForm = ({</FormControl>)}/>- <FormControl- label="Secret Path"- icon={<GlobPatternExamples />}- isRequired- isError={Boolean(errors?.secretPath)}- errorText={errors?.secretPath?.message}- helperText="Glob patterns are used to match multiple files or directories"- >- <Input- placeholder="glob pattern / or /**/* or /{dir1,dir2}"- {...register("secretPath")}- />- </FormControl>- {webhookType === WebhookType.SLACK ? slackFormFields : generalFormFields}+ <Controller+ control={control}+ defaultValue=""+ name="secretPath"+ render={({ field, fieldState: { error } }) => (+ <FormControl+ label="Secret Path"+ isRequired+ isError={Boolean(error)}+ errorText={error?.message}+ >+ <SecretPathInput {...field} environment={selectedEnvironment} placeholder="/" />+ </FormControl>+ )}+ />+ {selectedWebhookType === WebhookType.SLACK ? slackFormFields : generalFormFields}</div><div className="mt-8 flex items-center"><Button