DSP3 SmartCheck Class¶
The SmartCheck class can be found in the models module: dsp3.models.smartcheck.SmartCheck. This class will be your main interaction with the DS SmartCheck scan service.
Please see below for auto documentation generated for this class.
-
class
dsp3.models.smartcheck.SmartCheck(username: str, password: str, host: str, port: int = '443', verify_ssl: bool = False, ca_cert_file: str = None, proxy=None)¶ -
add_registry(name: str = None, description: str = None, host: str = None, username: str = None, password: str = None, include: List[str] = None, exclude: List[str] = None, schedule: bool = False)¶ Do not use this call at this time. Not working.
Parameters: - name –
- description –
- host –
- username –
- password –
- include –
- exclude –
- schedule –
Returns:
-
get_scans(id=None, registry=None, repository=None, tag=None, exact=False)¶ Retrieve a list of scans.
- repository: (Optional) When present, the tag query parameter will filter the list of scans to those scans where the source.repository
- contains the provided value. If the exact query parameter is also provided (and true), the filter will do an exact match on the value.
- exact: (Optional) When present (and true), any filtering done using the registry, repository, and tag query parameters will
- be done using exact matches.
Returns: json object with scans
-
get_sessions()¶ Retrieve a list of sessions.
Returns: json object with sessions
-
get_users()¶ Retrieve a list of users.
Returns: json object with users
-
get_vulnerabilities(id, layer_id)¶ Get scan vulnerability findings.
Parameters: - id – scan id
- layer_id – scan layer id
Returns: python dict containing vulnerability findings.
-
initiate_scan_ecr(registry, repository, tag, region, access_key, secret_access_key, token=None, type='docker')¶ Initiate a new scan
Parameters: - registry –
- repository –
- tag –
- region –
- access_key –
- secret_access_key –
- token – Use this if your source requires requests to be authorized using a bearer token. Requests will include an Authorization: Bearer {token} header
- type – docker
Returns:
-
