{% extends "base.html" %} {% set active_page = "security" %} {% block title %}FaultRay - Security Analysis{% endblock %} {% block page_title %}Security Analysis{% endblock %} {% block page_subtitle %}Attack resilience and defense coverage{% endblock %} {% block top_actions %} {% endblock %} {% block content %}

Security Resilience

{% set sec_score = security_score if security_score is defined else 68 %} {% if sec_score >= 80 %} {% set sc_class = "score-good" %} {% set sc_label = "Strong" %} {% elif sec_score >= 60 %} {% set sc_class = "score-warning" %} {% set sc_label = "Moderate" %} {% else %} {% set sc_class = "score-critical" %} {% set sc_label = "Weak" %} {% endif %}
{{ sec_score }}
{{ sc_label }}

Defense Coverage

{% set defenses = [ {"name": "Network Security", "pct": 85}, {"name": "Authentication", "pct": 72}, {"name": "Data Encryption", "pct": 90}, {"name": "Access Control", "pct": 65}, {"name": "Monitoring", "pct": 78}, {"name": "Incident Response", "pct": 55} ] %}
{% for d in defenses %}
{{ d.name }} {{ d.pct }}%
{% if d.pct >= 80 %} {% set bar_color = "var(--green)" %} {% elif d.pct >= 60 %} {% set bar_color = "var(--yellow)" %} {% else %} {% set bar_color = "var(--red)" %} {% endif %}
{% endfor %}

Attack Resilience Matrix

{% set attacks = [ {"type": "DDoS", "score": 82, "defenses": "Rate limiting, CDN, Auto-scaling", "status": "protected"}, {"type": "SQL Injection", "score": 91, "defenses": "Parameterized queries, WAF, Input validation", "status": "protected"}, {"type": "Ransomware", "score": 45, "defenses": "Backups, Network segmentation", "status": "vulnerable"}, {"type": "Man-in-the-Middle", "score": 88, "defenses": "TLS 1.3, Certificate pinning, HSTS", "status": "protected"}, {"type": "Credential Stuffing", "score": 62, "defenses": "MFA, Rate limiting", "status": "partial"}, {"type": "Supply Chain", "score": 38, "defenses": "Dependency scanning", "status": "vulnerable"}, {"type": "Data Exfiltration", "score": 71, "defenses": "DLP, Network monitoring, Encryption at rest", "status": "partial"}, {"type": "Privilege Escalation", "score": 76, "defenses": "RBAC, Least privilege, Audit logs", "status": "partial"}, {"type": "Cross-Site Scripting", "score": 94, "defenses": "CSP, Output encoding, WAF", "status": "protected"}, {"type": "API Abuse", "score": 58, "defenses": "Rate limiting, API gateway", "status": "partial"} ] %} {% for atk in attacks %} {% endfor %}
Attack Type Resilience Defense Mechanisms Status
{{ atk.type }} {% if atk.score >= 80 %} {{ atk.score }}% {% elif atk.score >= 60 %} {{ atk.score }}% {% else %} {{ atk.score }}% {% endif %} {{ atk.defenses }} {% if atk.status == "protected" %} Protected {% elif atk.status == "partial" %} Partial {% else %} Vulnerable {% endif %}
{% endblock %}