diff --git a/plinth/modules/security/templates/security.html b/plinth/modules/security/templates/security.html
index 845c32127..aedea86b3 100644
--- a/plinth/modules/security/templates/security.html
+++ b/plinth/modules/security/templates/security.html
@@ -22,44 +22,9 @@
{% load i18n %}
{% block status %}
-
{% trans "Status" %}
-
- {% blocktrans trimmed with count=freedombox_vulns.count %}
- The installed version of FreedomBox has {{ count }} reported security
- vulnerabilities.
- {% endblocktrans %}
-
-
- {% blocktrans trimmed %}
- The following table lists the reported number of security vulnerabilities
- for each installed app.
- {% endblocktrans %}
-
-
-
- {% trans "Show security vulnerabilities" %}
+
+
+ {% trans "Show security report" %}
-
-
-
-
-
- | {% trans "App Name" %} |
- {% trans "Current Vulnerabilities" %} |
- {% trans "Past Vulnerabilities" %} |
-
-
-
- {% for app in apps_vulns %}
-
- | {{ app.name }} |
- {{ app.count }} |
- {{ app.past_count }} |
-
- {% endfor %}
-
-
-
{% endblock %}
diff --git a/plinth/modules/security/templates/security_report.html b/plinth/modules/security/templates/security_report.html
new file mode 100644
index 000000000..19bbd001c
--- /dev/null
+++ b/plinth/modules/security/templates/security_report.html
@@ -0,0 +1,56 @@
+{% extends "base.html" %}
+{% comment %}
+#
+# This file is part of FreedomBox.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+#
+{% endcomment %}
+
+{% load bootstrap %}
+{% load i18n %}
+
+{% block content %}
+ {% trans "Security Report" %}
+
+ {% blocktrans trimmed with count=freedombox_vulns.count %}
+ The installed version of FreedomBox has {{ count }} reported security
+ vulnerabilities.
+ {% endblocktrans %}
+
+
+ {% blocktrans trimmed %}
+ The following table lists the current reported number, and historical
+ count, of security vulnerabilities for each installed app.
+ {% endblocktrans %}
+
+
+
+
+ | {% trans "App Name" %} |
+ {% trans "Current Vulnerabilities" %} |
+ {% trans "Past Vulnerabilities" %} |
+
+
+
+ {% for app in apps_vulns %}
+
+ | {{ app.name }} |
+ {{ app.count }} |
+ {{ app.past_count|default_if_none:"❗"}} |
+
+ {% endfor %}
+
+
+{% endblock %}
diff --git a/plinth/modules/security/urls.py b/plinth/modules/security/urls.py
index bc76c779b..ffdd10c22 100644
--- a/plinth/modules/security/urls.py
+++ b/plinth/modules/security/urls.py
@@ -26,4 +26,5 @@ from . import views
urlpatterns = [
url(r'^sys/security/$', views.index, name='index'),
+ url(r'^sys/security/report$', views.report, name='report'),
]
diff --git a/plinth/modules/security/views.py b/plinth/modules/security/views.py
index 77e9490aa..3fbf5521b 100644
--- a/plinth/modules/security/views.py
+++ b/plinth/modules/security/views.py
@@ -43,7 +43,6 @@ def index(request):
else:
form = SecurityForm(initial=status, prefix='security')
- vulnerability_counts = security.get_vulnerability_counts()
return TemplateResponse(
request, 'security.html', {
'name':
@@ -52,11 +51,6 @@ def index(request):
security.manual_page,
'form':
form,
- 'freedombox_vulns':
- vulnerability_counts.pop('freedombox'),
- 'apps_vulns':
- sorted(vulnerability_counts.values(),
- key=lambda app: app['name']),
})
@@ -86,3 +80,18 @@ def _apply_changes(request, old_status, new_status):
actions.superuser_run('service', ['enable', 'fail2ban'])
else:
actions.superuser_run('service', ['disable', 'fail2ban'])
+
+
+def report(request):
+ """Serve the security report page"""
+ vulnerability_counts = security.get_vulnerability_counts()
+ return TemplateResponse(
+ request, 'security_report.html', {
+ 'title':
+ _('Security Report'),
+ 'freedombox_vulns':
+ vulnerability_counts.pop('freedombox'),
+ 'apps_vulns':
+ sorted(vulnerability_counts.values(),
+ key=lambda app: app['name']),
+ })