|
| 1 | +--- |
| 2 | +title: Query software bill of materials (SBOM) |
| 3 | +description: Learn how to query Software Bill of Materials (SBOM) results in Microsoft Defender for Cloud's Cloud Security Explorer. |
| 4 | +author: Elazark |
| 5 | +ms.author: elkrieger |
| 6 | +ms.topic: how-to |
| 7 | +ms.date: 01/18/2026 |
| 8 | +--- |
| 9 | + |
| 10 | +# Query software bill of materials (SBOM) |
| 11 | + |
| 12 | +Microsoft Defender for Cloud's DevOps Security agentless scanning capabilities automatically generate a Software Bill of Materials (SBOM) for connected code repositories. When a scan finishes, the process publishes the repository and identified packages to the [cloud security graph](concept-attack-path.md#what-is-cloud-security-graph). |
| 13 | + |
| 14 | +You can use Defender for Cloud's [cloud security explorer](concept-attack-path.md#what-is-cloud-security-explorer) to query this data. By using the cloud security explorer, you can locate specific packages (dependencies) and identify exactly which repositories use them. Use this information to identify the impact radius of a vulnerable package version across your organization. |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +* [Enable agentless scanning](agentless-code-scanning.md#enable-agentless-code-scanning-on-your-azure-devops-and-github-organizations) in your DevOps connector. |
| 19 | +* Wait for the initial scan to complete so the Software Bill of Materials (SBOM) data is populated in the Cloud Map. |
| 20 | + |
| 21 | +## Build a package query |
| 22 | + |
| 23 | +By using the cloud security explorer, you can build a query to find repositories that include specific packages (dependencies) and versions. |
| 24 | + |
| 25 | +1. Sign in to the [Azure portal](https://portal.azure.com/). |
| 26 | + |
| 27 | +1. Go to **Microsoft Defender for Cloud** > **Cloud Security Explorer**. |
| 28 | + |
| 29 | +1. Select **Resource Type** > **DevOps**. |
| 30 | + |
| 31 | + :::image type="content" source="media/query-software-bill-of-materials/code-repository.png" alt-text="Screenshot that shows the cloud security explorer and where to select code repositories." lightbox="media/query-software-bill-of-materials/code-repository.png"::: |
| 32 | + |
| 33 | +1. Select the specific code repository type you want to filter for. For example, GitHub repositories. |
| 34 | + |
| 35 | +1. Select **Done**. |
| 36 | + |
| 37 | +1. Select **Search**. |
| 38 | + |
| 39 | +The query runs and returns all code repositories. Select a repository from the results to view more details about the installed software and its security posture. |
| 40 | + |
| 41 | +### Add a dependency filter |
| 42 | + |
| 43 | +To add a filter that searches for repositories containing specific packages (dependencies), continue building the query as follows. |
| 44 | + |
| 45 | +1. Select **(+)**. |
| 46 | + |
| 47 | +1. Select **Application** > **Has installed software**. |
| 48 | + |
| 49 | + :::image type="content" source="media/query-software-bill-of-materials/has-installed-software.png" alt-text="Screenshot that shows how to apply the dependency, has installed software." lightbox="media/query-software-bill-of-materials/has-installed-software.png"::: |
| 50 | + |
| 51 | +1. Select **(+)** next to `Has installed software`. |
| 52 | + |
| 53 | +1. Select **Name** > **Equals**. |
| 54 | + |
| 55 | +1. Enter the package name. For example, `log4j`, `express`, or `newtonsoft.json`. |
| 56 | + |
| 57 | +1. Select **Search**. |
| 58 | + |
| 59 | +The query runs and all repositories containing the specified package are presented. Select a repository from the results to view further details about the installed software and its security posture. |
| 60 | + |
| 61 | +### Specify a version |
| 62 | + |
| 63 | +To add a filter that searches for a specific package version, continue building the query as follows. |
| 64 | + |
| 65 | +1. Select **(+)** next to `Has installed software`. |
| 66 | + |
| 67 | +1. Select **Version**. |
| 68 | + |
| 69 | + :::image type="content" source="media/query-software-bill-of-materials/version.png" alt-text="A screenshot that shows where to navigate to, to select version." lightbox="media/query-software-bill-of-materials/version.png"::: |
| 70 | + |
| 71 | +1. Enter a version number. For example, `2.14.1`. |
| 72 | + |
| 73 | +1. Select **Search** to run the query. |
| 74 | + |
| 75 | +The query runs and all repositories containing the specified package and version are presented. Select a repository from the results to view further details about the installed software and its security posture. |
| 76 | + |
| 77 | +## Next step |
| 78 | + |
| 79 | +> [!div class="nextstepaction"] |
| 80 | +> [Common questions about DevOps Security](faq-defender-for-devops.yml) |
0 commit comments