Skip to content

Commit

Permalink
#312 fixed spacing encoding in URL
Browse files Browse the repository at this point in the history
  • Loading branch information
jfevang committed Jun 25, 2024
1 parent 9b5fb7e commit dab2ea6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scubagoggles/reporter/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,17 +320,18 @@ def rego_json_to_ind_reports(test_results_data : str, product : list, out_path :
'Criticality': test['Criticality'],
'Details': details})
markdown_group_name = "-".join(baseline_group['GroupName'].split())
group_reference_url = f'{SCUBA_GITHUB_URL}/tree/v0.2.0/baselines/'\
group_reference_url = f'{SCUBA_GITHUB_URL}/blob/v0.2.0/baselines/'\
f'{full_name} Minimum Viable Secure Configuration Baseline v0.2.md#'\
f'{baseline_group["GroupNumber"]}-{markdown_group_name}'
markdown_link = fr'<a href="{group_reference_url}" target="_blank"\>'\
group_reference_url_spacing = "%20".join(group_reference_url.split())
markdown_link = fr'<a href="{group_reference_url_spacing}" target="_blank"\>'\
f'{baseline_group["GroupName"]}</a>'
fragments.append(f"<h2>{product_upper}-{baseline_group['GroupNumber']} \
{markdown_link}</h2>")
fragments.append(create_html_table(table_data))
results_data.update({"GroupName": baseline_group['GroupName']})
results_data.update({"GroupNumber": baseline_group['GroupNumber']})
results_data.update({"GroupReferenceURL":group_reference_url})
results_data.update({"GroupReferenceURL":group_reference_url_spacing})
results_data.update({"Controls": table_data})
json_data.append(results_data)
html = build_report_html(fragments, prod_to_fullname[product], tenant_domain, main_report_name)
Expand Down

0 comments on commit dab2ea6

Please sign in to comment.