IBM Security QRadar SOAR

 View Only
Expand all | Collapse all

execution of script failing on module import

  • 1.  execution of script failing on module import

    Posted Wed December 29, 2021 02:11 PM
    Trying to run script importing pagerduty librabry 'pdpyras' and getting error of illegal imports on line number 1. I 'pip3 install pdpyras' , what is missing ?

    import pdpyras
    routing_key = ''
    session = pdpyras.EventsAPISession(routing_key)
    dedup_key ='irek/test'
    session.trigger("Clean the server", 'dusty.old.server.net', dedup_key=dedup_key, severity='info')
    # ...
    session.acknowledge(dedup_key)​


    ------------------------------
    Irek Romaniuk
    ------------------------------


  • 2.  RE: execution of script failing on module import

    Posted Thu December 30, 2021 03:07 AM
    Irek, 
    For security reason, you cannot import any library in your script. This page lists the available libraries the SOAR platform allowed. https://www.ibm.com/docs/en/rsoa-and-rp/43?topic=scripts-python-2-python-3-differences.
    You can also check this pageduty app https://exchange.xforce.ibmcloud.com/hub/extension/fa382908c63d07952f8e6d68f55d7ba8 if it provides the function you needed.

    ------------------------------
    Gilbert Liao
    ------------------------------