Files
Autonomous-Bug-Explorer/dist/modules/findings/application/event-handlers/OnAnomalyDetected.js
debian d62bd615bf
Some checks failed
ABE Exploratory Testing / explore (push) Has been cancelled
fase(5): findings module complete
2026-03-05 04:06:45 -05:00

23 lines
666 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OnAnomalyDetected = void 0;
/**
* Listens for anomaly_detected events from crawling module
* and creates a Finding in the findings module.
*/
class OnAnomalyDetected {
constructor(createFinding) {
this.createFinding = createFinding;
}
async handle(event) {
const payload = event.payload;
if (!payload.anomaly || !payload.sessionId)
return;
await this.createFinding.execute({
anomaly: payload.anomaly,
sessionId: payload.sessionId,
});
}
}
exports.OnAnomalyDetected = OnAnomalyDetected;