def apply_flag_to_ssl_support_scan( self, org_uuid=None, network_service_uuid=None, network_service_scan_uuid=None, flag_uuid=None, flag_type=None, order_uuid=None, ): """ Apply the given flag to the given SSL support scan. :param org_uuid: The UUID of the organization that owns the network service. :param network_service_uuid: The UUID of the network service that was scanned. :param network_service_scan_uuid: The UUID of the network service scan that this task is a part of. :param flag_uuid: The UUID of the flag to apply. :param flag_type: The type of flag to apply. :return: None """ logger.info("Now applying flag %s to ssl support scan %s." % (flag_uuid, network_service_scan_uuid)) flagger = DataFlagger.from_flag_uuid(flag_uuid=flag_uuid, flag_type=flag_type, db_session=self.db_session) flagger.filter_by_network_service_scan(network_service_scan_uuid) self.wait_for_es() flagger.apply_flag_to_organization(org_uuid=org_uuid) logger.info("Flag %s successfully applied to SSL support scan %s." % (flag_uuid, network_service_scan_uuid))
def apply_flag_to_ip_address_scan( self, org_uuid=None, ip_address_uuid=None, ip_address_scan_uuid=None, flag_uuid=None, flag_type=None, order_uuid=None, ): """ Apply the given flag to data collected during the given IP address scan. :param org_uuid: The UUID of the organization that flags are being applied for. :param ip_address_uuid: The UUID of the IP address that was scanned. :param ip_address_scan_uuid: The UUID of the IP address scan. :param flag_uuid: The UUID of the flag to apply. :param flag_type: The type of the flag being applied. :return: None """ logger.info( "Now applying flag %s to IP address scan %s." % (flag_uuid, ip_address_scan_uuid) ) flagger = DataFlagger.from_flag_uuid(flag_uuid=flag_uuid, flag_type=flag_type, db_session=self.db_session) flagger.filter_by_ip_address_scan(ip_address_scan_uuid) self.wait_for_es() flagger.apply_flag_to_organization(org_uuid=org_uuid) logger.info( "Flag %s successfully applied to IP address scan %s." % (flag_uuid, ip_address_scan_uuid) )
def apply_flag_to_web_service_scan( self, org_uuid=None, web_service_uuid=None, web_service_scan_uuid=None, flag_uuid=None, flag_type=None, order_uuid=None, ): """ Apply the given flag 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. :param flag_uuid: The UUID of the flag to apply. :param flag_type: The type of flag to apply. :return: None """ logger.info( "Now applying flag %s to web service scan %s." % (flag_uuid, web_service_scan_uuid) ) flagger = DataFlagger.from_flag_uuid(flag_uuid=flag_uuid, flag_type=flag_type, db_session=self.db_session) flagger.filter_by_web_service_scan(web_service_scan_uuid) self.wait_for_es() flagger.apply_flag_to_organization(org_uuid=org_uuid) logger.info( "Flag %s successfully applied to web service scan %s." % (flag_uuid, web_service_scan_uuid) )