56 lines
1.1 KiB
TypeScript
56 lines
1.1 KiB
TypeScript
export interface Rule {
|
|
id: string;
|
|
name: string;
|
|
type: 'file' | 'network' | 'process';
|
|
action: 'allow' | 'block' | 'flag';
|
|
pattern: string;
|
|
description?: string;
|
|
}
|
|
|
|
export interface Config {
|
|
watchPaths: string[];
|
|
auditLogPath: string;
|
|
rules: Rule[];
|
|
maxLogSizeMB: number;
|
|
enableNetworkMonitoring: boolean;
|
|
enableProcessMonitoring: boolean;
|
|
blockedHosts: string[];
|
|
blockedFilePatterns: string[];
|
|
alertThreshold: number;
|
|
}
|
|
|
|
export interface AuditEvent {
|
|
timestamp: string;
|
|
type: 'file' | 'network' | 'process' | 'rule_violation';
|
|
severity: 'info' | 'warning' | 'critical';
|
|
action: string;
|
|
target: string;
|
|
details: string;
|
|
pid?: number;
|
|
ruleId?: string;
|
|
}
|
|
|
|
export interface NetworkConnection {
|
|
localAddress: string;
|
|
localPort: string;
|
|
remoteAddress: string;
|
|
remotePort: string;
|
|
state: string;
|
|
inode: string;
|
|
uid: number;
|
|
}
|
|
|
|
export interface FileEvent {
|
|
path: string;
|
|
eventType: 'create' | 'modify' | 'delete' | 'rename';
|
|
timestamp: string;
|
|
}
|
|
|
|
export interface SandboxResult {
|
|
command: string;
|
|
exitCode: number;
|
|
events: AuditEvent[];
|
|
violations: AuditEvent[];
|
|
duration: number;
|
|
}
|