> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/documentation/use-octoxlabs/dependency-map.md).

# Dependency Map

Explore how your devices, users, software and vulnerabilities relate to each other on an interactive graph, and save the graph to share it.

The Dependency Map shows your assets as a graph. You pick one inventory as the starting point, then expand the graph one relation at a time: from a group of devices to the software installed on them, from that software to its vulnerabilities, from a vulnerability back to every device it affects, and so on. Use it to answer questions such as "which devices are exposed through this software?" or "who uses the devices that run this vulnerable version?", questions that are hard to answer from a flat table.

A graph is built from the latest completed discovery. You can save a graph, keep it private or make it public, and open it again later.

### Before you begin

* At least one completed discovery. The map reads its data from the latest completed discovery, and the inventory cards stay inactive until one exists. See Discovery and Aggregation.
* Permissions: `dependencymap.view_dependencymap` to see the saved graphs and `dependencymap.add_dependencymapgraph` to start a new one. Saving changes to an existing graph needs `dependencymap.change_dependencymapgraph`, and deleting a graph needs `dependencymap.delete_dependencymapgraph`.

### Start a new graph

{% stepper %}
{% step %}

#### Open the New Graph page

In the left menu, click **Dependency Map** > **New Graph**. The **Create New Graph** page asks you to select an inventory type to start a new dependency map graph.
{% endstep %}

{% step %}

#### Choose the starting inventory

Click one of the cards. Each card shows the number of assets in the latest completed discovery and an **Open Graph** link. You can start from four inventories: devices, users, software and vulnerabilities.
{% endstep %}

{% step %}

#### Expand the graph

The graph opens with one node that stands for the whole inventory. Right-click a node to open its context menu, then pick the relation you want to follow. For example, on a devices node you can pick **Software** or **Vulnerabilities**. A new node appears and an edge connects it to the node you started from. Repeat on any node to keep investigating.
{% endstep %}

{% step %}

#### Save the graph

Use the save buttons on the left side of the graph. The first save opens **Save Graph**, where you enter a **Graph Name** and choose whether the graph is **Public**. Later saves update the same graph. **Save as New** stores a copy under a new name.
{% endstep %}
{% endstepper %}

IMAGEHERE: The Create New Graph page with the inventory cards (device, user, software and vulnerability counts).

### Work with nodes

Nodes are either grouped (one node that stands for many assets, shown as a container with a count) or single (one asset, one adapter, one tag and so on). A grouped node whose count is above 50 is shown as a badge only and is not expandable. Narrow it down with a filter first. The map draws at most 100 child nodes inside a grouped node.

The context menu of a node can contain these items. Which ones you see depends on the node type.

| Menu item                                                                                                                                                                                                                        | What it does                                                                                                                                                      |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Relation items, for example **Devices**, **Software**, **Vulnerabilities**, **Users**, **Adapters**, **Tags**, **Asset Profiles**, **Security Policies**, **AD Domains**, **MAC Vendors**, **Software Groups**, **Exploitables** | Follows that relation and adds the related assets to the graph.                                                                                                   |
| **View Details**                                                                                                                                                                                                                 | Opens a drawer with the assets behind the node. Search the list, edit its columns, select up to 50 items and click **Add to Graph** to put only those on the map. |
| **Filter by Query**                                                                                                                                                                                                              | Opens a dialog where you enter a query and click **Run**. Use the query syntax from the OctoXLabs Query Reference.                                                |
| **Filter to New Node**                                                                                                                                                                                                           | Applies a query and creates a new node that holds only the matching assets.                                                                                       |
| **Group By...**                                                                                                                                                                                                                  | Opens a dialog with an adapter and a field. The node's assets are grouped by the values of that field. **Ungroup** restores the flat view.                        |
| **Arrange Items**                                                                                                                                                                                                                | Arranges the child items of a grouped node in a grid.                                                                                                             |
| **Change Name**                                                                                                                                                                                                                  | Changes the display name of the node.                                                                                                                             |
| **Delete**                                                                                                                                                                                                                       | Deletes the node and its connections.                                                                                                                             |

Edges are labeled with the relation, for example **vulnerable to**, **runs**, **used by**, **installed on**, **has vulnerability**, **affects**, **discovered by**, **governed by** or **tagged as**.

### Move around the graph

The controls on the graph let you:

* **Zoom in**, **Zoom out** and **Fit to screen**.
* **Run layout** to arrange the nodes again, and choose the layout engine from the dropdown: **Force (Recommended)**, **ELK (Hierarchical)** or **Concentric**. Force suits most graphs, ELK reads well for an attack path or a blast radius, and Concentric puts one asset in the centre with the rest by distance.
* **Toggle fullscreen**.

A status strip shows the number of **Nodes** and **Edges**, the **Focal** node and its **Depth**.

### Review your investigation steps

Every action you take on the graph is logged. Open **Investigation Steps** to see the list ("{count} steps"), switch between **Compact mode** and **Expanded mode**, or use **Clear history** to start the log again. The history is saved together with the graph, so you can see how you reached a result when you open it later.

### Manage saved graphs

**Dependency Map** > **Dependency Map** lists the saved graphs with these columns: **Name**, **Related Asset**, **Visibility** (**Public** or **Private**), **Created By** and **Updated At**. Type in the search box and press Enter to find a graph.

| Action           | What it does                                                                              |
| ---------------- | ----------------------------------------------------------------------------------------- |
| Play button      | Opens the graph.                                                                          |
| Edit button      | Opens a **Rename** dialog where you change the **Graph Name** and the **Public** setting. |
| Duplicate button | Creates a private copy named after the original with " (Copy)" added.                     |
| Delete           | Removes the graph.                                                                        |

You see every public graph and your own private graphs. If some nodes cannot be restored when you open a saved graph (for example because the data changed), the map shows **Restored with {count} failed nodes**.

### Open the map from an asset

The detail pages of devices, users, software, vulnerabilities and most other inventories have a **Dependency Map** view next to the pretty and raw views. It shows the map for that one asset, so you can start an investigation without leaving the asset.

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Application Vulnerability Management</strong></td><td>See how vulnerabilities are matched to the software you run.</td><td></td></tr><tr><td><strong>Inventories</strong></td><td>Browse the assets that the map is built from.</td><td></td></tr><tr><td><strong>Create and Save Queries</strong></td><td>Write the queries you use to filter nodes.</td><td></td></tr></tbody></table>
