diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/WebhooksTable.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/WebhooksTable.tsx index d715486f32b..a569aa88469 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/WebhooksTable.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/WebhooksTable.tsx @@ -30,6 +30,15 @@ function getEventType(filters: WebhookFilters): string { return "Unknown"; } +function maskWebhookSecret(secret: string): string { + if (!secret || secret.length <= 3) { + return secret; + } + const lastThreeChars = secret.slice(-3); + const maskedPart = "*".repeat(10); + return maskedPart + lastThreeChars; +} + interface WebhooksTableProps { webhooks: WebhookResponse[]; projectClientId: string; @@ -127,6 +136,30 @@ export function ContractsWebhooksTable({ }, header: "Webhook URL", }, + { + accessorKey: "webhook_secret", + cell: ({ getValue }) => { + const secret = getValue() as string; + const maskedSecret = maskWebhookSecret(secret); + return ( +
+ + {maskedSecret} + + +
+ ); + }, + header: "Webhook Secret", + }, { accessorKey: "created_at", cell: ({ getValue }) => {