Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to reflect new changes #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions demos/02_ingsting-scorecard/02_ingesting-scorecard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,31 +62,23 @@ The integration of Scorecard data into the graph involves several steps:
First load some SBOM data into the graph, we can use some test data:

```bash
go run main.go ingest sbom testdata/sboms
minefield ingest sbom testdata/sboms
```

### 2. Load Scorecard Data into the Storage

Then, load the Scorecard data into our storage system using the `load` command. This command processes the JSON files and stores the data for later use.
Then, load the Scorecard data into our storage system using the `graph` command. This command processes the JSON files and stores the data for later use.

```bash
go run main.go ingest scorecard load scorecard_data.json
minefield ingest scorecard graph scorecard_data.json
```

### 3. Graph the Scorecard Data

Next, graph the Scorecard data using the `graph` command. This step integrates the Scorecard data into the graph, establishing relationships between the Scorecard nodes and existing library nodes.

```bash
go run main.go ingest scorecard graph
```

### 4. Cache the Graph
### 3. Cache the Graph

After graphing the data, cache the graph to optimize performance for queries and analyses.

```bash
go run main.go cache
minefield cache
```

### 5. Utilize the Scorecard Data
Expand All @@ -98,7 +90,7 @@ With the Scorecard data integrated into the graph, perform queries to extract va
If we want to find all nodes that have a scorecard as their dependency, we can create a leaderboard of the nodes based on the number of dependencies of type scorecard:

```bash
go run main.go leaderboard custom "dependencies scorecard"
minefield leaderboard custom "dependencies scorecard"
```

you should get something similar to:
Expand Down
13 changes: 6 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ git clone [email protected]:bitbomdev/minefield.git
cd minefield
```

2. Ingest your SBOM data:
2. Start the service:
```bash
go run main.go start-service
```

3. Ingest your SBOM data:
```bash
go run main.go ingest sbom <sbom_file or sbom_dir>
```
Expand All @@ -66,12 +71,6 @@ go run main.go query custom "dependents library pkg:[email protected]"
go run main.go query custom "dependencies library pkg:[email protected] and dependencies library pkg:[email protected]"
```

### Visual Analysis
```bash
# Generate dependency visualizations
go run main.go query custom "dependents library pkg:[email protected]" --visualize
```

### Leaderboard Analytics
```bash
# Generate dependency leaderboards
Expand Down
15 changes: 3 additions & 12 deletions docs/minefield-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,10 @@ Flags:

Ingests SBOM data into the graph.

### `minefield ingest osv load <file_or_directory>`
### `minefield ingest osv ingest <file_or_directory>`

Loads [OSV](https://google.github.io/osv.dev/data/#data-dumps) data into local database. Accepts JSON files, directories, or zip files.

### `minefield ingest osv graph`

Loads [OSV](https://google.github.io/osv.dev/data/#data-dumps) data from local database into the graph.
Adds the [OSV](https://google.github.io/osv.dev/data/#data-dumps) data into graph. Accepts JSON files, directories, or zip files.

### `minefield ingest scorecard load <file_or_directory>`

Loads [OpenSSF Scorecard](https://github.com/ossf/scorecard) data into local database. Accepts JSON files, directories, or zip files.

### `minefield ingest scorecard graph`

Loads [OpenSSF Scorecard](https://github.com/ossf/scorecard) data from local database into the graph.

Adds the [OpenSSF Scorecard](https://github.com/ossf/scorecard) data into graph. Accepts JSON files, directories, or zip files.
4 changes: 2 additions & 2 deletions sidebar-glossary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const sidebars: SidebarsConfig = {
label: 'Glossary',
link: {
type: 'generated-index',
title: 'Kubernetes Glossary',
title: 'Minefield Glossary',
description:
'Learn about common Kubernetes and cloud-native terminology',
'Learn more about supply chain security terminology',
slug: '/categories/glossary',
},
items: [
Expand Down
Loading