<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Setting a pre-processing rule in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/setting-a-pre-processing-rule/m-p/546006#M2231</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/242705"&gt;@YilmazDincer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is that field not mapped and available in incident fields? If so, you can use filters. If you cannot use an incident field, you can achieve this by using a pre-processing script as below. If the script returns False, the incident will be dropped. This script assumes that the list is saved as a string. If it is already a list, you can eliminate the split part. The field name for the tags is assumed&amp;nbsp;&lt;STRONG&gt;tags.&amp;nbsp;&lt;/STRONG&gt;Feel free to edit the script according to your environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;try:
    tags =  demisto.incidents()[0]["CustomFields"]["tags"].split(",")
    for tag in tags:
        count = 0
        if "malware" in tag:
            count+=1
    if count &amp;gt; 0:
        demisto.results(False)
    else:
        demise.results(True)

except:
    demise.results(True)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I hope my answer helps.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2023 11:29:46 GMT</pubDate>
    <dc:creator>gyldz</dc:creator>
    <dc:date>2023-06-14T11:29:46Z</dc:date>
    <item>
      <title>Setting a pre-processing rule</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/setting-a-pre-processing-rule/m-p/545977#M2229</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;In a list field, I want to go through all indexes one by one and if there is *malware* in all indexes(malware execution, malware alert, malware), I want to drop it. However, I could not edit this in the "Conditions for Incoming Incident" field. &lt;BR /&gt;For example, how can I do it, considering that we have "tag" field?&lt;BR /&gt;"tag Contains malware" like that.&lt;/P&gt;
&lt;P&gt;tag data is ['malware execution','malware alert', 'malware'].&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 08:26:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/setting-a-pre-processing-rule/m-p/545977#M2229</guid>
      <dc:creator>YilmazDincer</dc:creator>
      <dc:date>2023-06-14T08:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Setting a pre-processing rule</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/setting-a-pre-processing-rule/m-p/546006#M2231</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/242705"&gt;@YilmazDincer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is that field not mapped and available in incident fields? If so, you can use filters. If you cannot use an incident field, you can achieve this by using a pre-processing script as below. If the script returns False, the incident will be dropped. This script assumes that the list is saved as a string. If it is already a list, you can eliminate the split part. The field name for the tags is assumed&amp;nbsp;&lt;STRONG&gt;tags.&amp;nbsp;&lt;/STRONG&gt;Feel free to edit the script according to your environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;try:
    tags =  demisto.incidents()[0]["CustomFields"]["tags"].split(",")
    for tag in tags:
        count = 0
        if "malware" in tag:
            count+=1
    if count &amp;gt; 0:
        demisto.results(False)
    else:
        demise.results(True)

except:
    demise.results(True)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I hope my answer helps.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 11:29:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/setting-a-pre-processing-rule/m-p/546006#M2231</guid>
      <dc:creator>gyldz</dc:creator>
      <dc:date>2023-06-14T11:29:46Z</dc:date>
    </item>
  </channel>
</rss>

