feat: AI Agent Security Firewall MVP - CLI monitoring, sandboxing, audit logging, 11 tests passing
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user