21 lines
576 B
JavaScript
21 lines
576 B
JavaScript
/**
|
|
* Threat Domain Entity
|
|
*
|
|
* Represents a detected security threat from AI manipulation attempts.
|
|
*/
|
|
/**
|
|
* Factory function to create a Threat entity
|
|
*/
|
|
export function createThreat(params) {
|
|
return {
|
|
id: `threat-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
type: params.type,
|
|
severity: params.severity,
|
|
confidence: params.confidence,
|
|
pattern: params.pattern,
|
|
description: params.description,
|
|
location: params.location,
|
|
detectedAt: new Date(),
|
|
};
|
|
}
|
|
//# sourceMappingURL=threat.js.map
|