<reponame>rudimeyer/resilient-community-apps
# -*- coding: utf-8 -*-

"""Generate the Resilient customizations required for fn_virustotal"""

from __future__ import print_function
from resilient_circuits.util import *

def codegen_reload_data():
    """Parameters to codegen used to generate the fn_virustotal package"""
    reload_params = {"package": u"fn_virustotal",
                    "incident_fields": [], 
                    "action_fields": [], 
                    "function_params": [u"artifact_id", u"attachment_id", u"incident_id", u"vt_data", u"vt_type"], 
                    "datatables": [], 
                    "message_destinations": [u"fn_virustotal"], 
                    "functions": [u"virustotal"], 
                    "phases": [], 
                    "automatic_tasks": [], 
                    "scripts": [], 
                    "workflows": [u"example_virustotal_scan", u"example_virustotal_scan_attachment"], 
                    "actions": [u"Example: Virus Total", u"Example: Virus Total for Attachments"] 
                    }
    return reload_params


def customization_data(client=None):
    """Produce any customization definitions (types, fields, message destinations, etc)
       that should be installed by `resilient-circuits customize`
    """

    # This import data contains:
    #   Function inputs:
    #     artifact_id
    #     attachment_id
    #     incident_id
    #     vt_data
    #     vt_type
    #   Message Destinations:
    #     fn_virustotal
    #   Functions:
    #     virustotal
    #   Workflows:
    #     example_virustotal_scan
    #     example_virustotal_scan_attachment
    #   Rules:
    #     Example: Virus Total
    #     Example: Virus Total for Attachments


    yield ImportDefinition(u"""
<KEY>
<KEY>
"""
    )