Skip to content

Commit

Permalink
Fixed the README (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
naveensrinivasan authored Sep 16, 2024
1 parent 1fd6927 commit 35a56e0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 89 deletions.
74 changes: 45 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
<img src="images/bitbomLogoAndName.png" alt="BitBom Long Logo" >
</p>


[![Go Report Card](https://goreportcard.com/badge/github.com/bit-bom/minefield)](https://goreportcard.com/report/github.com/bit-bom/minefield)
[![Build and Test](https://github.com/bitbomdev/minefield/actions/workflows/build.yaml/badge.svg)](https://github.com/bitbomdev/minefield/actions/workflows/build.yaml)


>Before moving on, please consider giving us a GitHub star ⭐️. Thank you!
> Before moving on, please consider giving us a GitHub star ⭐️. Thank you!
BitBom Minefield is a tool that uses roaring-**Bit**maps to graph S**BOM**s FAST.

![img.png](images/terminal.png)
![Terminal Output](images/terminal.png)
> Caching 10,000 SBOMs packages transitive dependents in 30 seconds.
## Table of Contents

1. [Quickstart Guide](#quickstart-guide)
Expand All @@ -23,49 +22,61 @@ BitBom Minefield is a tool that uses roaring-**Bit**maps to graph S**BOM**s FAST
4. [How Minefield Works](#how-minefield-works)
5. [Custom Query Commands](#custom-query-commands)
6. [Visualization of a Query](#visualization-of-a-query)
7. [Star History](#star-history)
8. [Acknowledgements](#acknowledgements)

7. [Documentation](#documentation)
8. [Blog](#blog)
9. [Star History](#star-history)
10. [Acknowledgements](#acknowledgements)

[View Minefield demo on asciinema](https://asciinema.org/a/674302)

## Quickstart Guide

1. Ingest some data: `minefield ingest sbom <sbom_file or sbom_dir>`
2. Cache the data: `minefield cache`
3. Run a query: `minefield query <query_string>`
1. **Ingest some data:**
```sh
minefield ingest sbom <sbom_file or sbom_dir>
```
2. **Cache the data:**
```sh
minefield cache
```
3. **Run a query:**
```sh
minefield query <query_string>
```

### Example

_Redis must be running at `localhost:6379`, if not please use `make docker-up` to start Redis._
1. Ingest the `test` SBOM directory:
_Redis must be running at `localhost:6379`. If not, please use `make docker-up` to start Redis._

1. **Ingest the `test` SBOM directory:**
```sh
minefield ingest sbom test
```
2. Cache the data:
2. **Cache the data:**
```sh
minefield cache
```
3. Run the leaderboard custom with "dependents PACKAGE":
- This command generates a ranked list of packages, ordered by the number of other packages that depend on them
3. **Run the leaderboard custom with "dependents PACKAGE":**
- This command generates a ranked list of packages, ordered by the number of other packages that depend on them.
```sh
minefield leaderboard custom "dependents PACKAGE"
```
4. Run a query on the top value from the leaderboard:
- This command is now querying the dependents for a specific package, in this case dep2
4. **Run a query on the top value from the leaderboard:**
- This command queries the dependents for a specific package, in this case `dep2`.
```sh
minefield query "dependents PACKAGE pkg:generic/[email protected]"
minefield query "dependents PACKAGE pkg:generic/[email protected]"
```
5. Run queries to see the shared dependencies of lib-A and dep1, and lib-A and lib-B
- These queries output the intersection of two queries, in this case we are finding package dependencies do each of the packages share between each other.
5. **Run queries to see the shared dependencies of `lib-A` and `dep1`, and `lib-A` and `lib-B`:**
- These queries output the intersection of two queries, finding package dependencies shared between each pair.
```sh
minefield query "dependencies PACKAGE pkg:generic/[email protected] and dependencies PACKAGE pkg:generic/[email protected]"
minefield query "dependencies PACKAGE pkg:generic/[email protected] and dependencies PACKAGE pkg:generic/[email protected]"
```
```sh
minefield query "dependencies PACKAGE pkg:generic/[email protected] and dependencies PACKAGE pkg:generic/[email protected]"
minefield query "dependencies PACKAGE pkg:generic/[email protected] and dependencies PACKAGE pkg:generic/[email protected]"
```
6. Run queries with the visualizer
```sh
minefield query "dependents PACKAGE pkg:generic/[email protected] --visualize"
6. **Run queries with the visualizer:**
```sh
minefield query "dependents PACKAGE pkg:generic/[email protected] --visualize"
```

## To Start Using Minefield
Expand All @@ -90,17 +101,22 @@ go build -o minefield main.go

The design decisions and architecture of Minefield can be found [here](docs/bitbom.pdf).

## Custom Query Commands

For detailed information on available query commands and their usage, please refer to the [Custom Query Commands documentation](docs/customQueryCommands.md).

## Visualization of a Query

![img.png](images/img.png)

## Documentation

For comprehensive guides and detailed documentation, please visit our [Docs](https://bitbom.dev/docs/intro).

## Blog

Stay updated with the latest news and insights by visiting our [Blog](https://bitbom.dev/blog).

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=bitbomdev/minefield&type=Date)](https://star-history.com/#bitbomdev/minefield&Date)

## Acknowledgements

- https://github.com/RoaringBitmap/roaring
60 changes: 0 additions & 60 deletions docs/customQueryCommands.md

This file was deleted.

0 comments on commit 35a56e0

Please sign in to comment.