Skip to content

Commit 49775e0

Browse files
docs: update frontpage
- Describe the system's core mechanism - Describe the workflow more precisely - Add pointers for main audiences - Generate link to published GitHub issues from settings
1 parent 79b746c commit 49775e0

File tree

4 files changed

+50
-18
lines changed

4 files changed

+50
-18
lines changed

src/shared/templates/base.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ <h1>
8787
</div>
8888
{% endif %}
8989

90+
{% block workflow %}
9091
<nav id="menu-bar">
9192
<ul class="row gap">
9293
<li class="row gap-small centered"><i class="icon-bin"></i><a href="{% url 'webview:suggestion:dismissed_suggestions' %}">Dismissed suggestions</a></li>
@@ -95,6 +96,7 @@ <h1>
9596
<li class="row gap-small centered"><i class="icon-github"></i><a href="{% url 'webview:issue_list' %}">Published issues</a></li>
9697
</ul>
9798
</nav>
99+
{% endblock %}
98100

99101
{% block layout %}
100102
<main id="page-content">
Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,48 @@
11
{% extends "base.html" %}
22

3+
{% block workflow %}
4+
{% endblock %}
5+
36
{% block content %}
7+
{% load viewutils %}
48

59
<article class="prose">
610
<p>
7-
The <strong>Nixpkgs Security Tracker</strong> is a web service for managing information on <em>vulnerabilities</em> in software distributed through <a href="https://github.com/nixos/nixpkgs">Nixpkgs and NixOS</a>.
8-
It operates on the following distinctions:
11+
The <strong>Nixpkgs Security Tracker</strong> is a web service for managing information on vulnerabilities in software distributed through <a href="https://github.com/nixos/nixpkgs">Nixpkgs and NixOS</a>.
12+
</p>
13+
<p>
14+
It is intended to help with solving the <a href="https://en.wikipedia.org/wiki/Record_linkage" target="_blank">record linkage</a> problem of matching packages in the <a href="https://www.cve.org/" target="_blank">CVE database</a> and <a href="https://search.nixos.org/packages" target="_blank">Nixpkgs</a>.
915
</p>
10-
<ul>
11-
<li>
12-
<span class="inline-row gap-small centered"><i class="icon-inbox"></i><a href="{% url 'webview:suggestion:untriaged_suggestions' %}">Untriaged suggestions</a></span> are automatically generated matches between a <a href="https://www.cve.org/ResourcesSupport/Glossary#glossaryCVE">CVE</a> and Nixpkgs derivations.
13-
</li>
14-
<li>
16+
<h2 class="heading">Workflow</h2>
17+
<p>
18+
<span class="inline-row gap-small centered"><i class="icon-inbox"></i><a href="{% url 'webview:suggestion:untriaged_suggestions' %}">Untriaged suggestions</a></span> are automatically generated matches between a <a href="https://www.cve.org/ResourcesSupport/Glossary#glossaryRecord">CVE Record</a> and Nixpkgs derivations.
19+
</p>
20+
<p>
1521
<span class="inline-row gap-small centered"><i class="icon-bin"></i><a href="{% url 'webview:suggestion:dismissed_suggestions' %}">Dismissed suggestions</a></span> are CVEs that already were classified by a human as <em>not affecting</em> Nixpkgs.
16-
</li>
17-
<li>
18-
<span class="inline-row gap-small centered"><i class="icon-draft"></i><a href="{% url 'webview:suggestion:accepted_suggestions' %}">Accepted suggestions</a></span> are matches between a CVE and Nixpkgs attributes that were selected as <em>security relevant</em>.
19-
They are slated to be published as a GitHub issue, but might need further refinement.
20-
</li>
21-
<li>
22-
<span class="inline-row gap-small centered"><i class="icon-github"></i><a href="/issues">Published issues</a></span> have a persistent identifier and link to GitHub issues, which are used for notifications and coordinating mitigation.
23-
</li>
24-
<ul>
22+
</p>
23+
<p>
24+
<span class="inline-row gap-small centered"><i class="icon-draft"></i><a href="{% url 'webview:suggestion:accepted_suggestions' %}">Accepted suggestions</a></span> are slated to be published, but might need further refinement.
25+
</p>
26+
<p>
27+
<span class="inline-row gap-small centered"><i class="icon-github"></i><a href="/issues">Published issues</a></span> have a persistent identifier and link to <a href="{% gh_issues_url %}" target="_blank">GitHub issues</a>, where maintainers are notified and mitigation is coordinated.
28+
</p>
29+
30+
<h2 class="heading">Contributors</h2>
31+
<p>
32+
<a href="https://github.com/NixOS/nixpkgs-committers/" target="_blank">Nixpkgs committers</a>
33+
can edit suggestions to help the
34+
<a href="https://github.com/orgs/nixos/teams/security" target="_blank">NixOS security team</a>
35+
with triaging.
36+
</p>
37+
<p>
38+
<a href="https://github.com/orgs/nixos/teams/nixpkgs-maintainers" target="_blank">Nixpkgs maintainers</a>
39+
are encouraged to check their <a href="{% url 'webview:notifications:center' %}">notifications</a>.
40+
</p>
41+
42+
<h2 class="heading">Users</h2>
43+
<p>
44+
If you use NixOS or otherwise rely on software from Nixpkgs, <a href="{% url 'webview:subscriptions:center' %}">subscribe to notifications</a> on published vulnerabilities.
45+
</p>
2546
</article>
2647

2748
{% endblock %}

src/webview/templates/issue_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h1 class="page-title row gap-small centered">{% status_icon "published" %}Publi
77

88
<div class="prose">
99
<p>
10-
All published security issues are <a href="https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue%20state%3Aopen%20label%3A%221.severity%3A%20security%22" target="_blank">tracked and resolved on GitHub</a>.
10+
All published security issues are <a href="{% gh_issues_url %}" target="_blank">tracked and resolved on GitHub</a>.
1111
</p>
1212
</div>
1313

src/webview/templatetags/viewutils.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
import logging
33
from collections.abc import ItemsView
44
from typing import Any, TypedDict
5-
from urllib.parse import quote
5+
from urllib.parse import quote, urlencode
66

77
from cvss import CVSS3
88
from cvss.constants3 import METRICS_ABBREVIATIONS
99
from django import template
10+
from django.conf import settings
1011
from django.template.context import Context
1112

1213
from shared.listeners.cache_suggestions import CachedSuggestion, parse_drv_name
@@ -292,3 +293,11 @@ def maintainer_add(
292293
data: MaintainerAddContext,
293294
) -> dict:
294295
return {"data": data}
296+
297+
298+
@register.simple_tag
299+
def gh_issues_url() -> str:
300+
base = f"https://github.com/{settings.GH_ORGANIZATION}/{settings.GH_ISSUES_REPO}/issues"
301+
labels = " ".join(f"label:{label!r}" for label in settings.GH_ISSUES_LABELS)
302+
query = f"is:issue state:open {labels}".strip()
303+
return f"{base}?{urlencode({'q': query})}"

0 commit comments

Comments
 (0)