Add centralized banner system with OS messaging support #14708
Merged
DryRunSecurity / Cross-Site Scripting Analyzer
succeeded
Apr 18, 2026 in 7s
DryRun Security
Details
Cross-Site Scripting Analyzer Findings: 3 detected
⚠️ Potential Cross-Site Scripting dojo/context_processors.py (click for details)
| Type | Potential Cross-Site Scripting |
| Description | additional_banners may include data from two sources: (1) get_os_banner() which fetches remote Markdown, renders it to HTML via markdown.markdown and then sanitizes with bleach.clean into 'message' and 'expanded_html'; (2) arbitrary dicts stored in request.session by product_announcement.add_session_banner (message field created from str((message))) and later popped and added directly to context. The template renders banner.message and banner.expanded_html with the |
| Filename | dojo/context_processors.py |
| CodeLink | django-DefectDojo/dojo/context_processors.py Lines 36 to 67 in 6a30549 |
⚠️ Potential Cross-Site Scripting dojo/product_announcements.py (click for details)
| Type | Potential Cross-Site Scripting |
| Description | mark_safe is used when building a session banner message: mark_safe(f"{self.base_message} {self.ui_outreach}") — this bypasses Django auto-escaping. If any interpolated content can be attacker-controlled, it would reach a template and be rendered without escaping, causing XSS. |
| Filename | dojo/product_announcements.py |
| CodeLink | django-DefectDojo/dojo/product_announcements.py Lines 34 to 35 in 6a30549 |
⚠️ Potential Cross-Site Scripting dojo/templates/base.html (click for details)
| Type | Potential Cross-Site Scripting |
| Description | Template uses the safe filter to render banner.message and banner.expanded_html ({{ banner.message |
| Filename | dojo/templates/base.html |
| CodeLink | django-DefectDojo/dojo/templates/base.html Lines 673 to 690 in 6a30549 |
Loading