Vulnerability Management
Access Tenable One Cloud Exposure Workload Protection data programmatically to incorporate the data into existing workflows and third-party tools. These queries also return large amounts of data, bypassing the limits that apply in the console.
List vulnerability-related findings
This example shows a query that fetches open findings of types VirtualMachineOperatingSystemUnpatchedFinding and VirtualMachineVulnerabilityFinding, and returns the following properties for them: ID, Policy Name, Remediation Steps, Description, Resources Names, and Vulnerability IDs (if found in a VM).
query {
Findings(
filter: {
Statuses: [Open],
Types: [
VirtualMachineOperatingSystemUnpatchedFinding,
VirtualMachineVulnerabilityFinding
]}
first: 1
) {
edges {
node {
Id
Policy {Name}
Remediation {Console {Steps}}
Description
Resources {
Name
... on VirtualMachine {
Software {
Paths
}
Vulnerabilities {
Id
VprScore
VprSeverity
CvssScore
Sources{
Severity
Name
}
}
}
}
}
}
}
}Sample response
{
"data": {
"Findings": {
"edges": [
{
"node": {
"Id": "15e3a3bc-2347-4486-8dbe-1a7178a07199",
"Policy": {
"Name": "Virtual Machine has vulnerabilities"
},
"Remediation": {
"Console": {
"Steps": "Review the finding in the console, then apply the recommended remediation."
}
},
"Resources": [
{
"Name": "example-resource",
"Vulnerabilities": [
{
"Id": "cve-2016-1585",
"VprScore": 6.7,
"VprSeverity": "Medium",
"CvssScore": 9.8,
"CvssSeverity": "Critical",
"Sources": [
{
"Severity": "Critical",
"Name": "example-resource"
}
]
}
]
}
]
}
}
]
}
}
}List plugins for vulnerabilities
Every vulnerability includes the Tenable Nessus plugins that detect it. Use this to map a CVE to its plugins, or to start from a plugin and find every vulnerability, instance, or resource it affects.
NoteA single CVE can be detected by more than one plugin, so
Pluginsis a list on each vulnerability. Each plugin returnsRawId(the Nessus plugin ID, for example313522),Name(the plugin name), andId(the internal object identifier). Filter any vulnerability query by plugin with thePluginIdsargument, using theRawIdvalue.
List plugins that detect a CVE
This example shows a query which fetches the specified CVEs and lists the plugins that detect each one.
query {
Vulnerabilities(
filter: { Ids: ["CVE-2018-10237"] }
first: 5
) {
nodes {
Id
Plugins {
Id
RawId
Name
}
}
}
}Sample Response
{
"data": {
"Vulnerabilities": {
"nodes": [
{
"Id": "CVE-2018-10237",
"Plugins": [
{
"Id": "2a78900a-97ce-4262-8ae4-adaf1367c348",
"RawId": "313522",
"Name": "example-resource"
}
]
}
]
}
}
}List resources affected by a plugin
This example shows the reverse query: starting from a plugin ID, it fetches the vulnerability instances that plugin detects, along with the affected software and resource.
query {
VulnerabilityInstances(
filter: { PluginIds: ["313522"] }
first: 3
) {
nodes {
Vulnerability {
Id
Plugins {
Id
Name
}
}
Software {
Name
}
Resource {
Id
}
}
}
}Sample Response
{
"data": {
"VulnerabilityInstances": {
"nodes": [
{
"Vulnerability": {
"Id": "9c57fded-0b40-4861-8af9-dd28df0d14b6",
"Plugins": [
{
"RawId": "313522",
"Name": "example-resource"
}
]
},
"Software": {
"Name": "example-resource"
},
"Resource": {
"Id": "ad4a1674-e7b1-4a6b-8cd0-0989a654d4fe"
}
}
]
}
}
}List container image scan data
This example shows a query which fetches all used container images (active on a VM or a K8s workload) which have been scanned for at least one critical vulnerability. For each container image, the query lists the image digest, the container repository, any K8s clusters running the image, any VMs that were scanned to contain this image, any Docker container labels, and the last time vulnerability scanning was performed.
NoteYou can choose to use the
ClusterIds,KubernetesWorkloadResourceIds, andVirtualMachineIdsfilters to further narrow the scope.
query {
ContainerImages(
first:5
filter: {
VulnerabilitySeverities: [Critical]
Used: true,
VirtualMachineIds: ["arn:aws:ec2:us-east-2:111122223333:instance/i-0c0e7cdc76e88d1ec"],
ClusterIds: ["arn:aws:eks:us-east-2:111122223333:cluster/PrivateCluster"],
KubernetesWorkloadResourceIds: ["arn:aws:eks:us-east-2:111122223333:cluster/PrivateCluster/d260abb4-a219-4b72-89ba-963a7633cadf"]
}
) {
totalCount
edges {
node {
Digest
Repository {
Name
}
RepositoryUri
Clusters {
Name
}
VirtualMachines {
Name
OperatingSystem
}
ImageLabels {
Key
Value
}
Used
VulnerabilityScanTime
Software {
Name
Vulnerabilities {
CvssScore
Severity
Description
SoftwareResolutionVersions
Exploitable
}
}
}
}
}
}Sample Response
{
"data": {
"ContainerImages": {
"totalCount": 124,
"edges": [
{
"node": {
"Digest": "sha256:43d8ea2de0f73611d053f3c629985918a778d1d72e94885795308cf24d242992",
"Repository": {
"Name": "47fc5d3a-5b97-463d-83cb-dba7fa813b77"
},
"RepositoryUri": "bc1dacb1-403c-4b03-82f7-b5b56b7fec6a",
"Clusters": [],
"VirtualMachines": [
{
"Name": "SelfManagedClusterNode1",
"OperatingSystem": "Ubuntu 22.04"
}
],
"Used": true,
"VulnerabilityScanTime": "2026-06-09T05:50:25.808Z",
"Software": [
{
"Name": "microsoft.aspnetcore.app.runtime.linux-musl-x64",
"Vulnerabilities": [
{
"CvssScore": 0,
"Severity": "Critical",
"Description": ".NET Denial of Service Vulnerability",
"SoftwareResolutionVersions": [
"6.0.27",
"7.0.16",
"8.0.2"
],
"Exploitable": false
}
]
}
]
}
}
]
}
}
}List container image CI/CD scan data
This example shows a query which fetches container image CI/CD scans in the repository. The query lists the last five scans for the installed software and respective vulnerabilities, in addition to general information about the code repository and the container image itself. Each vulnerability includes the plugins that detect it.
query {
PipelineContainerImageScans(
first:5
filter: {
ContainerImageRepositoryUris: ["github.com/example-org/example-project"]
}) {
edges {
node {
VulnerabilityScanTime
Code {
BuildStatus
BranchName
CommitIdentityName
RepositoryId
}
ContainerImage {
Digest
Id
OperatingSystem
OperatingSystemType
RepositoryUri
Tag
Software {
Name
Type
Paths
Version
Vulnerabilities {
Id
Severity
Description
Plugins {
RawId
Name
}
}
}
}
}
}
}
}
NoteTo return only the CI/CD scans that contain a specific plugin, add the
PluginIdsfilter to thePipelineContainerImageScansquery, for examplefilter: { PluginIds: ["313522"] }.
Sample Response
{
"data": {
"PipelineContainerImageScans": {
"edges": [
{
"node": {
"VulnerabilityScanTime": "2026-06-17T07:18:28.065Z",
"Code": {
"BuildStatus": "Passed",
"BranchName": "main",
"CommitIdentityName": "d57c25a5-cf21-43c4-8f5a-d9259b33c725",
"RepositoryId": "github.com/example/coderepo"
},
"ContainerImage": {
"Digest": "sha256:2e527263c906854a4557a7f6e0f2cd7ae1de01bd7ebeeb6550b4d2de21989c0d",
"Id": "sha256:a1f74ae3f6d8895d7b69129926a2fc2576f481e99c65929a9bacee6b0c2e69a9",
"OperatingSystem": "Debian 12.5",
"OperatingSystemType": "Linux",
"RepositoryUri": "wordpress",
"Tag": "latest",
"Software": [
{
"Name": "perl-modules-5.36",
"Type": "OperatingSystemPackage",
"Paths": [],
"Version": "5.36.0-7+deb12u1",
"Vulnerabilities": [
{
"Id": "cve-2023-31486",
"Severity": "High",
"Description": "HTTP::Tiny before 0.083, a Perl core module since 5.13.9 and available standalone on CPAN, has an insecure default TLS configuration where users must opt in to verify certificates.",
"Plugins": [
{
"RawId": "313522",
"Name": "example-resource"
}
]
}
]
}
]
}
}
}
]
}
}
}List virtual machine scan data
- List open and resolved vulnerabilities
- List removed packages and resolved vulnerabilities for virtual machines
NoteCVEs are tied to specific software packages, and their CVSS severity and score can vary depending on the package in which they're found. To query Tenable Cloud Exposure workload information precisely, it's best to search for software packages (current or resolved) and retrieve the associated vulnerabilities for each package (see, for example, List Removed Packages and Resolved Vulnerabilities for Virtual Machines). However, if you're not concerned with multiple instances of the same CVE across different packages, you can include the
Vulnerabilitiesand/orResolvedVulnerabilitiesfields directly under theVirtualMachinesquery. This will return a unique list of CVEs without package-specific CVSS details."
List open and resolved vulnerabilities
This example shows a query which fetches all virtual machines which have been scanned for at least one critical or high vulnerability. For each virtual machine, the query lists information about both open and resolved vulnerabilities, including the plugins that detect each open vulnerability.
query{
VirtualMachines
(
first:5
filter: {VulnerabilitySeverities: [Critical, High]}) {
totalCount
edges {
node {
Name
Vulnerabilities {
Id
Severity
VprSeverity
VprScore
Exploitable
Description
Plugins {
RawId
Name
}
}
ResolvedVulnerabilities {
Id
Severity
Description
ResolutionTime
}
}
}
}
}Sample Response
{
"data": {
"VirtualMachines": {
"totalCount": 293,
"edges": [
{
"node": {
"Name": "126GB_Machine_1",
"Vulnerabilities": [
{
"Id": "cve-2023-49569",
"Severity": "Critical",
"VprSeverity": "Medium",
"VprScore": 5.9,
"Exploitable": false,
"Description": "A path traversal vulnerability was discovered in go-git versions prior to v5.11.",
"Plugins": [
{
"RawId": "313522",
"Name": "Example plugin name"
}
]
}
],
"ResolvedVulnerabilities": [
{
"Id": "cve-2013-5609",
"Severity": "Critical",
"Description": "Multiple unspecified vulnerabilities in the browser engine in Mozilla Firefox ...",
"ResolutionTime": "2026-07-25T14:37:53Z"
}
]
}
}
]
}
}
}List removed packages and resolved vulnerabilities for virtual machines
This example shows a query which fetches all virtual machines and shows their:
- current packages
- removed packages
- for each removed package, any resolved vulnerability
{
VirtualMachines {
first: edges {
node {
Name
Software {
Name
Version
}
ResolvedSoftware {
Name
Version
Paths
ResolutionTime
Vulnerabilities {
Id
Severity
Description
}
}
}
}
}
}Sample Response
{
"data": {
"VirtualMachines": {
"first": [
{
"node": {
"Name": "example-resource",
"Software": [
{
"Name": "example-resource",
"Version": "2012-10-17"
}
],
"ResolvedSoftware": [
{
"Name": "example-resource",
"Version": "2012-10-17",
"Paths": [],
"ResolutionTime": "2026-07-25T14:37:53Z",
"Vulnerabilities": [
{
"Id": "37924162-d5b8-4513-836f-256903a7d58a",
"Severity": "Critical",
"Description": "Example description for the documentation sample."
}
]
}
]
}
}
]
}
}
}List vulnerability scan data
This example shows a query that fetches vulnerabilities, filtered by the specified IDs, and returns the following properties: ID, AttackVector, Description, Exploitable, Links, and the plugins that detect the vulnerability.
query {
VulnerabilityInstances(
filter: {
VulnerabilityIds: ["ghsa-6hj4-mgcp-pmc8"]
})
{
nodes {
Vulnerability {
Id
Names
AttackVector
Exploitable
ExploitMaturity
Plugins {
RawId
Name
}
}
Resolved
Resource {
Id
}
}
}
}Sample Response
{
"data": {
"VulnerabilityInstances": {
"nodes": [
{
"Vulnerability": {
"Id": "d816d513-e839-4954-8411-21cf596c49d2",
"Names": [],
"AttackVector": "Network",
"Exploitable": false,
"ExploitMaturity": "ProofOfConcept",
"Plugins": [
{
"RawId": "313522",
"Name": "example-resource"
}
]
},
"Resolved": false,
"Resource": {
"Id": "8439b1ac-73a9-4697-8537-dddeabfe78c7"
}
}
]
}
}
}List vulnerability-related instances
This example shows a query that fetches vulnerability instances for the specified vulnerability ID, and returns the following properties for them:
- Name of the Software in which it was found.
- ID, Name, and Labels of the resource in which it was found.
query {
VulnerabilityInstances {
nodes {
Resolved
Software {
Name
}
Resource {
Id
Name
Labels
}
Vulnerability {
Severity
}
}
}
}Sample Response
{
"data": {
"VulnerabilityInstances": {
"nodes": [
{
"Resolved": false,
"Software": {
"Name": "example-resource"
},
"Resource": {
"Labels": [
]
},
"Vulnerability": {
"Severity": "Critical"
}
}
]
}
}
}List vulnerability instances with pagination
This query demonstrates how to list vulnerability instances, including details about their resolution status, affected software, and related resource, while applying pagination to limit the results per page and fetch subsequent pages.
NoteThe GraphQL API for Vulnerability Instances supports pagination via the
firstandafterarguments, with a maximum page size of 10,000 results.
Explanation of Pagination Components
| Component | Purpose |
|---|---|
first: N | Defines the limit of results (page size) for this request. |
after: "..." | Specifies the starting point for the next page of results, using the endCursor value from the previously returned pageInfo. |
pageInfo.hasNextPage | A boolean indicating if more results are available to fetch on the next page. |
pageInfo.endCursor | The unstructured token that should be passed as the after argument in the subsequent query. |
Example
query {
VulnerabilityInstances(first: 10000, after: "ewogICJTb3J0VmFsdWVzIjogWwogICAgIi8vY29tcHV0ZS5nb29nbGVhcGlzLmNvbS9wcm9qZWN0cy8xMjM0NTY3ODkwMTIvem9uZXMvdXMtY2VudHJhbDEtYS9pbnN0YW5jZXMvZXhhbXBsZS1pbnN0YW5jZS0xL2JzZHV0aWxzLzE6Mi4zOC4xLTUrZGViMTJ1MS9MaW51eC9DVkUtMjAyMi0wNTYzL0ZhbHNlIiwKICAgICIvL2NvbXB1dGUuZ29vZ2xlYXBpcy5jb20vcHJvamVjdHMvMTIzNDU2Nzg5MDEyL3pvbmVzL3VzLWNlbnRyYWwxLWEvaW5zdGFuY2VzL2V4YW1wbGUtaW5zdGFuY2UtMS9ic2R1dGlscy8xOjIuMzguMS01K2RlYjEydTEvTGludXgvQ1ZFLTIwMjItMDU2My9GYWxzZSIKICBdCn0=") {
pageInfo {
hasNextPage
endCursor
}
nodes {
FirstScanTime
}
}
}Updated 7 days ago
