Workflows (risksense_api.__subject.__workflows.__workflows)

Workflows module defined for different workflows related api endpoints.

class risksense_api.__subject.__workflows.__workflows.Workflows(profile)[source]

Bases: Subject

Class for Worflow function defintions.

To utlise workflow function:

Parameters:

profile (object) – Profile Object

Usage:

self.{risksenseobjectname}.workflows.{function}

Examples

To get model for workflow using get_model() function

>>> self.{risksenseobject}.workflows.get_model()
class OverrideControl[source]

Bases: object

NONE = 'NONE'
AUTHORIZED = 'AUTHORIZED'
class Workflowtype[source]

Bases: object

FALSEPOSITIVE = 'falsePositive'
REMEDIATION = 'remediation'
ACCEPTANCE = 'acceptance'
SEVERITYCHANGE = 'severityChange'
__init__(profile)[source]

Initialization of Workflows object.

Parameters:

profile (object) – Profile Object

search(search_filters, projection='basic', page_size=150, sort_field='id', sort_dir='ASC', csvdump=False, client_id=None)[source]

Searches for and returns workflows based on the provided filter(s) and other parameters. Rather than returning paginated results, this function cycles through all pages of results and returns them all in a single list.

Parameters:
  • search_filters (list) – A list of dictionaries containing filter parameters.

  • projection (str) – Projection to be used in API request. Projection.BASIC or Projection.DETAIL

  • page_size (int) – The number of results per page to be returned.

  • sort_field (str) – The field to be used for sorting results returned.

  • sort_dir (str) – The direction of sorting to be used. SortDirection.ASC or SortDirection.DESC

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

list

Returns:

A list containing all workflows returned by the search using the filter provided.

Example

An example to search for workflow data is

>>> self.{risksenseobject}.workflow.search([])

Note

You can also dump the search based data in a csv by simply providing csvdump=True argument

>>> self.{risksenseobject}.workflow.search([],csvdump=True)
list_workflowbatch_model(client_id=None)[source]

Get available projections and models for Workflowbatch.

Parameters:

client_id (typing.Optional[int]) – Client ID

Return type:

dict

Returns:

Workflow batch models and projections

Example

An example to use get_model is

>>> self.{risksenseobject}.workflowbatch.get_model()
getexporttemplate(client_id=None)[source]

Gets configurable export template for workflows.

Parameters:

client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

list

Returns:

The Exportable fields

Example

An example to use getexporttemplate

>>> self.{risksenseobject}.workflows.getexporttemplate()

This gets all the export templates for workflows

export(search_filters, file_name, row_count='All', file_type='CSV', client_id=None)[source]

Initiates an export job on the platform for workflow(s) based on the provided filter(s), by default fetches all the columns data.

Parameters:
  • search_filters (list) – A list of dictionaries containing filter parameters.

  • file_name (str) – The name to be used for the exported file.

  • row_count (str) – No of rows to be exported. Available options ExportRowNumbers.ROW_10000, ExportRowNumbers.ROW_25000, ExportRowNumbers.ROW_50000, ExportRowNumbers.ROW_100000, ExportRowNumbers.ROW_ALL

  • file_type (str) – File type to export. ExportFileType.CSV, ExportFileType.JSON, or ExportFileType.XLSX

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID in the platform from is returned.

Example

An example to use export is

>>> self.{risksenseobject}.workflows.export([],'testingexport')

You can change the filetype to any of the names above or even the other positional arguments as mentioned

>>> self.{risksenseobject}.workflows.export([],'testingexport',file_type=ExportFileType.JSON)
list_workflowbatch_filter_fields(client_id=None)[source]

List filter endpoints for workflow batch.

Parameters:

client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

dict

Returns:

The JSON output from the platform is returned, listing the available filters.

Examples

>>>  self.{risksenseobject}.workflows.list_workflowbatch_filter_fields()
get_single_search_page(search_filters, projection='basic', page_num=0, page_size=150, sort_field='id', sort_dir='ASC', client_id=None)[source]

Searches for and returns workflows based on the provided filter(s) and other parameters.

Parameters:
  • search_filters (list) – A list of dictionaries containing filter parameters.

  • projection (str) – Projection to be used in API request. Projection.BASIC or Projection.DETAIL

  • page_num (int) – The page number of results to be returned.

  • page_size (int) – The number of results per page to be returned.

  • sort_field (str) – The field to be used for sorting results returned.

  • sort_dir (str) – The direction of sorting to be used. SortDirection.ASC or SortDirection.DESC

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

dict

Returns:

The JSON response from the platform is returned.

Example

An example to get single search page of workflows data

>>> self.{risksenseobject}.workflows.get_single_search_page([])

You can also try changing the other arguments to your liking to reflect the data as you suffice such as change page_size or page_num etc.

>>> self.{risksenseobject}.workflows.get_single_search_page([],page_num=2,page_size=10)
suggest(search_filter_1, search_filter_2, client_id=None)[source]

Suggest values for filter fields.

Parameters:
  • search_filter_1 (list) – Search Filter 1

  • search_filter_2 (dict) – Search Filter 2

  • client_id (typing.Optional[int]) – Client ID

Return type:

list

Returns:

Value suggestions

Example

