Fix unhandled StopIteration/AttributeError crashes and unclosed <a> tags in Advisory Curation views
Maintainer antworten meist innerhalb von 1 Tag
@Anurag-S1ngh arbeitet bereits daran.
Seit 24.10.2026.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 72/100
Rechercherichtung
Start with vulnerabilities/views.py and vulnerabilities/templates/advisory_todos.html, following the named AdvisoryMitigationCurationView and curation data accesses. Check the affected curation views for empty summaries, missing advisories, and missing curation_items, then inspect the conditional links for the three listed curation types. Done means those cases render without uncaught exceptions and each generated link has a matching closing tag.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
While reviewing the advisory curation workflow in vulnerabilities/views.py and advisory_todos.html, I identified two bugs:
-
In
vulnerabilities/views.py,AdvisoryMitigationCurationViewextracts summaries and the primary AVID using:context["advisory_summaries"] = { adv.avid: adv.summary for adv in todo.advisories.all() if adv.summary.strip() } context["avid"] = next(iter(context["advisory_summaries"])) context["curation_items"] = [ a.base_purl for a in todo.advisories.first().impacted_packages.filter( fixed_by_packages__isnull=True ) ]- If advisories have empty summaries,
context["advisory_summaries"]is empty andnext(iter({}))raises an uncaughtStopIteration(HTTP 500). - If a
todohas no linked advisories,todo.advisories.first()returnsNone, raisingAttributeError. - Directly accessing
todo.issue_detail["curation_items"]in other curation views also raisesKeyError/TypeErrorwhen the key is missing.
- If advisories have empty summaries,
-
In
vulnerabilities/templates/advisory_todos.html, opening<a>tags are generated forCONFLICTING_SEVERITY_SCORES,CONFLICTING_WEAKNESSES, andMISSING_FIXED_BY_PACKAGE, but the closing</a>tag is only rendered forsupported_curation.split. This leaves anchor tags unclosed and breaks table row formatting.
Steps to Reproduce
- Open
/advisories/todos/and inspect table rows forCONFLICTING_SEVERITY_SCORES,CONFLICTING_WEAKNESSES, orMISSING_FIXED_BY_PACKAGE: observe that opening<a>tags lack matching closing</a>tags in the rendered HTML output. - Create or identify an
AdvisoryToDoitem of typeMISSING_FIXED_BY_PACKAGEwhere linked advisories have empty summary fields (or where no advisories are linked). - Navigate to
/advisories/todos/<todo_id>/mitigation/curate/for that To-Do item. - Observe Django raising an unhandled
StopIterationorAttributeError, resulting in an HTTP 500 response.
Current Behavior
AdvisoryMitigationCurationViewcrashes with an HTTP 500 error instead of handling empty summaries or missing advisories gracefully.advisory_todos.htmlproduces mismatched anchor tags, corrupting the table DOM structure and causing layout issues in the browser.
Expected Behavior
- The curation views should handle empty summaries, missing advisories, and missing curation data gracefully without raising unhandled exceptions, returning a valid page instead of HTTP 500.
- The generated HTML should be valid, with correctly matched opening and closing
<a>tags for all supported curation types.
Additional Context
I would like to work on this issue myself if assigned.
- Vorherrschende Sprache
- Python
- Sterne
- 716
- Forks
- 347
- Ø Merge
- 13 Std. 47 Min.
- Gemergte PRs (30 T.)
- 8
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus aboutcode-org/vulnerablecode
-
OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargoEvtl. vergeben @Ashutosh-Panda2004 hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
aboutcode-org/vulnerablecode#2485 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .envEvtl. vergeben @Anurag-S1ngh hat das vor 7 Tagen übernommen. Offen
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 77/100
aboutcode-org/vulnerablecode#2477 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
OVAL parser corrupts version bounds when the epoch is 10, 20 or the version contains "0:"Evtl. vergeben @Ashutosh-Panda2004 hat das vor 5 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
aboutcode-org/vulnerablecode#2474 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
aboutcode-org/vulnerablecode#2426 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Get NuGet package versions from federated PURL version data in https://github.com/aboutcode-data/Evtl. wieder frei @Anshi321 hat das vor 26 Tagen übernommen, und es ist kein Pull Request offen. Offenbug data-quality
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
aboutcode-org/vulnerablecode#2418 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in aboutcode-org/vulnerablecode
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
BCDA-APS/polar-bits#93 ·
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejectedEvtl. vergeben @Steve-20-ai hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG] - ssh_config `Match tagged` statement always appliesEvtl. vergeben @AtharvRG hat das heute übernommen. OffenBug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
paramiko/paramiko#2715 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 9 Tagen
-
auto-rejected intake mcp-intake needs-salvage priority:high type:feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Ikalus1988/MisakaNet#4221 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag