Debug: Breaches

✅ Config loaded

✅ Database connected

✅ breach_reports table EXISTS

✅ breach_reports count: 3

breach_reports columns:

Array
(
    [0] => id
    [1] => organization_id
    [2] => user_id
    [3] => breach_reference
    [4] => title
    [5] => description
    [6] => breach_type
    [7] => severity
    [8] => data_categories_affected
    [9] => number_of_records
    [10] => number_of_data_subjects
    [11] => breach_date
    [12] => detection_date
    [13] => containment_date
    [14] => reported_to_odpc
    [15] => odpc_report_date
    [16] => odpc_reference
    [17] => data_subjects_notified
    [18] => notification_date
    [19] => affected_systems
    [20] => root_cause
    [21] => immediate_actions
    [22] => containment_measures
    [23] => recovery_actions
    [24] => preventive_measures
    [25] => lessons_learned
    [26] => status
    [27] => resolution_date
    [28] => resolved_by
    [29] => notes
    [30] => created_by
    [31] => created_at
    [32] => updated_at
    [33] => data_subject_categories
    [34] => awareness_date
    [35] => unauthorized_access
    [36] => real_risk_of_harm
    [37] => risk_of_harm_reasoning
    [38] => notifiability_decision
    [39] => notifiability_reasoning
    [40] => organization_role
    [41] => controller_notified
    [42] => controller_notification_date
    [43] => controller_reference
    [44] => late_notification_reason
    [45] => data_subject_notification_required
    [46] => subject_notification_reasoning
    [47] => protective_advice
    [48] => other_regulators
    [49] => owner_name
    [50] => next_review_date
    [51] => decision_notes
    [52] => archived_at
)

Sample Data (first 3):

