Query Builder

In Tenable Vulnerability Management, you can use Query Builders to build filter queries so that you can view specific data in a table. See Filtering and Simple Search. You can also save filter queries that you build. See Saved Queries.

Important: When you run a query using a query builder, it applies to all data on the page, including the quick filters on the left side of your data table (for example, . These quick filters, on the other hand, only affect the data within the table itself. Any filters applied on the left side of the page do not affect the results of queries within the query builder.

Components of a Query

Queries consist of boolean conditions joined by boolean operators AND and OR. Query conditions have three components:

  • Filter — Filters available in the associated table (for example, Explore > Findings, Severity).

  • Operator — An operator to filter on (for example, is not equal to).

  • Value — The value to search (for example, a Severity of Critical).

Tip: You can nest queries with parentheses. For example, to search for high-severity findings where the VPR is greater than seven or the CVSSv3 Base Score is greater than six, use:

Severity is equal to Critical AND (VPR is greater than 7 OR CVSSv3 is greater than 6) .

Note: To ensure optimal performance while providing maximum flexibility, Tenable Vulnerability Management limits the number of filters for defining a dataset to 35 boolean filter conditions in a single query.

Build a Query

To build a query with a query builder:

  1. Click the query bar.

    A pane appears with a list of filters, which vary in each section of Tenable Vulnerability Management.

  2. Type any text in the query bar.

    The query builder shows matching filters. See Filtering and Simple Search.

  3. Under Filters, choose a filter.

    A list of operators appears in the query bar.

  4. Under Operators, choose an operator.

    For filters where the value requires text or a number, a hint appears. Otherwise, a list of options appears.

  5. Under Value, type a value or select one from the list.

  6. (Optional) Add another query condition by typing an AND or OR operator.

    Tip: Under Nesting Operators, select an opening parentheses ( or NOT( to start building a nested query.
  7. Press Enter or click the button to run the query.

Edit a Query

To edit a query, do one of the following.

Action

Description

Replace a query component

In the query bar, click the component to replace. A list of options appears.

Delete a query condition

On the query condition, click the X.

Clear a query

On the right side of the query box, click the X.

Reset a Query

To reset a query:

  1. Use the query builder to reset a query.

  2. On the right, click the button inside the query builder.

    This clears the current query and applies the default query set by either the user or Tenable. If there is no default query, then this will apply an empty query.

Keyboard Shortcuts

Use the following keyboard shortcuts in a query builder. 

Shortcut

Description

Up Arrow or Down Arrow

Navigate lists of open-ended values such as text or numbers.

Right Arrow or Left Arrow

Move the cursor in your query or choose a date in the date picker.

Enter

Select a query component or date. If no component is selected, apply the query.

Esc

Close a list (for example, the Filters list).

Ctrl-C or ⌘-C

Copy the highlighted text.

Ctrl-V or ⌘-V

Paste your clipboard contents into the query builder.

Ctrl-Z or ⌘-Z

Undo the last action.

Ctrl-Y or ⌘-Y

Redo the last action.