You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by js...@apache.org on 2026/10/16 04:33:19 UTC

(httpd-site) 01/01: Security pages: per-release CVE counts, CVE permalinks, ordered-list numbering

This is an automated email from the ASF dual-hosted git repository.

lingfish pushed a commit to branch preview/cve-list-improvements
in repository https://gitbox.apache.org/repos/asf/httpd-site.git

commit 5b3e690915ab81ac828f4b3c20fab9094ccf51d7
Author: Jason Lingohr <js...@apache.org>
AuthorDate: Fri Oct 16 15:32:47 2026 +1100

    Security pages: per-release CVE counts, CVE permalinks, ordered-list numbering
---
 content/css/apsite.css            | 40 +++++++++++++++++++++++++++++++++++++++
 content/security/cvejsontohtml.py |  7 +++++--
 2 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/content/css/apsite.css b/content/css/apsite.css
index f0c7689..68c4251 100644
--- a/content/css/apsite.css
+++ b/content/css/apsite.css
@@ -712,6 +712,46 @@ td.cve-header {
     padding: 1px 5px 1px 1px;
 }
 
+/* CVE list: number each CVE within its release, like an ordered list */
+dl.cve-list {
+    counter-reset: cve;
+}
+
+dl.cve-list dt {
+    counter-increment: cve;
+}
+
+dl.cve-list dt > h3 {
+    position: relative;
+    padding-left: 2.4em;      /* room for the counter */
+}
+
+dl.cve-list dt > h3::before {
+    content: counter(cve) ".";
+    position: absolute;
+    left: 0;
+    width: 2em;
+    text-align: right;
+    color: #557697;           /* apsite heading accent */
+    font-weight: normal;
+}
+
+/* per-release total, floated into the release <h1> */
+#apcontents h1 span.cve-count {
+    float: right;
+    font-size: 13px;
+    font-weight: normal;
+    opacity: .85;
+}
+
+/* hover permalink on each CVE heading (visibility comes from base.html) */
+dl.cve-list .headerlink {
+    margin-left: .4em;
+    color: inherit;
+    font-weight: normal;
+    text-decoration: none;
+}
+
 /* sidebar                */
 /* ====================== */
 div#quickview li {
diff --git a/content/security/cvejsontohtml.py b/content/security/cvejsontohtml.py
index 3e28cf1..411b8af 100755
--- a/content/security/cvejsontohtml.py
+++ b/content/security/cvejsontohtml.py
@@ -186,10 +186,13 @@ if not options.nopreamble:
         print ("<p>"+options.extratext+"</p><br/>")
 
 for sectioncves in sections:
-    print ("\n<h1 id=\""+sectioncves["fixed"]+"\">Fixed in "+sectioncves["product"]+" "+sectioncves["fixed"]+"</h1><dl>\n")
+    count = len(sectioncves["cves"])
+    print ("\n<h1 id=\""+sectioncves["fixed"]+"\">Fixed in "+sectioncves["product"]+" "+sectioncves["fixed"]
+           +" <span class=\"cve-count\">"+str(count)+" CVE"+("s" if count != 1 else "")+"</span></h1><dl class=\"cve-list\">\n")
     for e in sectioncves["cves"]:
         html = "<dt><h3 id=\""+e['cveid']+"\">"+e['impact']+": <name name=\""+e['cveid']+"\">"+saxutils.escape(e['title'])+"</name>\n";
-        html += "(<a href=\"https://www.cve.org/CVERecord?id="+e['cveid']+"\">"+e['cveid']+"</a>)</h3></dt>\n";
+        html += "(<a href=\"https://www.cve.org/CVERecord?id="+e['cveid']+"\">"+e['cveid']+"</a>)"
+        html += "<a class=\"headerlink\" href=\"#"+e['cveid']+"\" title=\"Permanent link\">&para;</a></h3></dt>\n";
         desc = saxutils.escape(e['desc'])
         desc = re.sub(r'\n','</p><p>', desc)
         html += "<dd><p>"+desc+"</p>\n"