Array
(
    [0] => Array
        (
            [id] => 1
            [organization_id] => 2
            [user_id] => 2
            [breach_reference] => BRCH-20260518-831B
            [title] => Unauthorized Access to Employee HR Records
            [description] => On 18 May 2026, the organization detected suspicious access activity involving the internal HR management portal. Preliminary investigations revealed that an unauthorized user account gained access to a limited number of employee records through compromised login credentials. The exposed information primarily included employee names, email addresses, phone numbers, and staff identification numbers. There is currently no evidence of financial data exposure or data exfiltration outside the organization’s environment. The incident was identified during routine security monitoring and immediately escalated to the ICT security team for investigation and containment.
            [breach_type] => unauthorized_access
            [severity] => medium
            [data_categories_affected] => Employee names Email addresses Phone numbers Staff ID numbers Department information
            [number_of_records] => 100
            [number_of_data_subjects] => 67
            [breach_date] => 2026-04-17 11:12:00
            [detection_date] => 2026-05-18 20:12:00
            [containment_date] => 2026-05-18 13:23:12
            [reported_to_odpc] => 0
            [odpc_report_date] => 
            [odpc_reference] => 
            [data_subjects_notified] => 0
            [notification_date] => 
            [affected_systems] => HR Management System Internal Authentication Server
            [root_cause] => The breach was caused by compromised employee credentials resulting from a phishing email campaign that targeted staff members. The affected account did not have multi-factor authentication enabled, allowing unauthorized access to the HR portal.
            [immediate_actions] => Disabled the compromised user account immediately
Reset passwords for affected accounts
Logged out all active sessions linked to the compromised credentials
Initiated internal incident response procedures
Escalated the incident to the ICT security and compliance teams
            [containment_measures] => 
            [recovery_actions] => 
            [preventive_measures] => 
            [lessons_learned] => 
            [status] => resolved
            [resolution_date] => 2026-05-18 13:23:55
            [resolved_by] => 2
            [notes] => The organization continues to monitor systems for any indicators of compromise and will provide supplementary reports if additional findings emerge during the forensic investigation.
            [created_by] => 2
            [created_at] => 2026-05-18 13:19:12
            [updated_at] => 2026-05-18 13:23:55
            [data_subject_categories] => 
            [awareness_date] => 
            [unauthorized_access] => 0
            [real_risk_of_harm] => unknown
            [risk_of_harm_reasoning] => 
            [notifiability_decision] => pending_assessment
            [notifiability_reasoning] => 
            [organization_role] => controller
            [controller_notified] => 0
            [controller_notification_date] => 
            [controller_reference] => 
            [late_notification_reason] => 
            [data_subject_notification_required] => pending
            [subject_notification_reasoning] => 
            [protective_advice] => 
            [other_regulators] => 
            [owner_name] => 
            [next_review_date] => 
            [decision_notes] => 
            [archived_at] => 
        )

    [1] => Array
        (
            [id] => 2
            [organization_id] => 9
            [user_id] => 8
            [breach_reference] => BRCH-20260702-A5D0
            [title] => Unauthorized Access to Customer Database
            [description] => An unauthorized user gained access to the customer database through a compromised employee account. The attacker viewed customer contact information before the account was disabled.
            [breach_type] => unauthorized_access
            [severity] => medium
            [data_categories_affected] => Customer names, email addresses, phone numbers
            [number_of_records] => 250
            [number_of_data_subjects] => 250
            [breach_date] => 2026-07-02 03:24:00
            [detection_date] => 2026-07-02 03:24:00
            [containment_date] => 
            [reported_to_odpc] => 0
            [odpc_report_date] => 
            [odpc_reference] => 
            [data_subjects_notified] => 0
            [notification_date] => 
            [affected_systems] => Customer Relationship Management (CRM) System
            [root_cause] => Weak password and no Multi-Factor Authentication (MFA) on the employee account.
            [immediate_actions] => Disabled the compromised account, reset passwords, informed the IT security team, and began investigating the incident.
            [containment_measures] => 
            [recovery_actions] => 
            [preventive_measures] => 
            [lessons_learned] => 
            [status] => open
            [resolution_date] => 
            [resolved_by] => 
            [notes] => No financial information or sensitive personal data was accessed. The incident was contained within one hour of detection.
            [created_by] => 8
            [created_at] => 2026-07-02 00:29:24
            [updated_at] => 2026-07-02 00:29:24
            [data_subject_categories] => 
            [awareness_date] => 
            [unauthorized_access] => 0
            [real_risk_of_harm] => unknown
            [risk_of_harm_reasoning] => 
            [notifiability_decision] => pending_assessment
            [notifiability_reasoning] => 
            [organization_role] => controller
            [controller_notified] => 0
            [controller_notification_date] => 
            [controller_reference] => 
            [late_notification_reason] => 
            [data_subject_notification_required] => pending
            [subject_notification_reasoning] => 
            [protective_advice] => 
            [other_regulators] => 
            [owner_name] => 
            [next_review_date] => 
            [decision_notes] => 
            [archived_at] => 
        )

    [2] => Array
        (
            [id] => 3
            [organization_id] => 2
            [user_id] => 2
            [breach_reference] => BR-20260821-BD39
            [title] => Phishing
            [description] => Phishing Link
            [breach_type] => phishing
            [severity] => high
            [data_categories_affected] => Employee names Email addresses Phone numbers Staff ID numbers Department information
            [number_of_records] => 10
            [number_of_data_subjects] => 10
            [breach_date] => 2026-08-21 23:19:00
            [detection_date] => 2026-08-21 23:19:00
            [containment_date] => 
            [reported_to_odpc] => 0
            [odpc_report_date] => 
            [odpc_reference] => 
            [data_subjects_notified] => 0
            [notification_date] => 
            [affected_systems] => HR Management System Internal Authentication Server
            [root_cause] => 
            [immediate_actions] => 
            [containment_measures] => 
            [recovery_actions] => 
            [preventive_measures] => 
            [lessons_learned] => 
            [status] => open
            [resolution_date] => 
            [resolved_by] => 
            [notes] => 
            [created_by] => 2
            [created_at] => 2026-08-21 20:21:27
            [updated_at] => 2026-08-21 20:21:27
            [data_subject_categories] => 
            [awareness_date] => 2026-08-21 23:19:00
            [unauthorized_access] => 1
            [real_risk_of_harm] => unknown
            [risk_of_harm_reasoning] => 
            [notifiability_decision] => pending_assessment
            [notifiability_reasoning] => 
            [organization_role] => controller
            [controller_notified] => 0
            [controller_notification_date] => 
            [controller_reference] => 
            [late_notification_reason] => 
            [data_subject_notification_required] => pending
            [subject_notification_reasoning] => 
            [protective_advice] => 
            [other_regulators] => 
            [owner_name] => 
            [next_review_date] => 
            [decision_notes] => 
            [archived_at] => 
        )

)

