Skip to content

Commit 176553d

Browse files
committed
finished reports api
1 parent 2eae1fd commit 176553d

1 file changed

Lines changed: 43 additions & 1 deletion

File tree

ThreadFixProApi/Networks/_utils/_reports.py

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,46 @@ def __init__(self, host, api_key, verify_ssl, timeout, headers, user_agent, cert
2121
the private key and the certificate) or as a tuple of both file’s path
2222
:param debug: Prints requests and responses, useful for debugging.
2323
"""
24-
super().__init__(host, api_key, verify_ssl, timeout, headers, user_agent, cert, debug)
24+
super().__init__(host, api_key, verify_ssl, timeout, headers, user_agent, cert, debug)
25+
26+
def get_most_vulnerable_networks(self):
27+
"""
28+
Gets the most vulnerable networks
29+
"""
30+
return super().request('GET', '/api/report/most-vulnerable-networks')
31+
32+
def get_most_vulnerable_hosts(self):
33+
"""
34+
Gets the most vulnerable hosts
35+
"""
36+
return super().request('GET', '/api/report/most-vulnerable-hosts')
37+
38+
def get_average_time_to_remediate_report(self):
39+
"""
40+
Gets the average remediation time.
41+
"""
42+
return super().request('GET', '/api/report/average-remediation-time')
43+
44+
def get_most_prevalent_cves_report(self):
45+
"""
46+
Gets a report of the most common CVEs in ThreadFix
47+
"""
48+
return super().request('GET', '/api/report/most-prevalent-cves')
49+
50+
def get_operating_system_report(self):
51+
"""
52+
Gets the list of operating systems and their information
53+
"""
54+
return super().request('GET', '/api/report/operating-systems')
55+
56+
def get_vulnerability_activity_report(self):
57+
"""
58+
Shows the activity report for each vulnerability
59+
"""
60+
return super().request('GET', '/api/report/vulnerability-activity-report')
61+
62+
def get_trending_vulnerability_report(self):
63+
"""
64+
Shows trending vulnerabilities.
65+
"""
66+
return super().request('GET', '/api/report/trending-vulnerabilities')

0 commit comments

Comments
 (0)