Principle:AIPentest CyberStrikeAI Engagement Evidence Persistence
| Knowledge Sources | |
|---|---|
| Domains | Persistence, Audit, Evidence |
| Last Updated | 2026-10-19 04:10 GMT |
Overview
A persistence technique that records an engagement's conversation messages, vulnerability findings, and audit events as first-class database rows, so evidence and operator actions survive process restarts and are independently queryable.
Description
Security testing produces evidence that must outlive the session: the assistant/user/tool messages exchanged, the vulnerability records (title, severity, target, status), and the audit events (who did what, to what, when, with what result). Rather than keeping these only in the agent's working memory, each is persisted to SQLite as structured rows. A conversation has messages with roles, content, reasoning content, MCP execution IDs, and process details. A vulnerability is created via the record_vulnerability MCP tool and stored with its own row. Audit events are written by an audit.Service through hooks (e.g. conversation-create) and direct SaveAuditLog calls.
The audit filter supports querying by actor, level, category, action, result, resource, and time window, with pagination, so an operator can reconstruct what happened across an engagement without replaying the conversation.
Usage
Use this principle when engagement evidence and operator actions must be durable, queryable, and tamper-evident. It is the right choice whenever an audit log is required for compliance or post-engagement review.
Theoretical Basis
Persistence maps agent and operator activity to three row families:
Conversation{ id, title, projectID, roleName, agentMode }
Message{ id, conversationID, role, content, reasoningContent, mcpExecutionIDs, processDetails }
Vulnerability{ id, conversationID, title, severity, target, status }
AuditLog{ id, createdAt, level, category, action, result, actor, resourceType, resourceID, message, detail }
Query: ListAuditLogsFilter{ Actor, Level, Category, Action, Result, ResourceType, ResourceID, RelatedUserID, Since, Until, Limit, Offset } builds a parameterized WHERE clause.
Practical Guide
- Persist messages with their MCP execution IDs so tool calls can be correlated post-hoc.
- Write audit events through hooks (conversation create) and direct saves so implicit and explicit actions are both captured.
- Support a rich filter with pagination; audit logs grow and full-table scans are unacceptable.
- Cap audit detail size (
MaxDetailBytes) so a single event cannot bloat the table.