> For the complete documentation index, see [llms.txt](https://docs.prismacloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prismacloud.io/content-collections/search-and-investigate/vulnerability-queries/vulnerability-query-examples.md).

# Vulnerability Query Examples

| **Description**                                               | **RQL**                                                                                                                                                                                                                      |
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Find all vulnerable assets across your workload.              | <p><code>vulnerability where asset.type = 'all'</code></p><p><code>vulnerability where asset.type IN ( 'Container Registry Image', 'Deployed Image', 'Host', 'IaC', 'Package', 'Serverless Function', 'VM Image')</code></p> |
| Find all vulnerabilities in Compute assets.                   | `vulnerability where source = 'compute'`                                                                                                                                                                                     |
| Find all vulnerabilities with critical and high severity.     | `vulnerability where severity IN ('Critical', 'High')`                                                                                                                                                                       |
| Find exploitable vulnerabilities.                             | `vulnerability where risk.factors IN('Exploitable')`                                                                                                                                                                         |
| Find vulnerable hosts that are reachable from the internet.   | `vulnerability where risk.factors IN('Reachable from the internet')`                                                                                                                                                         |
| Find all the vulnerabilities with a CVSS score of 10.         | `vulnerability where cvss.score = 10`                                                                                                                                                                                        |
| Identify if one of the assets is vulnerable to CVE-XXXX-XXXX. | `vulnerability where cve.id='CVE-XXXX-XXXX'`                                                                                                                                                                                 |
| Find all vulnerable packages across your workload.            | `vulnerability where asset.type IN ('Package')`                                                                                                                                                                              |
| Find packages that are vulnerable to a CVE-XXXX-XXXX.         | `vulnerability where asset.type IN ('Package') AND cve.id = 'CVE-2010-3082'`                                                                                                                                                 |
| Find vulnerable assets in CBDR (app lifecycle).               | `vulnerability where asset.lifecycle IN('Deploy','Build','Code','Run')`                                                                                                                                                      |
| Find vulnerable assets in runtime environment.                | \`vulnerability where asset.lifecycle = 'Run'                                                                                                                                                                                |
| Find vulnerabilities in a distro version.                     | `vulnerability where version='0.6.45-1ubuntu1.3'`                                                                                                                                                                            |
| Find Serverless functions with high vulnerability.            | `vulnerability where asset.type IN ( 'aws-ec2-describe-images', 'azure-compute-image', 'gcloud-compute-image') AND with : (Vuln where SEVERITY >= HIGH)`                                                                     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.prismacloud.io/content-collections/search-and-investigate/vulnerability-queries/vulnerability-query-examples.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