To use suggest function is

>>> self.{risksenseobject}.workflows.suggest([],{})
request_acceptance(search_filter, workflow_name, description, reason, finding_type, expiration_date=None, override_control='AUTHORIZED', compensating_controls='NONE', attachment=None, client_id=None)[source]

Request acceptance for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • search_filter (list) – A list of dictionaries containing filter parameters.

  • workflow_name (str) – Workflow Name

  • description (str) – A description of the request.

  • reason (str) – A reason for the request.

  • finding_type (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • expiration_date (typing.Optional[str]) – An expiration date. Should be in “YYYY-MM-DD” format.

  • override_control (str) – A description of override controls applied to this finding. Option available : (‘NONE’, ‘AUTHORIZED’)

  • compensating_controls (str) – A description of compensating controls applied to this finding. Option available : (“DLP”, “Deemed not exploitable”, “Endpoint Security”, “IDS/IPS”, “MFA Enforced”, “Multiple: See Description”, “Network Firewall”, “Network Segmentation”, “Other: See Description”, “Web Application Firewall” or “NONE”)

  • attachment (typing.Optional[str]) – A path to a file to be uploaded and attached to the request.

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To create request acceptance for findings for hostfindings

>>> self.rs.workflows.request_acceptance([],'testingforsomething','something','none',"hostFinding","2022-08-11")
request_false_positive(finding_type, search_filter, workflow_name, description, reason, override_control='AUTHORIZED', expiration_date=None, attachment=None, client_id=None)[source]

Request false positive for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • finding_type (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • search_filter (list) – A list of dictionaries containing filter parameters.

  • workflow_name (str) – Workflow Name

  • description (str) – A description of the request.

  • reason (str) – A reason for the request.

  • override_control (str) – A description of override controls applied to this finding. Option available : (‘NONE’, ‘AUTHORIZED’)

  • expiration_date (typing.Optional[str]) – An expiration date. Should be in “YYYY-MM-DD” format.

  • attachment (typing.Optional[str]) – A path to a file to be uploaded and attached to the request.

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To create request false positive for findings for hostfindings

>>> self.rs.workflows.request_false_positive("hostFinding",[],'testingforsomething','something','none',"2022-08-11")
request_remediation(finding_type, search_filter, workflow_name, description, reason, override_control='AUTHORIZED', expiration_date=None, attachment=None, client_id=None)[source]

Request remediation for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • finding_type (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • search_filter (list) – A list of dictionaries containing filter parameters.

  • workflow_name (str) – Workflow Name

  • description (str) – A description of the request.

  • reason (str) – A reason for the request.

  • override_control (str) – A description of override controls applied to this finding. Option available : (‘NONE’, ‘AUTHORIZED’)

  • expiration_date (typing.Optional[str]) – An expiration date. Should be in “YYYY-MM-DD” format.

  • attachment (typing.Optional[str]) – A path to a file to be uploaded and attached to the request.

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To create request remediation for findings for hostfindings

>>> self.rs.workflows.request_remediation("hostFinding",[],'testingforsomething','something','none',"2022-08-11")
request_severity_change(finding_type, search_filter, workflow_name, description, reason, severity_change, override_control='AUTHORIZED', expiration_date=None, attachment=None, client_id=None)[source]

Request severity change for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • finding_type (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • search_filter (list) – A list of dictionaries containing filter parameters.

  • workflow_name (str) – Workflow Name

  • description (str) – A description of the request.

  • reason (str) – A reason for the request.

  • severity_change (str) – Severity change value.

  • override_control (str) – A description of override controls applied to this finding. Option available : (‘NONE’, ‘AUTHORIZED’)

  • compensating_controls – Severity change for this finding. Option available : (“1” to “10”)

  • expiration_date (typing.Optional[str]) – An expiration date. Should be in “YYYY-MM-DD” format.

  • attachment (typing.Optional[str]) – A path to a file to be uploaded and attached to the request.

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To create request severity change for findings for hostfindings

>>> self.rs.workflows.request_false_positive("hostFinding",[],'testingforsomething','something','4','none',"2022-08-11")
reject_workflow(filter_request, workflowtype, description, csvdump=False, client_id=None)[source]

Reject a workflow request.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • description (str) – A description of the rejection.

  • workflowtype (str) – Type of workflow

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To perform a reject acceptance request for a workflow filter RA#0000028

>>>  self.rs.workflows.reject_workflow([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000028"}],'acceptance','needed to test')

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>>  self.rs.workflows.reject_workflow([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000028"}],'acceptance','needed to test',csvdump=True)
rework_workflow(filter_request, workflow_type, description, csvdump=False, client_id=None)[source]

Request a rework of a workflow.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • description (str) – A description of the rework.

  • csvdump (bool) – dumps the data in csv

  • workflow_type (str) – Type of workflow

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To rework an acceptance request RA#0000027

>>> self.rs.workflows.rework_workflow([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000027"}],'acceptance','needed to test')

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>> self.rs.workflows.rework_workflow([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000027"}],'acceptance','needed to test',csvdump=True)
approve_workflow(filter_request, workflowtype, override_exp_date=False, expiration_date=datetime.date(2023, 2, 22), csvdump=False, client_id=None, **kwargs)[source]

Approve a workflow request.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • workflowtype (str) – Type of workflow

  • override_exp_date (bool) – True/False indicating whether or not an expiration date should be overridden.

  • expiration_date (str) – An expiration date for the approval. Should be in “YYYY-MM-DD” format.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To approve an acceptance request RA#0000028

>>> self.rs.workflows.approve_acceptance([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000028"}],'acceptance')

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>> self.rs.workflows.approve_acceptance([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000028"}],'acceptance',csvdump=True)
update_workflow(workflowBatchUuid, workflowtype, name, expirationDate, description, reason, compensatingControl, overrideControl='AUTHORIZED', csvdump=False, client_id=None, **kwargs)[source]

Update a workflow.

Parameters:
  • workflowBatchUuid (str) – Workflow UUID

  • workflowtype (str) – Type of workflow

  • name (str) – Workflow name

  • expirationDate (str) – An expiration date for the approval. Should be in “YYYY-MM-DD” format.

  • description (str) – A description of the rejection.

  • reason (str) – A reason for the rejection.

  • compensatingControl (str) – A description of compensating controls applied to this finding. Option available : (“DLP”, “Deemed not exploitable”, “Endpoint Security”, “IDS/IPS”, “MFA Enforced”, “Multiple: See Description”, “Network Firewall”, “Network Segmentation”, “Other: See Description”, “Web Application Firewall” or “NONE”)

  • overrideControl (str) – A description of override controls applied to this finding. Option available : (‘NONE’, ‘AUTHORIZED’)

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Keyword Arguments:

severity (severity) – The severity number

Return type:

dict

Returns:

The jsonified response.

Example

To Update a false positive workflow of uuid 11ed0429-4937-f454-b7ab-06933745a4d6

>>> self.rs.workflows.update_workflow("11ed0429-4937-f454-b7ab-06933745a4d6","testin","2022-07-31","testingforupdate",'falsePositive',"testing","NONE")

Note

You can also dump the search based data in a csv by simply providing csvdump=True argument

>>> self.rs.workflows.update_workflow("11ed0429-4937-f454-b7ab-06933745a4d6","testin","2022-07-31","testingforupdate",'falsePositive',"testing","NONE",csvdump=True)
map_findings(subject, filter_request, workflowuuid, workflowtype, client_id=None)[source]

Map findings to a workflow for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • filter_request (list) – A list of dictionaries containing filter parameters.

  • workflowuuid (str) – Workflow Name

  • workflowtype (str) – Workflow type

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To map acceptance workflow to findings

>>> self.rs.workflows.map_findings_acceptance("hostFinding",[{"field":"id","exclusive":False,"operator":"IN","value":"235141285"}],'acceptance',"11ed123b-9d8f-a2f1-b7ab-06933745a4d6")
unmap_findings(subject, filter_request, workflowuuid, workflowtype, client_id=None)[source]

Unmap findings to a workflow for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • filter_request (list) – A list of dictionaries containing filter parameters.

  • workflowuuid (str) – Workflow Name

  • workflowtype (str) – Workflow type

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To unmap findings to acceptance workflow

>>> self.rs.workflows.unmap_findings('hostFinding',[{"field":"id","exclusive":False,"operator":"IN","value":"232927123,178257910"}],'11ed0429-4937-f454-b7ab-06933745a4d6','acceptance')
get_attachments(workflowbatchuuid, workflowtype, subject, client_id=None)[source]

Get attachments from an acceptance workflow

Parameters:
  • workflowbatchuuid (str) – Workflowbatch uuid

  • subject (str) – Subject whether hostFinding or applicationFinding

  • workflowtype (str) – Type of workflow

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Example

To use attachment function

>>> self.rs.workflows.get_attachments_acceptance('11ed0429-4937-f454-b7ab-06933745a4d6','hostFinding')
download_workflowbatch_attachments(fileuuid, subject, workflowtype, workflowcategory='CLOSE_REQUEST', client_id=None)[source]

Download attachments from a workflow

Parameters:
  • fileuuid (str) – File uuid

  • subject (str) – Subject whether hostFinding or applicationFinding

  • workflowtype (str) – Type of workflow

  • workflowcategory (str) – Workflow category either CLOSE_REQUEST or CHANGE_REQUEST

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success

Example

To download workflowbatch attachments for hostfindings

>>> self.rs.workflows.download_workflowbatch_attachments_acceptance('test123','hostFinding','acceptance)
attach_files(workflowbatchuuid, subject, workflowtype, file_name, path_to_file, client_id=None)[source]

Attach a file to workflow

Parameters:
  • workflowbatchuuid (str) – Workflow UUID

  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • workflowtype (str) – Type of workflow

  • file_name (str) – The name to be used for the uploaded file.

  • path_to_file (str) – Full path to the file to be uploaded.

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether attachment is done

Example

To attach file to workflow

>>> self.rs.workflows.attach_files('11ed042d-1fcc-fdfe-b7ab-06933745a4d6','hostFinding','acceptance','test.csv','test.csv')
detach_files(workflowbatchuuid, attachmentuuids, workflowtype, subject, client_id=None)[source]

Detach a file from acceptance workflow

Parameters:
  • workflowbatchuuid (str) – Workflow UUID

  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • attachmentuuids (list) – Attchment UUID

  • client_id – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether detachment is done

Example

To detach files from workflow

self.rs.workflows.detach_files_acceptance(‘11ed042d-1fcc-fdfe-b7ab-06933745a4d6’,[“bfe66d56-b7da-4577-a86f-da5283505ea7”],’hostFinding’)

Parameters:

workflowtype (str) –

reject_acceptance(filter_request, description, csvdump=False, client_id=None)[source]

Reject an acceptance request.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • description (str) – A description of the rejection.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To perform a reject acceptance request for a workflow filter RA#0000028

>>>  self.rs.workflows.reject_acceptance([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000028"}],'needed to test')

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>>  self.rs.workflows.reject_acceptance([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000028"}],'needed to test',csvdump=True)
reject_false_positive(filter_request, description, csvdump=False, client_id=None)[source]

Reject a false positive request.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • description (str) – A description of the rejection.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To perform a reject false positive request for a workflow FP#0000020

>>>  self.rs.workflows.reject_false_positive([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"FP#0000020"}],'needed to test')

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>>  self.rs.workflows.reject_false_positive([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"FP#0000020"}],'needed to test',csvdump=True)
reject_remediation(filter_request, description, csvdump=False, client_id=None)[source]

Reject a remediation request.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • description (str) – A description of the rejection.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To perform a reject remediation request for a workflow RM#0000044

>>>  self.rs.workflows.reject_remediation([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RM#0000044"}],'needed to test')

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>>  self.rs.workflows.reject_remediation([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RM#0000044"}],'needed to test',csvdump=True)
reject_severity_change(filter_request, description, csvdump=False, client_id=None)[source]

Reject a severity change request.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • description (str) – A description of the rejection.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To perform a reject severity change request for a workflow SC#0000061

>>>  self.rs.workflows.reject_severity_change([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"SC#0000061"}],'needed to test')

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>>  self.rs.workflows.reject_severity_change([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"SC#0000061"}],'needed to test',csvdump=True)
rework_acceptance(filter_request, description, csvdump=False, client_id=None)[source]

Request a rework of an acceptance.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • description (str) – A description of the rework.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To rework an acceptance request RA#0000027

>>> self.rs.workflows.rework_acceptance([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000027"}],'needed to test')

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>> self.rs.workflows.rework_acceptance([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000027"}],'needed to test',csvdump=True)
rework_false_positive(filter_request, description, csvdump=False, client_id=None)[source]

Request a rework of a false positive.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • description (str) – A description of the rework.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To rework an false positive request FP#0000019

>>> self.rs.workflows.rework_false_positive([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"FP#0000019"}],'needed to test')

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>> self.rs.workflows.rework_false_positive([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"FP#0000019"}],'needed to test',csvdump=True)
rework_remediation(filter_request, description, csvdump=False, client_id=None)[source]

Request a rework of a remediation.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • description (str) – A description of the rework.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To rework an remediation request RM#0000043

>>> self.rs.workflows.rework_remediation([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RM#0000043"}],'needed to test')

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>> self.rs.workflows.rework_remediation([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RM#0000043"}],'needed to test',csvdump=True)
rework_severity_change(filter_request, description, csvdump=False, client_id=None)[source]

Request a rework of a severity change.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • description (str) – A description of the rework.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To rework a severity change request SC#0000027

>>> self.rs.workflows.rework_severity_change([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"SC#0000027"}],'needed to test')

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>> self.rs.workflows.rework_severity_change([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"SC#0000027"}],'needed to test',csvdump=True)
approve_acceptance(filter_request, override_exp_date=False, expiration_date=datetime.date(2023, 2, 22), csvdump=False, client_id=None)[source]

Approve a acceptance request.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • override_exp_date (bool) – True/False indicating whether or not an expiration date should be overridden.

  • expiration_date (str) – An expiration date for the approval. Should be in “YYYY-MM-DD” format.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To approve an acceptance request RA#0000028

>>> self.rs.workflows.approve_acceptance([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000028"}])

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>> self.rs.workflows.approve_acceptance([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RA#0000028"}],csvdump=True)
approve_false_positive(filter_request, override_exp_date=False, expiration_date=datetime.date(2023, 2, 22), csvdump=False, client_id=None)[source]

Approve a false positive change request.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • override_exp_date (bool) – True/False indicating whether or not an expiration date should be overridden.

  • expiration_date (str) – An expiration date for the approval. Should be in “YYYY-MM-DD” format.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To approve a false positive request FP#0000020

>>> self.rs.workflows.approve_false_positive([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"FP#0000020"}])

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>> self.rs.workflows.approve_false_positive([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"FP#0000020"}],csvdump=True)
approve_remediation(filter_request, override_exp_date=False, expiration_date=datetime.date(2023, 2, 22), csvdump=False, client_id=None)[source]

Approve a remediation request.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • override_exp_date (bool) – True/False indicating whether or not an expiration date should be overridden.

  • expiration_date (str) – An expiration date for the approval. Should be in “YYYY-MM-DD” format.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To approve an remediation request RM#0000044

>>> self.rs.workflows.approve_remediation([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RM#0000044"}])

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>> self.rs.workflows.approve_remediation([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"RM#0000044"}],csvdump=True)
approve_severity_change(filter_request, override_exp_date=False, expiration_date=datetime.date(2023, 2, 22), csvdump=False, client_id=None)[source]

Approve a severity change request.

Parameters:
  • filter_request (list) – A list of dictionaries containing filter parameters.

  • override_exp_date (bool) – True/False indicating whether or not an expiration date should be overridden.

  • expiration_date (str) – An expiration date for the approval. Should be in “YYYY-MM-DD” format.

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

int

Returns:

The job ID from the platform is returned.

Example

To approve an severity change request SC#0000061

>>> self.rs.workflows.approve_severity_change([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"SC#0000061"}])

Note

You can also dump the job id in a csv using:obj:csvdump=True argument

>>> self.rs.workflows.approve_severity_change([{"field":"generated_id","exclusive":False,"operator":"IN","orWithPrevious":False,"implicitFilters":[],"value":"SC#0000061"}],csvdump=True)
update_acceptance_workflow(workflowBatchUuid, name, expirationDate, description, reason, compensatingControl, overrideControl='AUTHORIZED', csvdump=False, client_id=None)[source]

Update an acceptance workflow.

Parameters:
  • workflowBatchUuid (str) – Workflow UUID

  • name (str) – Workflow name

  • expirationDate (str) – An expiration date for the approval. Should be in “YYYY-MM-DD” format.

  • description (str) – A description of the rejection.

  • reason (str) – A reason for the rejection.

  • compensatingControl (str) – A description of compensating controls applied to this finding. Option available : (“DLP”, “Deemed not exploitable”, “Endpoint Security”, “IDS/IPS”, “MFA Enforced”, “Multiple: See Description”, “Network Firewall”, “Network Segmentation”, “Other: See Description”, “Web Application Firewall” or “NONE”)

  • overrideControl (str) – A description of override controls applied to this finding. Option available : (‘NONE’, ‘AUTHORIZED’)

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

dict

Returns:

The jsonified response.

Example

To update an acceptance workflow of uuid 11ed0429-4937-f454-b7ab-06933745a4d6

>>> self.rs.workflows.update_acceptance_workflow("11ed0429-4937-f454-b7ab-06933745a4d6","testin","2022-07-31","testingforupdate","testing","NONE")

Note

You can also dump the search based data in a csv by simply providing csvdump=True argument

>>> self.rs.workflows.update_acceptance_workflow("11ed0429-4937-f454-b7ab-06933745a4d6","testin","2022-07-31","testingforupdate","testing","NONE",csvdump=True)
update_falsepositive_workflow(workflowBatchUuid, name, expirationDate, description, reason, compensatingControl, overrideControl='AUTHORIZED', csvdump=False, client_id=None)[source]

Update a false positive workflow.

Parameters:
  • workflowBatchUuid (str) – Workflow UUID

  • name (str) – Workflow name

  • expirationDate (str) – An expiration date for the approval. Should be in “YYYY-MM-DD” format.

  • description (str) – A description of the rejection.

  • reason (str) – A reason for the rejection.

  • compensatingControl (str) – A description of compensating controls applied to this finding. Option available : (“DLP”, “Deemed not exploitable”, “Endpoint Security”, “IDS/IPS”, “MFA Enforced”, “Multiple: See Description”, “Network Firewall”, “Network Segmentation”, “Other: See Description”, “Web Application Firewall” or “NONE”)

  • overrideControl (str) – A description of override controls applied to this finding. Option available : (‘NONE’, ‘AUTHORIZED’)

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

dict

Returns:

The jsonified response.

Example

To Update a false positive workflow of uuid 11ed0429-4937-f454-b7ab-06933745a4d6

>>> self.rs.workflows.update_falsepositive_workflow("11ed0429-4937-f454-b7ab-06933745a4d6","testin","2022-07-31","testingforupdate","testing","NONE")

Note

You can also dump the search based data in a csv by simply providing csvdump=True argument

>>> self.rs.workflows.update_falsepositive_workflow("11ed0429-4937-f454-b7ab-06933745a4d6","testin","2022-07-31","testingforupdate","testing","NONE",csvdump=True)
update_remediation_workflow(workflowBatchUuid, name, expirationDate, description, reason, compensatingControl, overrideControl='AUTHORIZED', csvdump=False, client_id=None)[source]

Update a remediation workflow.

Parameters:
  • workflowBatchUuid (str) – Workflow UUID

  • name (str) – Workflow name

  • expirationDate (str) – An expiration date for the approval. Should be in “YYYY-MM-DD” format.

  • description (str) – A description of the rejection.

  • reason (str) – A reason for the rejection.

  • compensatingControl (str) – A description of compensating controls applied to this finding. Option available : (“DLP”, “Deemed not exploitable”, “Endpoint Security”, “IDS/IPS”, “MFA Enforced”, “Multiple: See Description”, “Network Firewall”, “Network Segmentation”, “Other: See Description”, “Web Application Firewall” or “NONE”)

  • overrideControl (str) – A description of override controls applied to this finding. Option available : (‘NONE’, ‘AUTHORIZED’)

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

dict

Returns:

The jsonified response.

Example

To update an remediation workflow of uuid 11ed0429-4937-f454-b7ab-06933745a4d6

>>> self.rs.workflows.update_remediation_workflow("11ed0429-4937-f454-b7ab-06933745a4d6","testin","2022-07-31","testingforupdate","testing","NONE")

Note

You can also dump the search based data in a csv by simply providing csvdump=True argument

>>> self.rs.workflows.update_remediation_workflow("11ed0429-4937-f454-b7ab-06933745a4d6","testin","2022-07-31","testingforupdate","testing","NONE",csvdump=True)
update_severitychange_workflow(workflowBatchUuid, name, expirationDate, description, reason, severity, compensatingControl, overrideControl='AUTHORIZED', csvdump=False, client_id=None)[source]

Update an severity change workflow.

Parameters:
  • workflowBatchUuid (str) – Workflow UUID

  • name (str) – Workflow name

  • expirationDate (str) – An expiration date for the approval. Should be in “YYYY-MM-DD” format.

  • description (str) – A description of the rejection.

  • reason (str) – A reason for the rejection.

  • severity (str) – Severity change value

  • compensatingControl (str) – A description of compensating controls applied to this finding. Option available : (“DLP”, “Deemed not exploitable”, “Endpoint Security”, “IDS/IPS”, “MFA Enforced”, “Multiple: See Description”, “Network Firewall”, “Network Segmentation”, “Other: See Description”, “Web Application Firewall” or “NONE”)

  • overrideControl (str) – A description of override controls applied to this finding. Option available : (‘NONE’, ‘AUTHORIZED’)

  • csvdump (bool) – dumps the data in csv

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

dict

Returns:

The jsonified response.

Example

To update a severity change workflow of uuid 11ed0429-4937-f454-b7ab-06933745a4d6

>>> self.rs.workflows.update_severitychange_workflow("11ed0429-4937-f454-b7ab-06933745a4d6","testin","5","2022-07-31","testingforupdate","testing","NONE")

Note

You can also dump the search based data in a csv by simply providing csvdump=True argument

>>> self.rs.workflows.update_severitychange_workflow("11ed0429-4937-f454-b7ab-06933745a4d6","testin","5","2022-07-31","testingforupdate","testing","NONE",csvdump=True)
map_findings_acceptance(subject, filter_request, workflowuuid, workflowtype='acceptance', client_id=None)[source]

Map findings to an acceptance workflow for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • filter_request (list) – A list of dictionaries containing filter parameters.

  • workflowuuid (str) – Workflow Name

  • workflowtype (str) – By default acceptance

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To map acceptance workflow to findings

>>> self.rs.workflows.map_findings_acceptance("hostFinding",[{"field":"id","exclusive":False,"operator":"IN","value":"235141285"}],"11ed123b-9d8f-a2f1-b7ab-06933745a4d6")
map_findings_severitychange(subject, filter_request, workflowuuid, workflowtype='severityChange', client_id=None)[source]

Map findings to an severity change workflow for applicationFindings / hostfFindings as defined in the filter_request parameter.

Parameters:
  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • filter_request (list) – A list of dictionaries containing filter parameters.

  • workflowuuid (str) – Workflow Name

  • workflowtype (str) – By default severity change

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To map severity change workflow to findings

>>> self.rs.workflows.map_findings_severitychange("hostFinding",[{"field":"id","exclusive":False,"operator":"IN","value":"235141285"}],"11ed123b-9d8f-a2f1-b7ab-06933745a4d6")
map_findings_falsepositive(subject, filter_request, workflowuuid, workflowtype='falsePositive', client_id=None)[source]

Map findings to an false positive workflow for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • filter_request (list) – A list of dictionaries containing filter parameters.

  • workflowuuid (str) – Workflow Name

  • workflowtype (str) – By default false positive

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To map false positive workflow to findings

>>> self.rs.workflows.map_findings_falsepositive("hostFinding",[{"field":"id","exclusive":False,"operator":"IN","value":"235141285"}],"11ed123b-9d8f-a2f1-b7ab-06933745a4d6")
map_findings_remediation(subject, filter_request, workflowuuid, workflowtype='remediation', client_id=None)[source]

Map findings to an remediation workflow for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • filter_request (list) – A list of dictionaries containing filter parameters.

  • workflowuuid (str) – Workflow Name

  • workflowtype (str) – By default remediation

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To map remediation workflow to findings

>>> self.rs.workflows.map_findings_remediation("hostFinding",[{"field":"id","exclusive":False,"operator":"IN","value":"235141285"}],"11ed123b-9d8f-a2f1-b7ab-06933745a4d6")
unmap_findings_acceptance(subject, filter_request, workflowuuid, workflowtype='acceptance', client_id=None)[source]

Unmap findings to an acceptance workflow for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • filter_request (list) – A list of dictionaries containing filter parameters.

  • workflowuuid (str) – Workflow Name

  • workflowtype (str) – By default acceptance

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To unmap findings to workflow

>>> self.rs.workflows.unmap_findings_acceptance('hostFinding',[{"field":"id","exclusive":False,"operator":"IN","value":"232927123,178257910"}],'11ed0429-4937-f454-b7ab-06933745a4d6')
unmap_findings_severitychange(subject, filter_request, workflowuuid, workflowtype='severityChange', client_id=None)[source]

Unmap findings to a severity change workflow for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • filter_request (list) – A list of dictionaries containing filter parameters.

  • workflowuuid (str) – Workflow Name

  • workflowtype (str) – By default acceptance

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To unmap findings to workflow

>>> self.rs.workflows.unmap_findings_severitychange('hostFinding',[{"field":"id","exclusive":False,"operator":"IN","value":"232927123,178257910"}],'11ed0429-4937-f454-b7ab-06933745a4d6')
unmap_findings_falsepositive(subject, filter_request, workflowuuid, workflowtype='falsePositive', client_id=None)[source]

Unmap findings to a false positive workflow for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • filter_request (list) – A list of dictionaries containing filter parameters.

  • workflowuuid (str) – Workflow Name

  • workflowtype (str) – By default false positive

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To unmap findings to workflow

>>> self.rs.workflows.unmap_findings_falsepositive('hostFinding',[{"field":"id","exclusive":False,"operator":"IN","value":"232927123,178257910"}],'11ed0429-4937-f454-b7ab-06933745a4d6')
unmap_findings_remediation(subject, filter_request, workflowuuid, workflowtype='remediation', client_id=None)[source]

Unmap findings to a remediation workflow for applicationFindings / hostFindings as defined in the filter_request parameter.

Parameters:
  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • filter_request (list) – A list of dictionaries containing filter parameters.

  • workflowuuid (str) – Workflow Name

  • workflowtype (str) – By default remediation

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether request occured

Example

To unmap findings to workflow

>>> self.rs.workflows.unmap_findings_remediation('hostFinding',[{"field":"id","exclusive":False,"operator":"IN","value":"232927123,178257910"}],'11ed0429-4937-f454-b7ab-06933745a4d6')
get_attachments_acceptance(workflowbatchuuid, subject, client_id=None)[source]

Get attachments from an acceptance workflow

Parameters:
  • workflowbatchuuid (str) – Workflowbatch uuid

  • subject (str) – Subject whether hostFinding or applicationFinding

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Example

To use attachment function

>>> self.rs.workflows.get_attachments_acceptance('11ed0429-4937-f454-b7ab-06933745a4d6','hostFinding')
get_attachments_severitychange(workflowbatchuuid, subject, client_id=None)[source]

Get attachments from a severity change workflow

Parameters:
  • workflowbatchuuid (str) – Workflowbatch uuid

  • subject (str) – Subject whether hostFinding or applicationFinding

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Example

To use attachment function

>>> self.rs.workflows.get_attachments_severitychange('11ed0429-4937-f454-b7ab-06933745a4d6','hostFinding')
get_attachments_remediation(workflowbatchuuid, subject, client_id=None)[source]

Get attachments from a remediation workflow

Parameters:
  • workflowbatchuuid (str) – Workflowbatch uuid

  • subject (str) – Subject whether hostFinding or applicationFinding

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Example

>>> self.rs.workflows.get_attachments_remediation('11ed0429-4937-f454-b7ab-06933745a4d6','hostFinding')
get_attachments_falsepositive(workflowbatchuuid, subject, client_id=None)[source]

Get attachments from a false positive workflow

Parameters:
  • workflowbatchuuid (str) – Workflowbatch uuid

  • subject (str) – Subject whether hostFinding or applicationFinding

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Example

To use attachment function

>>> self.rs.workflows.get_attachments_falsepositive('11ed0429-4937-f454-b7ab-06933745a4d6','hostFinding')
download_workflowbatch_attachments_acceptance(fileuuid, subject, workflowcategory='CLOSE_REQUEST', client_id=None)[source]

Download attachments from an acceptance workflow

Parameters:
  • fileuuid (str) – File uuid

  • subject (str) – Subject whether hostFinding or applicationFinding

  • workflowcategory (str) – Workflow category either CLOSE_REQUEST or CHANGE_REQUEST

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success

Example

To download workflowbatch attachments for hostfindings

>>> self.rs.workflows.download_workflowbatch_attachments_acceptance('test123','hostFinding')
download_workflowbatch_attachments_severitychange(fileuuid, subject, workflowcategory='CLOSE_REQUEST', client_id=None)[source]

Download attachments from an severity change workflow

Parameters:
  • fileuuid (str) – File uuid

  • subject (str) – Subject whether hostFinding or applicationFinding

  • workflowcategory (str) – Workflow category either CLOSE_REQUEST or CHANGE_REQUEST

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success

Example

To download workflowbatch attachments for hostfindings

>>> self.rs.workflows.download_workflowbatch_attachments_severitychange('test123','hostFinding')
download_workflowbatch_attachments_falsepositive(fileuuid, subject, workflowcategory='CLOSE_REQUEST', client_id=None)[source]

Download attachments from an False positive workflow

Parameters:
  • fileuuid (str) – File uuid

  • subject (str) – Subject whether hostFinding or applicationFinding

  • workflowcategory (str) – Workflow category either CLOSE_REQUEST or CHANGE_REQUEST

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success

Example

To download workflowbatch attachments for hostfindings

>>> self.rs.workflows.download_workflowbatch_attachments_falsepositive('test123','hostFinding')
download_workflowbatch_attachments_remediation(fileuuid, subject, workflowcategory='CLOSE_REQUEST', client_id=None)[source]

Download attachments from an remediation workflow

Parameters:
  • fileuuid (str) – File uuid

  • subject (str) – Subject whether hostFinding or applicationFinding

  • workflowcategory (str) – Workflow category either CLOSE_REQUEST or CHANGE_REQUEST

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success

Example

To download workflowbatch attachments for hostfindings

>>> self.rs.workflows.download_workflowbatch_attachments_remediation('test123','hostFinding')
attach_files_acceptance(workflowbatchuuid, subject, file_name, path_to_file, client_id=None)[source]

Attach an acceptance file to workflow

Parameters:
  • workflowbatchuuid (str) – Workflow UUID

  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • file_name (str) – The name to be used for the uploaded file.

  • path_to_file (str) – Full path to the file to be uploaded.

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether attachment is done

Example

To attach file to workflow

>>> self.rs.workflows.attach_files_acceptance('11ed042d-1fcc-fdfe-b7ab-06933745a4d6','hostFinding','test.csv','test.csv')
attach_files_remediation(workflowbatchuuid, subject, file_name, path_to_file, client_id=None)[source]

Attach a file to remediation workflow

Parameters:
  • workflowbatchuuid (str) – Workflow UUID

  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • file_name (str) – The name to be used for the uploaded file.

  • path_to_file (str) – Full path to the file to be uploaded.

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether attachment is done

Example

To attach file to workflow

>>> self.rs.workflows.attach_files_remediation('11ed042d-1fcc-fdfe-b7ab-06933745a4d6','hostFinding','test.csv','test.csv')
attach_files_falsepositive(workflowbatchuuid, subject, file_name, path_to_file, client_id=None)[source]

Attach a file to false positive workflow

Parameters:
  • workflowbatchuuid (str) – Workflow UUID

  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • file_name (str) – The name to be used for the uploaded file.

  • path_to_file (str) – Full path to the file to be uploaded.

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether attachment is done

Example

To attach file to workflow

>>> self.rs.workflows.attach_files_falsepositive('11ed042d-1fcc-fdfe-b7ab-06933745a4d6','hostFinding','test.csv','test.csv')
attach_files_severitychange(workflowbatchuuid, subject, file_name, path_to_file, client_id=None)[source]

Attach a file to severiy change workflow

Parameters:
  • workflowbatchuuid (str) – Workflow UUID

  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • file_name (str) – The name to be used for the uploaded file.

  • path_to_file (str) – Full path to the file to be uploaded.

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether attachment is done=

Example

To attach file to workflow

>>> self.rs.workflows.attach_files_severitychange('11ed042d-1fcc-fdfe-b7ab-06933745a4d6','hostFinding','test.csv','test.csv')
detach_files_acceptance(workflowbatchuuid, attachmentuuids, subject, client_id=None)[source]

Detach a file from acceptance workflow

Parameters:
  • workflowbatchuuid (str) – Workflow UUID

  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • attachmentuuids (list) – Attchment UUID

  • client_id – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether detachment is done

Example

To detach files from workflow

>>> self.rs.workflows.detach_files_acceptance('11ed042d-1fcc-fdfe-b7ab-06933745a4d6',["bfe66d56-b7da-4577-a86f-da5283505ea7"],'hostFinding')
detach_files_falsepositive(workflowbatchuuid, attachmentuuids, subject, client_id=None)[source]

Detach files from false positive workflow

Parameters:
  • workflowbatchuuid (str) – Workflow UUID

  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • attachmentuuids (list) – Attchment UUID

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether detachment is done

Example

To detach files from workflow

>>> self.rs.workflows.detach_files_falsepositive( "11ed042d-006c-358a-b7ab-06933745a4d6",[  "a59fd436-b2ba-46f9-9962-ea227426532d"],'hostFinding')
detach_files_remediation(workflowbatchuuid, attachmentuuids, subject, client_id=None)[source]

Detach files from remediation workflow

Parameters:
  • workflowbatchuuid (str) – Workflow UUID

  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • attachmentuuids (list) – Attchment UUID

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether detachment is done

Example

To detach files from workflow

>>> self.rs.workflows.detach_files_remediation( "11ed042d-1fcc-fdfe-b7ab-06933745a4d6",[   "95e082c9-b4f6-46ce-baab-538375db85d2"],'hostFinding')
detach_files_severitychange(workflowbatchuuid, attachmentuuids, subject, client_id=None)[source]

Detach files from severity change workflow

Parameters:
  • workflowbatchuuid (str) – Workflow UUID

  • subject (str) – Finding type. Possible options : (“hostFinding” or “applicationFinding”)

  • attachmentuuids (list) – Attchment UUID

  • client_id (typing.Optional[int]) – Client ID. If an ID isn’t passed, will use the profile’s default Client ID.

Return type:

bool

Returns:

Success whether detachment is done

Example

To detach files from workflow

>>> self.rs.workflows.detach_files_severitychange('11ed042d-15bb-90f6-b7ab-06933745a4d6',[ "c4e992e7-f911-442e-92cf-b8db003eafdb"],'hostFinding')