Skip to content

bug: report generatil fails when vuln.description None and tags report:data #55

@bodik

Description

@bodik

bug: report generatil fails when vuln.description None and tags report:data

refactor and fix

index 0393b85..40c4158 100644
--- a/sner/server/storage/core.py
+++ b/sner/server/storage/core.py
@@ -229,6 +229,8 @@ def vuln_report(qfilter=None, group_by_host=False):  # pylint: disable=too-many-
                     f'Hostname: {vdata.host.hostname}' if vdata.host.hostname else None,
                     f'Via-target: {vdata.via_target}' if vdata.via_target else None
                 ]))
+                if not rdata['description']:
+                    rdata['description'] = ""
                 rdata['description'] += f'\n\n## Data {data_ident}\n{vdata.data}'
 
         for col in ['endpoint_address', 'endpoint_hostname', 'tags', 'xtype']:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions