Scan¶
Scans¶
-
class
cloudpassage.
Scan
(session, **kwargs)¶ Initializing the Scan class:
Parameters: session ( cloudpassage.HaloSession
) – This will define how you interact with the Halo API, including proxy settings and API keys used for authentication.-
findings
(scan_id, findings_id)¶ Get FIM, CSM, and SVA findings details by scan and findings ID
Parameters: Returns: Dictionary object descrbing findings
Return type:
-
initiate_scan
(server_id, scan_type)¶ Initiate a scan on a specific server.
Parameters: - server_id (str) – ID of server to be scanned
- scan_type – Type of scan to be run.
Returns: - Dictionary describing command created as a result of this
call. As this scan is run asynchronously, this method returns information on the server command, not the scan itself. The server command will, in turn, cause the scan to be performed on the server. The ID that can be retrieved from the return value of this method can be used with the
cloudpassage.Server.command_details()
method to retrieve the status of the scan.
Return type: Raises: CloudPassageValidation
– Unsupported value forscan_type
.
-
last_scan_results
(server_id, scan_type)¶ Get the results of scan_type performed on server_id.
Parameters: - Valid scan types:
- sca - Configuration scan csm - Configuration scan (same as sca) svm - Software vulnerability scan sva - Software vulnerability scan (same as svm) fim - File integrity monitoring scan
Returns: Dictionary object describing last scan results Return type: dict
-
scan_details
(scan_id)¶ Get detailed scan information
Parameters: scan_id (str) – ID of scan Returns: Dictionary object describing scan details Return type: dict
-
scan_history
(**kwargs)¶ Get a list of historical scans.
Keyword Arguments: - server_id (str) – Id of server
- module (str or list) – sca, fim, svm, sam
- status (str or list) – queued, pending, running, completed_clean, completed_with_errors, failed
- since (str) – ISO 8601 formatted string representing the starting date and time for query
- until (str) – ISO 8601 formatted string representing the ending date and time for query
- max_pages (int) – maximum number of pages to fetch. Default: 20.
Returns: List of scan objects
Return type:
-
CVE Exceptions¶
-
class
cloudpassage.
CveException
(session, **kwargs)¶ Initializing the CveException class:
Parameters: session ( cloudpassage.HaloSession
) – This will define how you interact with the Halo API, including proxy settings and API keys used for authentication.