-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Bug description
Generating the engagement report fails when executive summary is selected.
Steps to reproduce
Steps to reproduce the behavior:
- Go to https://demo.defectdojo.org
- Create a new Product
- Create a new Engagement within the Product created
- Generate an Engagement report
https://demo.defectdojo.org/engagement/15/report?include_finding_notes=0&include_finding_images=0&include_executive_summary=1&include_table_of_contents=0&include_disclaimer=0&report_type=HTML&title=&active=1&verified=1&false_p=2&duplicate=2&_generate=
- See error
500 code error
Expected behavior
Engagement report is generated without error.
Deployment method (select with an X
)
- Docker Compose
- Kubernetes
- GoDojo
- Reproduced with demo.defectdojo.org
Environment information
- Reproduced with demo.defectdojo.org version 2.45.0
Logs
uwsgi-1 | [pid: 32|app: -|req: -/-] X.X.X.X (**********) {64 vars in 3021 bytes} [Wed Apr 9 09:31:41 2025] GET /engagement/315/report?title=&active=1&verified=1&false_p=2&duplicate=2 => generated 189332 bytes in 310 msecs (HTTP/1.1 200) 8 headers in 369 bytes (1 switches on core 1)
uwsgi-1 | [09/Apr/2025 09:31:46] ERROR [django.request:248] Internal Server Error: /engagement/315/report
uwsgi-1 | Traceback (most recent call last):
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
uwsgi-1 | response = get_response(request)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
uwsgi-1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/app/dojo/authorization/authorization_decorators.py", line 36, in _wrapped
uwsgi-1 | return func(request, *args, **kwargs)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/app/dojo/reports/views.py", line 252, in engagement_report
uwsgi-1 | return generate_report(request, engagement)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/app/dojo/reports/views.py", line 572, in generate_report
uwsgi-1 | return render(request,
uwsgi-1 | ^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/shortcuts.py", line 25, in render
uwsgi-1 | content = loader.render_to_string(template_name, context, request, using=using)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/loader.py", line 62, in render_to_string
uwsgi-1 | return template.render(context, request)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/backends/django.py", line 107, in render
uwsgi-1 | return self.template.render(context)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 171, in render
uwsgi-1 | return self._render(context)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 163, in _render
uwsgi-1 | return self.nodelist.render(context)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 1008, in render
uwsgi-1 | return SafeString("".join([node.render_annotated(context) for node in self]))
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 1008, in <listcomp>
uwsgi-1 | return SafeString("".join([node.render_annotated(context) for node in self]))
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 969, in render_annotated
uwsgi-1 | return self.render(context)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/loader_tags.py", line 159, in render
uwsgi-1 | return compiled_parent._render(context)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 163, in _render
uwsgi-1 | return self.nodelist.render(context)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 1008, in render
uwsgi-1 | return SafeString("".join([node.render_annotated(context) for node in self]))
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 1008, in <listcomp>
uwsgi-1 | return SafeString("".join([node.render_annotated(context) for node in self]))
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 969, in render_annotated
uwsgi-1 | return self.render(context)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/loader_tags.py", line 65, in render
uwsgi-1 | result = block.nodelist.render(context)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 1008, in render
uwsgi-1 | return SafeString("".join([node.render_annotated(context) for node in self]))
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 1008, in <listcomp>
uwsgi-1 | return SafeString("".join([node.render_annotated(context) for node in self]))
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 969, in render_annotated
uwsgi-1 | return self.render(context)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/defaulttags.py", line 327, in render
uwsgi-1 | return nodelist.render(context)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 1008, in render
uwsgi-1 | return SafeString("".join([node.render_annotated(context) for node in self]))
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 1008, in <listcomp>
uwsgi-1 | return SafeString("".join([node.render_annotated(context) for node in self]))
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/base.py", line 969, in render_annotated
uwsgi-1 | return self.render(context)
uwsgi-1 | ^^^^^^^^^^^^^^^^^^^^
uwsgi-1 | File "/usr/local/lib/python3.11/site-packages/django/template/defaulttags.py", line 198, in render
uwsgi-1 | values = list(values)
uwsgi-1 | ^^^^^^^^^^^^
uwsgi-1 | ValueError: zip() argument 2 is shorter than argument 1
Sample scan files
N/A
Screenshots
Additional context (optional)
/