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
remove filter
Thiago Araujo da Silva9635dabb31be
diff --git a/backend/src/db/migrations/20260714120000_add-alerts.ts b/backend/src/db/migrations/20260714120000_add-alerts.tsindex 03df171602..3fc10c43ae 100644--- a/backend/src/db/migrations/20260714120000_add-alerts.ts+++ b/backend/src/db/migrations/20260714120000_add-alerts.ts@@ -14,7 +14,6 @@ export async function up(knex: Knex): Promise<void> {t.string("eventType").notNullable();t.string("triggerType").notNullable();t.jsonb("condition").nullable();- t.jsonb("filters").nullable();t.boolean("enabled").notNullable().defaultTo(true);t.uuid("orgId").notNullable();t.string("projectId").nullable();diff --git a/backend/src/db/schemas/alerts.ts b/backend/src/db/schemas/alerts.tsindex 52da1fb081..757160d79c 100644--- a/backend/src/db/schemas/alerts.ts+++ b/backend/src/db/schemas/alerts.ts@@ -16,7 +16,6 @@ export const AlertsSchema = z.object({eventType: z.string(),triggerType: z.string(),condition: z.unknown().nullable().optional(),- filters: z.unknown().nullable().optional(),enabled: z.boolean().default(true),orgId: z.string().uuid(),projectId: z.string().nullable().optional(),diff --git a/backend/src/server/routes/v1/alert-router.ts b/backend/src/server/routes/v1/alert-router.tsindex 6afe710b71..0eea80ddac 100644--- a/backend/src/server/routes/v1/alert-router.ts+++ b/backend/src/server/routes/v1/alert-router.ts@@ -36,7 +36,6 @@ const AlertResponseSchema = z.object({resourceId: z.string().nullable(),eventType: z.string(),condition: z.unknown().nullable(),- filters: z.unknown().nullable(),enabled: z.boolean(),orgId: z.string(),projectId: z.string().nullable(),@@ -69,7 +68,6 @@ export const registerAlertRouter = async (server: FastifyZodProvider) => {resourceId: z.string().nullable().optional(),eventType: z.string().min(1),condition: z.unknown().optional(),- filters: z.unknown().optional(),enabled: z.boolean().optional(),projectId: z.string().nullable().optional(),channels: z.array(CreateChannelInputSchema).min(1)@@ -152,7 +150,6 @@ export const registerAlertRouter = async (server: FastifyZodProvider) => {name: z.string().min(1).max(255).optional(),description: z.string().max(1000).nullable().optional(),condition: z.unknown().optional(),- filters: z.unknown().optional(),enabled: z.boolean().optional(),channels: z.array(UpdateChannelInputSchema).min(1).optional()}),diff --git a/backend/src/services/alert/alert-engine.test.ts b/backend/src/services/alert/alert-engine.test.tsindex 0390598090..5684863fc4 100644--- a/backend/src/services/alert/alert-engine.test.ts+++ b/backend/src/services/alert/alert-engine.test.ts@@ -31,7 +31,6 @@ const makeAlert = () => ({eventType: "test.resource.expiration",triggerType: "scheduled",condition: { alertBefore: "30d" },- filters: null,enabled: true,orgId: "org-1",projectId: null,diff --git a/backend/src/services/alert/alert-engine.ts b/backend/src/services/alert/alert-engine.tsindex 4c623691de..a8e4e384e6 100644--- a/backend/src/services/alert/alert-engine.ts+++ b/backend/src/services/alert/alert-engine.ts@@ -86,8 +86,7 @@ export const alertEngineFactory = ({projectId: alert.projectId,resourceId: alert.resourceId,eventType: alert.eventType,- condition: alert.condition,- filters: alert.filters+ condition: alert.condition});if (targets.length === 0) return;@@ -123,8 +122,7 @@ export const alertEngineFactory = ({resourceType: alert.resourceType,resourceId: alert.resourceId,eventType: alert.eventType,- condition: alert.condition,- filters: alert.filters+ condition: alert.condition};const viewUrl = await provider.buildViewUrl(alertContext);diff --git a/backend/src/services/alert/alert-service-types.ts b/backend/src/services/alert/alert-service-types.tsindex 582c27045f..b9534c2e12 100644--- a/backend/src/services/alert/alert-service-types.ts+++ b/backend/src/services/alert/alert-service-types.ts@@ -9,7 +9,6 @@ export type TCreateAlertDTO = TGenericPermission & {resourceId?: string | null;eventType: string;condition?: unknown;- filters?: unknown;enabled?: boolean;projectId?: string | null;channels: TAlertChannelInput[];@@ -20,7 +19,6 @@ export type TUpdateAlertDTO = TGenericPermission & {name?: string;description?: string | null;condition?: unknown;- filters?: unknown;enabled?: boolean;channels?: TAlertChannelInput[];};@@ -44,7 +42,6 @@ export type TAlertResponse = {resourceId: string | null;eventType: string;condition: unknown;- filters: unknown;enabled: boolean;orgId: string;projectId: string | null;diff --git a/backend/src/services/alert/alert-service.test.ts b/backend/src/services/alert/alert-service.test.tsindex 0a4232e103..80cac850e2 100644--- a/backend/src/services/alert/alert-service.test.ts+++ b/backend/src/services/alert/alert-service.test.ts@@ -71,7 +71,6 @@ const buildService = (opts?: {id: "alert-1",...data,condition: data.condition ? (JSON.parse(data.condition as string) as unknown) : null,- filters: data.filters ? (JSON.parse(data.filters as string) as unknown) : null,createdAt: new Date(),updatedAt: new Date()};@@ -281,7 +280,6 @@ describe("alert service", () => {resourceId: null,eventType: "test.resource.expiration",condition: null,- filters: null,enabled: true,orgId: "org-1",createdAt: new Date(),diff --git a/backend/src/services/alert/alert-service.ts b/backend/src/services/alert/alert-service.tsindex 2f75cd4d4c..b20048f397 100644--- a/backend/src/services/alert/alert-service.ts+++ b/backend/src/services/alert/alert-service.ts@@ -103,7 +103,6 @@ export const alertServiceFactory = ({resourceId: alert.resourceId ?? null,eventType: alert.eventType,condition: alert.condition ?? null,- filters: alert.filters ?? null,enabled: alert.enabled,orgId: alert.orgId,projectId: alert.projectId ?? null,@@ -161,7 +160,6 @@ export const alertServiceFactory = ({eventType: dto.eventType,triggerType: AlertTriggerType.Scheduled,condition: dto.condition != null ? JSON.stringify(dto.condition) : null,- filters: dto.filters != null ? JSON.stringify(dto.filters) : null,enabled: dto.enabled ?? true,orgId: dto.actorOrgId,projectId: dto.projectId,@@ -343,7 +341,6 @@ export const alertServiceFactory = ({...(dto.condition !== undefined? { condition: dto.condition != null ? JSON.stringify(dto.condition) : null }: {}),- ...(dto.filters !== undefined ? { filters: dto.filters != null ? JSON.stringify(dto.filters) : null } : {}),...(dto.enabled !== undefined ? { enabled: dto.enabled } : {})};diff --git a/backend/src/services/alert/alert-types.ts b/backend/src/services/alert/alert-types.tsindex 45cc9d65dd..7a8f481ac2 100644--- a/backend/src/services/alert/alert-types.ts+++ b/backend/src/services/alert/alert-types.ts@@ -45,7 +45,6 @@ export type TAlertContext = {resourceId?: string | null;eventType: string;condition: unknown;- filters: unknown;};export type TFindDueTargetsInput = {@@ -54,7 +53,6 @@ export type TFindDueTargetsInput = {resourceId?: string | null;eventType: string;condition: unknown;- filters: unknown;};export interface IResourceAlertProvider<TTarget = unknown> {diff --git a/backend/src/services/alert/providers/identity-credential-alert-provider.test.ts b/backend/src/services/alert/providers/identity-credential-alert-provider.test.tsindex 60d32de0ef..cb708091d7 100644--- a/backend/src/services/alert/providers/identity-credential-alert-provider.test.ts+++ b/backend/src/services/alert/providers/identity-credential-alert-provider.test.ts@@ -34,7 +34,6 @@ const alertContext = (overrides: Partial<TAlertContext> = {}): TAlertContext =>resourceId: null,eventType: IDENTITY_CREDENTIAL_EXPIRY_EVENT,condition: { alertBefore: "30d" },- filters: null,...overrides});@@ -100,8 +99,7 @@ describe("identity credential alert provider", () => {orgId: "org-1",resourceId: "ident-1",eventType: IDENTITY_CREDENTIAL_EXPIRY_EVENT,- condition: { alertBefore: "30d" },- filters: null+ condition: { alertBefore: "30d" }});expect(seenArgs?.alertBeforeInterval).toBe("30 days");@@ -123,8 +121,7 @@ describe("identity credential alert provider", () => {projectId: "proj-1",resourceId: null,eventType: IDENTITY_CREDENTIAL_EXPIRY_EVENT,- condition: { alertBefore: "30d" },- filters: null+ condition: { alertBefore: "30d" }});expect(seenArgs?.projectId).toBe("proj-1");diff --git a/frontend/src/hooks/api/alerts/types.ts b/frontend/src/hooks/api/alerts/types.tsindex d5cbcf8b39..0de9a7c72e 100644--- a/frontend/src/hooks/api/alerts/types.ts+++ b/frontend/src/hooks/api/alerts/types.ts@@ -72,7 +72,6 @@ export type TAlert = {resourceId: string | null;eventType: string;condition: { alertBefore?: string; dailyReminder?: boolean } | null;- filters: unknown | null;enabled: boolean;orgId: string;projectId: string | null;@@ -104,7 +103,6 @@ export type TCreateAlertDTO = {resourceId?: string | null;eventType: string;condition?: unknown;- filters?: unknown;enabled?: boolean;projectId?: string | null;channels: TAlertChannelInput[];@@ -116,7 +114,6 @@ export type TUpdateAlertDTO = {name?: string;description?: string | null;condition?: unknown;- filters?: unknown;enabled?: boolean;channels?: TAlertChannelInput[];};diff --git a/frontend/src/views/AlertsPage/components/AlertForm.tsx b/frontend/src/views/AlertsPage/components/AlertForm.tsxindex 3b959407fa..8842fb634e 100644--- a/frontend/src/views/AlertsPage/components/AlertForm.tsx+++ b/frontend/src/views/AlertsPage/components/AlertForm.tsx@@ -232,7 +232,6 @@ export const AlertForm = ({resourceId: resourceId ?? null,eventType: data.eventType,condition,- filters: null,enabled: data.enabled,projectId: projectId ?? null,channels