Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bodik opened this issue Jan 31, 2024 · 0 comments
Open

Comments

@bodik
Copy link
Owner

bodik commented Jan 31, 2024

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']:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant