Skip to content
Merged
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
136 changes: 26 additions & 110 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The HeroDevs CLI
1. Install node v20 or higher: [Download Node](https://nodejs.org/en/download)
1. Install the CLI using one of the following methods:
- Globally: Refer to the [Usage](#usage) instructions on installing the CLI globally
- Npx:`npx @herodevs/cli@beta <commands>`
- npx: `npx @herodevs/cli@beta`
1. Refer to the [Commands](#commands) section for a list of commands

## TERMS
Expand All @@ -24,10 +24,10 @@ Use of this CLI is governed by the [HeroDevs End of Life Dataset Terms of Servic

## Scanning Behavior

The CLI's scanning commands (`hd scan eol` and `hd scan sbom`) are designed to be non-invasive:
The CLI is designed to be non-invasive:

* They do not install dependencies or modify package manager files (package-lock.json, yarn.lock, etc.)
* They analyze the project in its current state
* It does not install dependencies or modify package manager files (package-lock.json, yarn.lock, etc.)
* It analyzes the project in its current state
* If you need dependencies installed for accurate scanning, please install them manually before running the scan


Expand All @@ -38,7 +38,7 @@ $ npm install -g @herodevs/cli
$ hd COMMAND
running command...
$ hd (--version)
@herodevs/cli/2.0.0-beta.4 darwin-arm64 node-v22.15.1
@herodevs/cli/2.0.0-beta.4 darwin-arm64 node-v22.18.0
$ hd --help [COMMAND]
USAGE
$ hd COMMAND
Expand All @@ -48,10 +48,7 @@ USAGE
## Commands
<!-- commands -->
* [`hd help [COMMAND]`](#hd-help-command)
* [`hd report committers`](#hd-report-committers)
* [`hd report purls`](#hd-report-purls)
* [`hd scan eol`](#hd-scan-eol)
* [`hd scan sbom`](#hd-scan-sbom)
* [`hd update [CHANNEL]`](#hd-update-channel)

## `hd help [COMMAND]`
Comment thread
KLongmuirHD marked this conversation as resolved.
Expand All @@ -74,130 +71,49 @@ DESCRIPTION

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.29/src/commands/help.ts)_

## `hd report committers`

Generate report of committers to a git repository

```
USAGE
$ hd report committers [--json] [-m <value>] [-c] [-s]

FLAGS
-c, --csv Output in CSV format
-m, --months=<value> [default: 12] The number of months of git history to review
-s, --save Save the committers report as herodevs.committers.<output>

GLOBAL FLAGS
--json Format output as json.

DESCRIPTION
Generate report of committers to a git repository

EXAMPLES
$ hd report committers

$ hd report committers --csv -s

$ hd report committers --json

$ hd report committers --csv
```

_See code: [src/commands/report/committers.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.4/src/commands/report/committers.ts)_

## `hd report purls`

Generate a list of purls from a sbom

```
USAGE
$ hd report purls [--json] [-f <value>] [-d <value>] [-s] [-c]

FLAGS
-c, --csv Save output in CSV format (only applies when using --save)
-d, --dir=<value> The directory to scan in order to create a cyclonedx sbom
-f, --file=<value> The file path of an existing cyclonedx sbom to scan for EOL
-s, --save Save the list of purls as herodevs.purls.<output>

GLOBAL FLAGS
--json Format output as json.

DESCRIPTION
Generate a list of purls from a sbom

EXAMPLES
$ hd report purls --json -s

$ hd report purls --dir=./my-project

$ hd report purls --file=path/to/sbom.json

$ hd report purls --dir=./my-project --save

$ hd report purls --save --csv
```

_See code: [src/commands/report/purls.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.4/src/commands/report/purls.ts)_

## `hd scan eol`

Scan a given sbom for EOL data
Scan a given SBOM for EOL data

```
USAGE
$ hd scan eol [--json] [-f <value>] [-p <value>] [-d <value>] [-s]
$ hd scan eol [--json] [-f <value> | -d <value>] [-s] [--saveSbom]

FLAGS
-d, --dir=<value> The directory to scan in order to create a cyclonedx sbom
-f, --file=<value> The file path of an existing cyclonedx sbom to scan for EOL
-p, --purls=<value> The file path of a list of purls to scan for EOL
-s, --save Save the generated report as herodevs.report.json in the scanned directory
-d, --dir=<value> [default: <current directory>] The directory to scan in order to create a cyclonedx SBOM
-f, --file=<value> The file path of an existing cyclonedx SBOM to scan for EOL
-s, --save Save the generated report as herodevs.report.json in the scanned directory
--saveSbom Save the generated SBOM as herodevs.sbom.json in the scanned directory

GLOBAL FLAGS
--json Format output as json.

DESCRIPTION
Scan a given sbom for EOL data
Scan a given SBOM for EOL data

EXAMPLES
$ hd scan eol --dir=./my-project

$ hd scan eol --file=path/to/sbom.json
Default behavior (no command or flags specified)

$ hd scan eol --purls=path/to/purls.json
$ hd

$ hd scan eol -a --dir=./my-project
```
Equivalent to

_See code: [src/commands/scan/eol.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.4/src/commands/scan/eol.ts)_
$ hd scan eol --dir .

## `hd scan sbom`
Skip SBOM generation and specify an existing file

Scan a SBOM for purls
$ hd scan eol --file /path/to/sbom.json

```
USAGE
$ hd scan sbom [--json] [-f <value>] [-d <value>] [-s] [-b]
Save the report or SBOM to a file

FLAGS
-b, --background Run the scan in the background
-d, --dir=<value> The directory to scan in order to create a cyclonedx sbom
-f, --file=<value> The file path of an existing cyclonedx sbom to scan for EOL
-s, --save Save the generated SBOM as herodevs.sbom.json in the scanned directory
$ hd scan eol --save --saveSbom

GLOBAL FLAGS
--json Format output as json.
Output the report in JSON format (for APIs, CI, etc.)

DESCRIPTION
Scan a SBOM for purls

EXAMPLES
$ hd scan sbom --dir=./my-project

$ hd scan sbom --file=path/to/sbom.json
$ hd scan eol --json
```

_See code: [src/commands/scan/sbom.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.4/src/commands/scan/sbom.ts)_
_See code: [src/commands/scan/eol.ts](https://github.com/herodevs/cli/blob/v2.0.0-beta.4/src/commands/scan/eol.ts)_

## `hd update [CHANNEL]`

Expand Down Expand Up @@ -250,7 +166,7 @@ it contains build tools for most project types and will provide best results whe
#### GitHub Actions

```yaml
# .github/workflows/herodevs-eol-scan.yml
## .github/workflows/herodevs-eol-scan.yml
name: HeroDevs EOL Scan

on:
Expand Down Expand Up @@ -295,7 +211,7 @@ all requirements before the scan step.
#### GitHub Actions

```yaml
# .github/workflows/herodevs-eol-scan.yml
## .github/workflows/herodevs-eol-scan.yml
name: HeroDevs EOL Scan

on:
Expand Down Expand Up @@ -328,4 +244,4 @@ eol-scan:
script:
- echo # Prepare environment, install tooling, perform setup, etc.
- npx @herodevs/cli@beta
```
```
3 changes: 0 additions & 3 deletions e2e/fixtures/npm/empty.purls.json

This file was deleted.

Loading
Loading