diff --git a/packages/cli/src/commands/audit.ts b/packages/cli/src/commands/audit.ts index 94621aaabe..4f6b356028 100644 --- a/packages/cli/src/commands/audit.ts +++ b/packages/cli/src/commands/audit.ts @@ -7,7 +7,6 @@ import { RISK_CATEGORIES } from '@/security-audit/constants'; import config from '@/config'; import type { Risk } from '@/security-audit/types'; import { BaseCommand } from './BaseCommand'; -import { EventRelay } from '@/eventbus/event-relay.service'; export class SecurityAudit extends BaseCommand { static description = 'Generate a security audit report for this n8n instance'; @@ -61,8 +60,6 @@ export class SecurityAudit extends BaseCommand { } else { process.stdout.write(JSON.stringify(result, null, 2)); } - - Container.get(EventRelay).emit('security-audit-generated-via-cli'); } async catch(error: Error) { diff --git a/packages/cli/src/eventbus/event-relay.service.ts b/packages/cli/src/eventbus/event-relay.service.ts index edc5d8aeae..8f6bb4c5c1 100644 --- a/packages/cli/src/eventbus/event-relay.service.ts +++ b/packages/cli/src/eventbus/event-relay.service.ts @@ -4,7 +4,7 @@ import type { Event } from './event.types'; @Service() export class EventRelay extends EventEmitter { - emit(eventName: K, arg?: Event[K]) { + emit(eventName: K, arg: Event[K]) { super.emit(eventName, arg); return true; } diff --git a/packages/cli/src/eventbus/event.types.ts b/packages/cli/src/eventbus/event.types.ts index b00b1382d8..b333a6b877 100644 --- a/packages/cli/src/eventbus/event.types.ts +++ b/packages/cli/src/eventbus/event.types.ts @@ -257,10 +257,6 @@ export type Event = { success: boolean; }; - 'security-audit-generated-via-cli': { - // no payload - }; - 'variable-created': { variableType: string; }; diff --git a/packages/cli/src/telemetry/telemetry-event-relay.service.ts b/packages/cli/src/telemetry/telemetry-event-relay.service.ts index b4a6b45a0c..bc9389d052 100644 --- a/packages/cli/src/telemetry/telemetry-event-relay.service.ts +++ b/packages/cli/src/telemetry/telemetry-event-relay.service.ts @@ -44,9 +44,6 @@ export class TelemetryEventRelay { this.eventRelay.on('license-renewal-attempted', (event) => { this.licenseRenewalAttempted(event); }); - this.eventRelay.on('security-audit-generated-via-cli', () => { - this.securityAuditGeneratedViaCli(); - }); this.eventRelay.on('variable-created', (event) => { this.variableCreated(event); }); @@ -172,10 +169,6 @@ export class TelemetryEventRelay { }); } - private securityAuditGeneratedViaCli() { - void this.telemetry.track('Instance generated security audit via CLI command'); - } - private variableCreated({ variableType }: Event['variable-created']) { void this.telemetry.track('User created variable', { variable_type: variableType,