def apply_flags_to_web_service_scan(
self,
org_uuid=None,
web_service_uuid=None,
web_service_scan_uuid=None,
order_uuid=None,
):
"""
Apply all of the relevant flags to the data collected during the given web service scan.
:param org_uuid: The UUID of the organization that flags are being applied for.
:param web_service_uuid: The UUID of the web service that was scanned.
:param web_service_scan_uuid: The UUID of the web service scan to update data for.
:return: None
"""
logger.info(
"Now applying flags to web service scan %s."
% (web_service_scan_uuid,)
)
flags = get_all_web_flags_for_organization(db_session=self.db_session, org_uuid=org_uuid)
if len(flags) == 0:
logger.info(
"No web flags found for organization %s."
% (org_uuid,)
)
return
task_sigs = []
for flag in flags:
flag_type = "default" if isinstance(flag, DefaultFlag) else "organization"
task_sigs.append(apply_flag_to_web_service_scan.si(
org_uuid=org_uuid,
web_service_uuid=web_service_uuid,
web_service_scan_uuid=web_service_scan_uuid,
flag_uuid=flag.uuid,
flag_type=flag_type,
order_uuid=order_uuid,
))
canvas_sig = chain(task_sigs)
self.finish_after(signature=canvas_sig)
#USED
评论列表
文章目录