Cortex host insight Vulnerability Assessment average severity score

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cortex host insight Vulnerability Assessment average severity score

L0 Member

trying to find XQL query that will take all of our severity scores and give us a average and send that to report. I cant seem find the dataset 

Not very good with XQL at this time. maybe someone from the community can help

dataset = host_inventory
| filter 0 is not null and array_length(vulnerabilities) > 0 
| alter vulnerability_scores = array_map(vulnerabilities, vulnerability -> case(
vulnerability.severity == "Critical", 10,
vulnerability.severity == "High", 7,
vulnerability.severity == "Medium", 5,
vulnerability.severity == "Low", 2,
vulnerability.cvss_score, vulnerability.cvss_score, 
0 // Default if severity is unknown
))
| alter average_severity_score = array_avg(vulnerability_scores)
| fields host_name, average_severity_score, timestamp
| sort timestamp desc

2 REPLIES 2

L2 Linker

Hi,

 

Thanks for joining Live Community.

 

You can try using the va_endpoint and va_cves datasets, and then filter as you need.

 

Example below short query:

 

|dataset = va_endpoints
| fields cves, endpoint_name, os_type, severity

 

If you need information on XQL, you can review below:

 

https://docs-cortex.paloaltonetworks.com/r/Cortex-XDR/Cortex-XDR-XQL-Language-Reference/Get-Started-...

https://docs-cortex.paloaltonetworks.com/r/Cortex-XQL-Schema-Reference-Guide/Introduction

LIVEcommunity - Cortex XDR Basic XQL Crash Course - LIVEcommunity - 544056

LIVEcommunity - Cortex XDR XQL Use Cases and Applications Crash Course - LIVEcommunity - 544228

 

If this post solves your inquiry, please mark As Solution.

Visit our Cortex XDR Customer Corner on Live Community to access resources for your product journey, engage in discussions with community members and subject matter experts, and register for upcoming events: Cortex XDR Customer Corner

L5 Sessionator

Hello,

 

Below query gives you the average by Endpoint name

dataset = va_endpoints
| filter cves != null
| fields cves , endpoint_name , severity , severity_score
| comp avg(severity_score) as Average_Severity_Score by endpoint_name

 

If you feel this has answered your query, please let us know by clicking like and on "mark this as a Solution". Thank you.

Ashutosh Patil
  • 232 Views
  • 2 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!