ai-powered-conversational-intelligence

Incident Response

First version of this document. SECURITY_FINAL_REPORT.md §25 explicitly recorded this as “NOT PRODUCED” — a named, prioritized gap carried across every prior security pass on this repository until now. Treat this as a first draft grounded in this app’s actual real detection signals and real containment levers (every event name and config flag below was verified to exist in the current codebase, not invented) — not a rehearsed, on-call-tested runbook. It has not been exercised against a simulated incident. See the final line of each scenario for what verifying it for real would require.

How detection actually works in this app

Every scenario below leans on the same mechanism: security.audit_log.log_security_event(event_type, severity, message, **context) — one structured event, one dedicated security.audit logger, correlation-ID-tagged. This app has no SIEM/alerting integration of its own (confirmed — no Prometheus/alerting client in requirements.txt); these events reach wherever the operator’s own log pipeline points stdout/stderr. Grep-confirmed inventory of every event type this app actually emits (not a hypothetical list):

auth_failed, oidc_token_rejected, authz_denied, user_registered,
account_locked, refresh_token_reuse_detected, logout_all_sessions,
password_changed, password_reset_requested, password_reset_completed,
input_rejected, conversation_history_injection_detected,
possible_rag_poisoning, sql_safety_violation, sensitive_column_blocked,
rate_limit_tripped, rag_role_restricted_content_blocked,
content_moderation_rejected, content_moderation_soft_flagged,
malware_detected, malware_scan_error_fail_closed, malware_scan_skipped,
db_write_privileges_detected, orchestrator_source_denied,
session_expensive_source_limit_tripped, generation_rejected,
generation_rate_limited, generation_provider_failed

1. Credential compromise (static token / OIDC client secret / API keys)

2. Account takeover (local accounts, identity/)

3. SQL abuse (attempted dangerous/unauthorized query)

4. Data leakage (unauthorized read of sensitive data)

5. Prompt injection (successful, not just attempted)

6. RAG poisoning (malicious ingested document/database content)

7. Malicious upload (non-malware content policy violation)

8. Malware (binary malware in an upload)

9. SSRF (attempted or successful)

10. Dependency compromise (a trusted package turns malicious)

11. API abuse (scraping, credential stuffing, cost exhaustion)

12. Container compromise

What “verifying this for real” would require

A tabletop exercise walking at least scenarios 1, 2, 8, and 9 (the ones with the most concrete, testable detection signals) with whoever will actually be on call for a real deployment — not performed as part of this engagement (no on-call rotation or real deployment exists in this sandboxed environment to exercise this against).