mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
refactor(core): Remove unused security audit telemetry event (no-changelog) (#10105)
This commit is contained in:
parent
c0264f0cff
commit
dd54390b0a
|
@ -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) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import type { Event } from './event.types';
|
|||
|
||||
@Service()
|
||||
export class EventRelay extends EventEmitter {
|
||||
emit<K extends keyof Event>(eventName: K, arg?: Event[K]) {
|
||||
emit<K extends keyof Event>(eventName: K, arg: Event[K]) {
|
||||
super.emit(eventName, arg);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -257,10 +257,6 @@ export type Event = {
|
|||
success: boolean;
|
||||
};
|
||||
|
||||
'security-audit-generated-via-cli': {
|
||||
// no payload
|
||||
};
|
||||
|
||||
'variable-created': {
|
||||
variableType: string;
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue