File size: 4,289 Bytes
0593652 6b47aa9 bc72954 6b47aa9 16ba199 74ac7c7 16ba199 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
---
viewer: false
license: mit
language:
- en
tags:
- blint
- binary
- sbom
- sca
---
# blint-db
blint-db is a family of binary symbol databases (pre-compiled SQLite files) generated by building a [collection](./docs/vcpkg-projects.csv) of [open-source](./docs/meson-projects.csv) libraries and applications across various platforms and architectures, then generating an SBOM with OWASP [blint](https://github.com/owasp-dep-scan/blint). We started this project with C/C++ projects that can be built using [wrapdb](https://github.com/mesonbuild/wrapdb) and [vcpkg](https://github.com/microsoft/vcpkg) package managers, but we plan to extend to other ecosystems.
## Use cases
Use blint-db to:
- Improve the precision of generated SBOMs and SCA for C/C++ projects
- Vectorize data to train ML models for component identification and risk prediction from binaries
- And much more
## Build pipeline
Native binaries vary based on several factors, such as configuration, build tools, and the operating system’s architecture. The project aims to generate and publish multiple versions of the [database](https://github.com/orgs/AppThreat/packages?repo_name=blint-db), [built](https://github.com/AppThreat/blint-db/blob/21a16bf87a62a137405901c37955d95883388201/blint_db/handlers/language_handlers/meson_handler.py#L40) in both debug and stripped modes [without](https://github.com/AppThreat/blint-db/blob/21a16bf87a62a137405901c37955d95883388201/blint_db/handlers/language_handlers/vcpkg_handler.py#L89) optimizations. The following OS and architecture matrix is currently available:
- Ubuntu 24.04 — amd64, arm64
- Alpine Linux - amd64
- macOS 15 — arm64
## Database Schema
The schema design is not currently stable and is likely to change as we add more build pipelines.
<img src="./docs/schema.png" alt="Blint DB schema" width="400" />
### Table: Exports
Index of all exported symbols.
```sql
CREATE TABLE Exports ( infunc VARCHAR(4096) PRIMARY KEY )
```
### Table: Projects
Contains information about the projects indexed in the database, including each project's name, purl, and additional metadata.
`source_sbom` is currently unused.
```sql
CREATE TABLE Projects ( pid INTEGER PRIMARY KEY AUTOINCREMENT, pname VARCHAR(255) UNIQUE, purl TEXT UNIQUE, metadata BLOB, source_sbom BLOB )
```
### Table: Binaries
A given project can produce multiple binary files during the build process. This table maps each generated binary to its parent project.
`bbom` is currently unused.
```sql
CREATE TABLE Binaries ( bid INTEGER PRIMARY KEY AUTOINCREMENT, pid INTEGER, bname VARCHAR(500), bbom BLOB, FOREIGN KEY (pid) REFERENCES Projects(pid) )
```
### Table: BinariesExports
This table maps exported symbols to individual binaries.
```sql
CREATE TABLE BinariesExports ( bid INTEGER, eid INTEGER, PRIMARY KEY (bid, eid), FOREIGN KEY (bid) REFERENCES Binaries(bid), FOREIGN KEY (eid) REFERENCES Exports(eid) )
```
### Search by symbol
Given a list of symbols, use the query below to identify the matching binary IDs and export IDs.
```sql
SELECT eid, group_concat(bid) from BinariesExports where eid IN (SELECT rowid from Exports where infunc IN ({symbols_list})) group by eid
```
You can then use the binary ID to retrieve the parent project’s name and purl at any time.
```sql
SELECT bname, pname, purl from Binaries JOIN Projects on Binaries.pid = Projects.pid WHERE Binaries.bid = ?
```
Apply heuristics, such as a ranking algorithm based on the number and type of matches, to reduce false positives in the results.
## Funding
This project is funded through [NGI Zero Core](https://nlnet.nl/core), a fund established by [NLnet](https://nlnet.nl) with financial support from the European Commission's [Next Generation Internet](https://ngi.eu) program. Learn more at the [NLnet project page](https://nlnet.nl/project/OWASP-dep-scan).
[<img src="https://nlnet.nl/logo/banner.png" alt="NLnet foundation logo" width="20%" />](https://nlnet.nl)
[<img src="https://nlnet.nl/image/logos/NGI0_tag.svg" alt="NGI Zero Logo" width="20%" />](https://nlnet.nl/core)
## Citation
```
@misc{blint-db,
author = {Team AppThreat},
month = Mar,
title = {{AppThreat blint-db}},
howpublished = {{https://huggingface.co/datasets/AppThreat/blint-db}},
year = {2025}
}
```
|