<?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: Group By Host in Filtered XQL Query in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-by-host-in-filtered-xql-query/m-p/580363#M6327</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/286608"&gt;@tporritt&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for reaching out on LiveCommunity!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can simply use below command as a sample:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;dataset = va_endpoints&lt;BR /&gt;| arrayexpand cves &lt;BR /&gt;|filter cves in("CVE-2022-3515","CVE-2022-3491","CVE-2022-34903")&lt;BR /&gt;|comp list(cves) by endpoint_name&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you feel this has answered your query, please let us know by clicking on "mark this as a Solution". Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2024 09:15:36 GMT</pubDate>
    <dc:creator>aspatil</dc:creator>
    <dc:date>2024-03-14T09:15:36Z</dc:date>
    <item>
      <title>Group By Host in Filtered XQL Query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-by-host-in-filtered-xql-query/m-p/580277#M6320</link>
      <description>&lt;P&gt;What I want to do is generate a report showing the filtered list of CVEs on each host, multiple CVEs would show up in a single field concatenated with commas or semi-colons&lt;/P&gt;
&lt;P&gt;dataset = va_endpoints&lt;BR /&gt;|arrayexpand cves&lt;BR /&gt;| filter CVES in (&lt;BR /&gt;"CVE-2019-2725", "CVE-2018-7600", "CVE-2021-44228", "CVE-2019-1653, &amp;lt;75 more CVEs&amp;gt;&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So the current output looks like this (shortened):&lt;BR /&gt;endpoint_name host_count cve_name &lt;BR /&gt;host1 3 CVE-2019-2725 &lt;BR /&gt;host2 3 CVE-2019-2725 &lt;BR /&gt;host3 3 CVE-2019-2725 &lt;BR /&gt;host2 2 CVE-2018-7600 &lt;BR /&gt;host3 2 CVE-2018-7600 &lt;BR /&gt;host3 1 CVE-2021-44228&lt;/P&gt;
&lt;P&gt;It produces a report that lists each cve/endpoint combination, I was hoping to have the endpoint with the CVEs in a single field.&lt;BR /&gt;I see another thread (&lt;A href="https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/summarise-xql-results-by-hostname/m-p/569930#M5739" target="_self"&gt;here&lt;/A&gt;) that says to use comp count but when I use it as "comp count(CVES) as Total_CVE_per_host by endpoint_name, CVES" I get one line per host/cve combination&lt;BR /&gt;I don't see how I can concatenate all the CVEs into a single field. Would the 'addrawdata' somehow be the answer?&lt;/P&gt;
&lt;P&gt;Something like this (I could even give up the counts and just do host/cves):&lt;BR /&gt;endpoint_name cve_name &lt;BR /&gt;host1 CVE-2019-2725 &lt;BR /&gt;host2 CVE-2019-2725,CVE-2018-7600 &lt;BR /&gt;host3 CVE-2019-2725,CVE-2018-7600,CVE-2021-44228&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 20:24:25 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-by-host-in-filtered-xql-query/m-p/580277#M6320</guid>
      <dc:creator>tporritt</dc:creator>
      <dc:date>2024-03-13T20:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Group By Host in Filtered XQL Query</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-by-host-in-filtered-xql-query/m-p/580363#M6327</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/286608"&gt;@tporritt&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for reaching out on LiveCommunity!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can simply use below command as a sample:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;dataset = va_endpoints&lt;BR /&gt;| arrayexpand cves &lt;BR /&gt;|filter cves in("CVE-2022-3515","CVE-2022-3491","CVE-2022-34903")&lt;BR /&gt;|comp list(cves) by endpoint_name&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you feel this has answered your query, please let us know by clicking on "mark this as a Solution". Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 09:15:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/group-by-host-in-filtered-xql-query/m-p/580363#M6327</guid>
      <dc:creator>aspatil</dc:creator>
      <dc:date>2024-03-14T09:15:36Z</dc:date>
    </item>
  </channel>
</rss>

