From d9b86c9553abd8dd27124d27e9436259933f0e1e Mon Sep 17 00:00:00 2001 From: neilnaveen <42328488+neilnaveen@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:06:06 -0600 Subject: [PATCH] Updated to reflect new changes --- .../02_ingesting-scorecard.mdx | 20 ++++++------------- docs/index.md | 13 ++++++------ docs/minefield-cli.md | 15 +++----------- sidebar-glossary.ts | 4 ++-- 4 files changed, 17 insertions(+), 35 deletions(-) diff --git a/demos/02_ingsting-scorecard/02_ingesting-scorecard.mdx b/demos/02_ingsting-scorecard/02_ingesting-scorecard.mdx index abcee36..7562828 100644 --- a/demos/02_ingsting-scorecard/02_ingesting-scorecard.mdx +++ b/demos/02_ingsting-scorecard/02_ingesting-scorecard.mdx @@ -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 @@ -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: diff --git a/docs/index.md b/docs/index.md index 5ff4261..6f1f913 100644 --- a/docs/index.md +++ b/docs/index.md @@ -40,7 +40,12 @@ git clone git@github.com: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 ``` @@ -66,12 +71,6 @@ go run main.go query custom "dependents library pkg:redis@6.2.0" go run main.go query custom "dependencies library pkg:lib-A@1.0.0 and dependencies library pkg:lib-B@1.0.0" ``` -### Visual Analysis -```bash -# Generate dependency visualizations -go run main.go query custom "dependents library pkg:dep2@1.0.0" --visualize -``` - ### Leaderboard Analytics ```bash # Generate dependency leaderboards diff --git a/docs/minefield-cli.md b/docs/minefield-cli.md index e990759..feec4ca 100644 --- a/docs/minefield-cli.md +++ b/docs/minefield-cli.md @@ -97,19 +97,10 @@ Flags: Ingests SBOM data into the graph. -### `minefield ingest osv load ` +### `minefield ingest osv ingest ` -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 ` -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. diff --git a/sidebar-glossary.ts b/sidebar-glossary.ts index 7a4811b..12f13b8 100644 --- a/sidebar-glossary.ts +++ b/sidebar-glossary.ts @@ -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: [