IBM QRadar SOAR

IBM QRadar

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  resilient-circuits codegen not working as resilient tutorial video

    Posted Thu July 16, 2020 06:04 AM

    Following by IBM security learning academy`s resilient tutorial video (Resilient Developer's Corner - Integration First Steps - https://www.securitylearningacademy.com/course/view.php?id=4644 ) to use resilient-circuits codegen to automate the generation of Python integration code, it failed to comply to generate the python template code (tox.ini, setup.py, __init__.py, funct_calc_sum.py, and etc). I am wondering how to fix it as what it did from the video tutorial. Thanks in advances. 

    resilient-circuits codegen -p calculator -m fn_calc -f calc_sum --workflow calc_sum --rule "calc: sum"

    [Screenshot from the video tutorials]

     


    Warning / Errors Response
    Unverified HTTPS requests (cafile=false).
    Traceback (most recent call last):
    File "/home/integration/resilient/bin/resilient-circuits", line 10, in <module>
    sys.exit(main())
    File "/home/integration/resilient/lib/python2.7/site-packages/resilient_circuits/bin/resilient_circuits_cmd.py", line 691, in main
    generate_code(args)
    File "/home/integration/resilient/lib/python2.7/site-packages/resilient_circuits/bin/resilient_circuits_cmd.py", line 303, in generate_code
    os.path.expanduser(output_base))
    File "/home/integration/resilient/lib/python2.7/site-packages/resilient_circuits/util/resilient_codegen.py", line 823, in codegen_package
    output_dir, None, False)
    File "/home/integration/resilient/lib/python2.7/site-packages/resilient_circuits/util/resilient_codegen.py", line 370, in codegen_from_template
    client.post(latest_export_uri, {"layouts": True, "actions": True, "phases_and_tasks": True})
    File "/home/integration/resilient/lib/python2.7/site-packages/resilient/co3.py", line 308, in post
    _raise_if_error(ex.get_response())
    File "/home/integration/resilient/lib/python2.7/site-packages/resilient/co3.py", line 171, in _raise_if_error
    raise SimpleHTTPException(response)
    resilient.co3.SimpleHTTPException: Internal Server Error: {"success":false,"title":null,"message":"Internal Server Error","hints":[],"error_code":"generic"}

    References for Resilience `s package, function, workflow, and rules (Under Resilient web console)

    resilient-circuits codegen -p calculator -m fn_calc -f calc_sum --workflow calc_sum --rule "calc: sum"
    message destination : -m fn_calc

    Funcitons: -f calc_cum


    Workflow: --workflow calc_sum

    Rule: --rule "calc: sum"


    ------------------------------
    Ivan To
    ------------------------------


  • 2.  RE: resilient-circuits codegen not working as resilient tutorial video

    Posted Fri July 17, 2020 11:03 AM
    Hi resilient-cicruits codegen capability has been depricated and this functionality can now be found in 'resilient-sdk'.

    pip install resilient-sdk ...

    ]# resilient-sdk --help
    usage:
    $ resilient-sdk <subcommand> ...
    $ resilient-sdk -v <subcommand> ...
    $ resilient-sdk -h


    Python SDK for developing Resilient Apps

    optional arguments:
    -h, --help show this help message and exit
    -v, --verbose Set the log level to DEBUG

    subcommands:
    one of these subcommands must be provided


    codegen Generate boilerplate code to start developing an app
    docgen Generate documentation for an app
    extract Extract data in order to publish a .res file
    package Package an integration into a Resilient app

    For support, please visit ibm.biz/resilientcommunity

    ------------------------------
    John Quirke
    ------------------------------

    ------------------------------
    John Quirke
    ------------------------------



  • 3.  RE: resilient-circuits codegen not working as resilient tutorial video

    Posted Thu July 23, 2020 12:26 AM
    Edited by Jared Fagel Thu July 23, 2020 12:27 AM
    @John Quirke where did you see that this was deprecated?​

    I do see that resilient-sdk is now used in the V37 documentation, but I don't see it in the "What's new" notes anywhere, nor was the Developer site updated with that information that I can find. V37 also didn't have a "Resilient IRP Function Developer Guide" published.


    ------------------------------
    Jared Fagel
    Cyber Security Analyst I
    Public Utility
    ------------------------------



  • 4.  RE: resilient-circuits codegen not working as resilient tutorial video

    Posted Sun July 19, 2020 03:24 PM
    Hi @Ivan To,

    There is awesome webinar about codegen here. ​

    Best

    ------------------------------
    Jasmine
    ------------------------------