Skip to content

Commit

Permalink
Fix the issue in the actual method.
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsinenar committed Jun 14, 2024
1 parent 54d6b95 commit 6704e6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion agent/agent_nuclei.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _parse_output(self) -> None:
nuclei_data_dict["info"].pop("tags", None)

minified_data_dict = formatters.minify_dict(
copy.deepcopy(nuclei_data_dict), formatters.truncate
nuclei_data_dict, formatters.truncate
)
scan_results = json.dumps(minified_data_dict, indent=4, sort_keys=True)
technical_detail += f"""```json\n {scan_results} \n ``` """
Expand Down
5 changes: 3 additions & 2 deletions agent/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ def minify_dict(
if isinstance(value, list):
return [minify_dict(v, handler) for v in value]
elif isinstance(value, dict):
new_dict = value.copy()
for key, v in value.items():
value[key] = minify_dict(v, handler)
return value
new_dict[key] = minify_dict(v, handler)
return new_dict
else:
return handler(value, truncate_size)

0 comments on commit 6704e6d

Please sign in to comment.