diff --git a/VERSION.txt b/VERSION.txt index b112f91..c787b21 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.0.21 +1.0.22 diff --git a/hooks/soos_dast_hook.py b/hooks/soos_dast_hook.py index a93ddaa..93ef10e 100644 --- a/hooks/soos_dast_hook.py +++ b/hooks/soos_dast_hook.py @@ -44,5 +44,7 @@ def zap_started(zap, target): def zap_pre_shutdown(zap): log("Overview of spidered URL's:") - for url in zap.spider.all_urls: - log(f"found: {url}") + with open('spidered_urls.txt', 'w') as f: + for url in zap.spider.all_urls: + f.write(f"{url}\n") + log(f"found: {url}") \ No newline at end of file diff --git a/main.py b/main.py index 6704685..9a155de 100644 --- a/main.py +++ b/main.py @@ -1065,6 +1065,12 @@ def run_analysis(self) -> None: ) raise Exception(f"An Unexpected error has occurred running the {self.scan_mode} scan") + # Add the discovered urls to the report + discoveredUrls = open('./spidered_urls.txt', 'r').read().splitlines() + data = json.load(open(Constants.REPORT_SCAN_RESULT_FILE, 'r')) + data['discoveredUrls'] = discoveredUrls + json.dump(data, open(Constants.REPORT_SCAN_RESULT_FILE, 'w')) + self.publish_results_to_soos( project_id=soos_dast_start_response.project_id, branch_hash=soos_dast_start_response.branch_hash,