Answer architecture round 4: 0 🔴, 0 🟡; an entry with no summary files without a bare colon
This commit is contained in:
@@ -105,7 +105,8 @@ def detail(module: Module) -> str:
|
|||||||
lines = []
|
lines = []
|
||||||
for osv in sorted(module.osvs.values(), key=lambda o: o["id"]):
|
for osv in sorted(module.osvs.values(), key=lambda o: o["id"]):
|
||||||
aliases = f" ({', '.join(osv['aliases'])})" if osv["aliases"] else ""
|
aliases = f" ({', '.join(osv['aliases'])})" if osv["aliases"] else ""
|
||||||
lines.append(f"- {osv['id']}{aliases}: {osv['summary']}")
|
summary = f": {osv['summary']}" if osv["summary"] else ""
|
||||||
|
lines.append(f"- {osv['id']}{aliases}{summary}")
|
||||||
return f"govulncheck found these in {module.carried}:\n\n" + "\n".join(lines) + "\n"
|
return f"govulncheck found these in {module.carried}:\n\n" + "\n".join(lines) + "\n"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ OSVS = (
|
|||||||
{"id": "GO-2026-0002", "summary": "Denial of service in net/http", "aliases": ["GHSA-2222", "CVE-2026-2"]},
|
{"id": "GO-2026-0002", "summary": "Denial of service in net/http", "aliases": ["GHSA-2222", "CVE-2026-2"]},
|
||||||
{"id": "GO-2026-0001", "summary": "Cross-site scripting in html/template", "aliases": ["CVE-2026-1"]},
|
{"id": "GO-2026-0001", "summary": "Cross-site scripting in html/template", "aliases": ["CVE-2026-1"]},
|
||||||
{"id": "GO-2026-0003", "summary": "Panic in x/text"},
|
{"id": "GO-2026-0003", "summary": "Panic in x/text"},
|
||||||
|
{"id": "GO-2026-0004"},
|
||||||
)
|
)
|
||||||
STDLIB = (
|
STDLIB = (
|
||||||
("GO-2026-0002", "stdlib", "v1.27.1", "v1.27.2"),
|
("GO-2026-0002", "stdlib", "v1.27.1", "v1.27.2"),
|
||||||
@@ -110,7 +111,8 @@ class FileItems(unittest.TestCase):
|
|||||||
self.assertIn("| 8 | 0.2.0 | security | **Raise `golang.org/x/text`", todo)
|
self.assertIn("| 8 | 0.2.0 | security | **Raise `golang.org/x/text`", todo)
|
||||||
|
|
||||||
def test_a_vulnerability_no_version_fixes_names_no_target(self):
|
def test_a_vulnerability_no_version_fixes_names_no_target(self):
|
||||||
todo, _ = file(TODO, *STDLIB, ("GO-2026-0003", "stdlib", "v1.27.1", ""))
|
todo, _ = file(TODO, *STDLIB, ("GO-2026-0004", "stdlib", "v1.27.1", ""))
|
||||||
|
self.assertIn("- GO-2026-0004\n", todo)
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
"| 7 | 0.2.0 | security | **Ship no release while fejkdata carries Go 1.27.1, some of whose known"
|
"| 7 | 0.2.0 | security | **Ship no release while fejkdata carries Go 1.27.1, some of whose known"
|
||||||
" vulnerabilities no version fixes yet.** |",
|
" vulnerabilities no version fixes yet.** |",
|
||||||
|
|||||||
Reference in New Issue
Block a user