🚨 SECURITY ALERT REPORT

Frequent Unauthorized Access Attempts

Generated on: {{ $generated_at }}

Generated by: {{ $generated_by }}

Period: {{ $period }}

⚠️ CRITICAL SECURITY NOTICE

The following users have attempted to access restricted pages 3 or more times within {{ $period }}. This may indicate potential security breaches or role configuration issues.

Summary Statistics

{{ number_format($total_users) }}
Users with Frequent Attempts
{{ $period }}
Monitoring Period
3+
Minimum Attempts Threshold
@if($frequent_attempts->count() > 0)

🔍 Detailed Frequent Attempts Report

@foreach($frequent_attempts as $index => $attempt) @if(($index + 1) % 15 == 0 && $index + 1 < $frequent_attempts->count())
User Name Phone Number Role Region Branch District Attempts Last Attempt Routes Attempted
{{ $attempt['user_name'] }} {{ $attempt['user_phone'] }} {{ $attempt['user_role'] }} {{ $attempt['region'] }} {{ $attempt['branch'] }} {{ $attempt['district'] }} {{ $attempt['attempt_count'] }} {{ $attempt['last_attempt'] }} {{ \Str::limit($attempt['routes_attempted'], 50) }}
@endif @endforeach
User Name Phone Number Role Region Branch District Attempts Last Attempt Routes Attempted

📊 Risk Analysis

Security Insights:

@if($roleBreakdown->count() > 0)

Role Breakdown:

@foreach($roleBreakdown as $role => $userCount) @php $totalAttemptsForRole = $frequent_attempts->where('user_role', $role)->sum('attempt_count'); $riskLevel = $totalAttemptsForRole >= 15 ? 'HIGH' : ($totalAttemptsForRole >= 8 ? 'MEDIUM' : 'LOW'); $riskColor = $totalAttemptsForRole >= 15 ? '#DC3545' : ($totalAttemptsForRole >= 8 ? '#FFC107' : '#28A745'); @endphp @endforeach
User Role Number of Users Total Attempts Risk Level
{{ $role ?: 'Unassigned' }} {{ $userCount }} {{ $totalAttemptsForRole }} {{ $riskLevel }}
@endif
🔒 RECOMMENDED ACTIONS:
1. Review role assignments for users with frequent unauthorized attempts
2. Contact users directly to verify their access requirements
3. Consider temporary access restrictions for high-risk users
4. Monitor these users closely for continued unauthorized access patterns
5. Update role permissions if business requirements have changed
@else

✅ EXCELLENT SECURITY STATUS

No users have made frequent unauthorized access attempts in {{ $period }}.

Your system security is functioning properly!

@endif