Testing JOIN query:

SQL: SELECT br.*, o.name as org_name FROM breach_reports br LEFT JOIN organizations o ON br.organization_id = o.id LIMIT 3

Array
(
    [0] => Array
        (
            [id] => 1
            [organization_id] => 2
            [user_id] => 2
            [breach_reference] => BRCH-20260518-831B
            [title] => Unauthorized Access to Employee HR Records
            [description] => On 18 May 2026, the organization detected suspicious access activity involving the internal HR management portal. Preliminary investigations revealed that an unauthorized user account gained access to a limited number of employee records through compromised login credentials. The exposed information primarily included employee names, email addresses, phone numbers, and staff identification numbers. There is currently no evidence of financial data exposure or data exfiltration outside the organization’s environment. The incident was identified during routine security monitoring and immediately escalated to the ICT security team for investigation and containment.
            [breach_type] => unauthorized_access
            [severity] => medium
            [data_categories_affected] => Employee names Email addresses Phone numbers Staff ID numbers Department information
            [number_of_records] => 100
            [number_of_data_subjects] => 67
            [breach_date] => 2026-04-17 11:12:00
            [detection_date] => 2026-05-18 20:12:00
            [containment_date] => 2026-05-18 13:23:12
            [reported_to_odpc] => 0
            [odpc_report_date] => 
            [odpc_reference] => 
            [data_subjects_notified] => 0
            [notification_date] => 
            [affected_systems] => HR Management System Internal Authentication Server
            [root_cause] => The breach was caused by compromised employee credentials resulting from a phishing email campaign that targeted staff members. The affected account did not have multi-factor authentication enabled, allowing unauthorized access to the HR portal.
            [immediate_actions] => Disabled the compromised user account immediately
Reset passwords for affected accounts
Logged out all active sessions linked to the compromised credentials
Initiated internal incident response procedures
Escalated the incident to the ICT security and compliance teams
            [containment_measures] => 
            [recovery_actions] => 
            [preventive_measures] => 
            [lessons_learned] => 
            [status] => resolved
            [resolution_date] => 2026-05-18 13:23:55
            [resolved_by] => 2
            [notes] => The organization continues to monitor systems for any indicators of compromise and will provide supplementary reports if additional findings emerge during the forensic investigation.
            [created_by] => 2
            [created_at] => 2026-05-18 13:19:12
            [updated_at] => 2026-05-18 13:23:55
            [data_subject_categories] => 
            [awareness_date] => 
            [unauthorized_access] => 0
            [real_risk_of_harm] => unknown
            [risk_of_harm_reasoning] => 
            [notifiability_decision] => pending_assessment
            [notifiability_reasoning] => 
            [organization_role] => controller
            [controller_notified] => 0
            [controller_notification_date] => 
            [controller_reference] => 
            [late_notification_reason] => 
            [data_subject_notification_required] => pending
            [subject_notification_reasoning] => 
            [protective_advice] => 
            [other_regulators] => 
            [owner_name] => 
            [next_review_date] => 
            [decision_notes] => 
            [archived_at] => 
            [org_name] => Wasafi Enteprise
        )

    [1] => Array
        (
            [id] => 2
            [organization_id] => 9
            [user_id] => 8
            [breach_reference] => BRCH-20260702-A5D0
            [title] => Unauthorized Access to Customer Database
            [description] => An unauthorized user gained access to the customer database through a compromised employee account. The attacker viewed customer contact information before the account was disabled.
            [breach_type] => unauthorized_access
            [severity] => medium
            [data_categories_affected] => Customer names, email addresses, phone numbers
            [number_of_records] => 250
            [number_of_data_subjects] => 250
            [breach_date] => 2026-07-02 03:24:00
            [detection_date] => 2026-07-02 03:24:00
            [containment_date] => 
            [reported_to_odpc] => 0
            [odpc_report_date] => 
            [odpc_reference] => 
            [data_subjects_notified] => 0
            [notification_date] => 
            [affected_systems] => Customer Relationship Management (CRM) System
            [root_cause] => Weak password and no Multi-Factor Authentication (MFA) on the employee account.
            [immediate_actions] => Disabled the compromised account, reset passwords, informed the IT security team, and began investigating the incident.
            [containment_measures] => 
            [recovery_actions] => 
            [preventive_measures] => 
            [lessons_learned] => 
            [status] => open
            [resolution_date] => 
            [resolved_by] => 
            [notes] => No financial information or sensitive personal data was accessed. The incident was contained within one hour of detection.
            [created_by] => 8
            [created_at] => 2026-07-02 00:29:24
            [updated_at] => 2026-07-02 00:29:24
            [data_subject_categories] => 
            [awareness_date] => 
            [unauthorized_access] => 0
            [real_risk_of_harm] => unknown
            [risk_of_harm_reasoning] => 
            [notifiability_decision] => pending_assessment
            [notifiability_reasoning] => 
            [organization_role] => controller
            [controller_notified] => 0
            [controller_notification_date] => 
            [controller_reference] => 
            [late_notification_reason] => 
            [data_subject_notification_required] => pending
            [subject_notification_reasoning] => 
            [protective_advice] => 
            [other_regulators] => 
            [owner_name] => 
            [next_review_date] => 
            [decision_notes] => 
            [archived_at] => 
            [org_name] => Jerry.INC
        )

    [2] => Array
        (
            [id] => 3
            [organization_id] => 2
            [user_id] => 2
            [breach_reference] => BR-20260821-BD39
            [title] => Phishing
            [description] => Phishing Link
            [breach_type] => phishing
            [severity] => high
            [data_categories_affected] => Employee names Email addresses Phone numbers Staff ID numbers Department information
            [number_of_records] => 10
            [number_of_data_subjects] => 10
            [breach_date] => 2026-08-21 23:19:00
            [detection_date] => 2026-08-21 23:19:00
            [containment_date] => 
            [reported_to_odpc] => 0
            [odpc_report_date] => 
            [odpc_reference] => 
            [data_subjects_notified] => 0
            [notification_date] => 
            [affected_systems] => HR Management System Internal Authentication Server
            [root_cause] => 
            [immediate_actions] => 
            [containment_measures] => 
            [recovery_actions] => 
            [preventive_measures] => 
            [lessons_learned] => 
            [status] => open
            [resolution_date] => 
            [resolved_by] => 
            [notes] => 
            [created_by] => 2
            [created_at] => 2026-08-21 20:21:27
            [updated_at] => 2026-08-21 20:21:27
            [data_subject_categories] => 
            [awareness_date] => 2026-08-21 23:19:00
            [unauthorized_access] => 1
            [real_risk_of_harm] => unknown
            [risk_of_harm_reasoning] => 
            [notifiability_decision] => pending_assessment
            [notifiability_reasoning] => 
            [organization_role] => controller
            [controller_notified] => 0
            [controller_notification_date] => 
            [controller_reference] => 
            [late_notification_reason] => 
            [data_subject_notification_required] => pending
            [subject_notification_reasoning] => 
            [protective_advice] => 
            [other_regulators] => 
            [owner_name] => 
            [next_review_date] => 
            [decision_notes] => 
            [archived_at] => 
            [org_name] => Wasafi Enteprise
        )

)

✅ JOIN query works!

Testing full query:

❌ ERROR:

Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'o.contact_email' in 'field list'

File: /home/ctkkrkzz/secure.soulguard.co.ke/admin/test.php

Line: 54

Trace:

#0 /home/ctkkrkzz/secure.soulguard.co.ke/admin/test.php(54): PDO->query('SELECT br.*, CO...')
#1 {main}