5

Tables (14)

ai_trend_report_cache

  • days — INTEGER — Primary key — NOT NULL
  • stats_hash — TEXT — NOT NULL
  • message — TEXT — NOT NULL
  • generated_at — TIMESTAMPTZ — NOT NULL

alert_configs

  • id — UUID — Primary key — NOT NULL
  • channel_type — alert_channel_type — NOT NULL
  • webhook_url — TEXT — NOT NULL
  • enabled — BOOLEAN — NOT NULL
  • min_severity — INTEGER — NOT NULL
  • receive_incidents — BOOLEAN — NOT NULL
  • receive_trend_report — BOOLEAN — NOT NULL
  • trend_report_time — TEXT
  • trend_report_last_sent_date — DATE
  • trend_report_schedule — JSONB — NOT NULL
  • trend_report_sent_slots — JSONB — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

allow_list

  • id — UUID — Primary key — NOT NULL
  • ip_or_cidr — INET — NOT NULL
  • target_id — UUID — Foreign key → targets.id
  • reason — TEXT
  • expires_at — TIMESTAMPTZ
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

audit_logs

  • id — UUID — Primary key — NOT NULL
  • user_id — UUID — Foreign key → users.id
  • action — audit_action — NOT NULL
  • target_table — TEXT
  • ip_address — TEXT
  • created_at — TIMESTAMPTZ — NOT NULL
  • record_id — UUID
  • user_agent — TEXT

banned_ips

  • id — UUID — Primary key — NOT NULL
  • ip_or_cidr — INET — NOT NULL
  • reason — TEXT
  • created_at — TIMESTAMPTZ — NOT NULL
  • unbanned_at — TIMESTAMPTZ
  • hit_count — INTEGER — NOT NULL

incident_events

  • id — UUID — Primary key — NOT NULL
  • incident_id — UUID — Foreign key → incidents.id — NOT NULL
  • event_id — TEXT — NOT NULL
  • event_module — TEXT — NOT NULL
  • added_at — TIMESTAMPTZ — NOT NULL

incidents

  • id — UUID — Primary key — NOT NULL
  • title — TEXT — NOT NULL
  • correlation_key_type — correlation_key_type — NOT NULL
  • correlation_key_value — TEXT — NOT NULL
  • severity — INTEGER — NOT NULL
  • status — incident_status — NOT NULL
  • matched_scenario_rule_id — UUID — Foreign key → scenario_rules.id
  • mitre_tactics — TEXT — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL
  • notified_at — TIMESTAMPTZ
  • verdict — incident_verdict
  • verdict_note — TEXT
  • verdict_at — TIMESTAMPTZ
  • verdict_by — UUID

log_policies

  • layer — TEXT — Primary key — NOT NULL
  • retention_days — INTEGER — NOT NULL
  • archive_enabled — BOOLEAN — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

poll_intervals

  • id — UUID — Primary key — NOT NULL
  • seconds — INTEGER — NOT NULL
  • description — TEXT — NOT NULL
  • min_seconds — INTEGER — NOT NULL
  • max_seconds — INTEGER — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

report_notification_connections

  • id — UUID — Primary key — NOT NULL
  • user_id — UUID — Foreign key → users.id — NOT NULL
  • platform — report_notification_platform — NOT NULL
  • access_token_encrypted — TEXT — NOT NULL
  • workspace_or_server_name — TEXT — NOT NULL
  • channel_id — TEXT — NOT NULL
  • enabled — BOOLEAN — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

report_notification_history

  • id — UUID — Primary key — NOT NULL
  • connection_id — UUID — Foreign key → report_notification_connections.id
  • platform — report_notification_platform — NOT NULL
  • channel_id — TEXT — NOT NULL
  • status — TEXT — NOT NULL
  • mocked — BOOLEAN — NOT NULL
  • error_message — TEXT
  • sent_at — TIMESTAMPTZ — NOT NULL

scenario_rules

  • id — UUID — Primary key — NOT NULL
  • name — TEXT — NOT NULL
  • required_modules — TEXT — NOT NULL
  • correlation_key_type — correlation_key_type — NOT NULL
  • time_window_seconds — INTEGER — NOT NULL
  • min_severity — INTEGER — NOT NULL
  • enabled — BOOLEAN — NOT NULL
  • created_by — UUID — Foreign key → users.id
  • mitre_technique_id — TEXT
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

targets

  • id — UUID — Primary key — NOT NULL
  • name — TEXT — NOT NULL
  • base_url — TEXT — NOT NULL
  • is_active — BOOLEAN — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL

users

  • id — UUID — Primary key — NOT NULL
  • username — TEXT — NOT NULL
  • password_hash — TEXT — NOT NULL
  • role — user_role — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL
  • updated_at — TIMESTAMPTZ — NOT NULL