---
title: "SQL Query Interface over SBOM using SafeDep Cloud"
description: "This is a '#buildinpublic' update for SafeDep Cloud Development. UI often becomes a bottleneck for developer tools causing friction. We want to overcome it by providing an SQL query interface of SBOM and security metadata."
url: "https://safedep.io/blog/safedep-cloud-preview-sql-query-api"
author: "SafeDep Team"
published: "2024-10-18"
---

# SQL Query Interface over SBOM using SafeDep Cloud

Developer experience is often specialized. Apart from providing domain specific use-cases, ease of getting started and ample documentation, flexibility of use especially with custom integration is important. This allows developer and security engineers, who are often subject matter experts to use a solution as per their requirement instead of compromising and following the workflows enforced by the product. This is a key focus at [SafeDep](#) in our product development efforts. We want to provide the best experience to security and platform engineers in protecting themselves against malicious, vulnerable and risky open source components.

To enable this, we shipped a key building block required to _find what you need_. Instead of being restricted by UI and Tables, engineers can use their familiar SQL query language to find and export security risk related information from [SafeDep Cloud](#). Here is a quick `#build-in-public` demo of this feature.

## Example

Let's find all the repositories on-boarded into SafeDep Cloud using [vet](https://github.com/safedep/vet)

```shell
vet cloud query execute --sql \
  "select projects.name, projects.version from projects"
```

This produces

```shell
Query returned 3 results
┌───────────────────────────────────────────┬──────────────────┐
│ PROJECTS.NAME                             │ PROJECTS.VERSION │
├───────────────────────────────────────────┼──────────────────┤
│ https://github.com/safedep/vet .git       │ main             │
├───────────────────────────────────────────┼──────────────────┤
│ https://github.com/safedep/api.git        │ main             │
├───────────────────────────────────────────┼──────────────────┤
│ https://github.com/safedep/control.git    │ main             │
└───────────────────────────────────────────┴──────────────────┘
```

> Leaking private repositories :-O

You can also use complex queries to filter across an organization wide SBOM

```sql
select vulnerabilities.cve_id, vulnerabilities.summary from projects
  where projects.name = 'safedep/demo-client-java'
  and projects.version = 'v1.2.3'
  and vulnerabilities.risk = 'CRITICAL'
```

Queries can be exported to file as CSV or Markdown

```shell
vet cloud query --sql $SQL --csv /path/to/out.csv
```

## Build in Public Update

If you like what you see so far, check out a development walkthrough of what we are building at [#SafeDep](#)

[YouTube video](https://www.youtube.com/watch?v=ayRmXVXC1VY)

[SafeDep Cloud](#) is currently at invite-only preview stage. You can register and get invited to our early adopter program.
