-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: get snyk api endpoint from env (#67)
- Loading branch information
1 parent
4391914
commit c52ed51
Showing
3 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,7 +93,7 @@ What about with SPDX? Let's take an SBOM containing a list of packages like so: | |
"referenceLocator": "pkg:npm/[email protected]" | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
Running `parlay ecosystems enrich <sbom.spdx.json>` will add additional information: | ||
|
@@ -114,7 +114,7 @@ Running `parlay ecosystems enrich <sbom.spdx.json>` will add additional informat | |
"referenceType": "purl", | ||
"referenceLocator": "pkg:npm/[email protected]" | ||
} | ||
] | ||
] | ||
``` | ||
|
||
There are a few other utility commands for ecosyste.ms as well. The first returns raw JSON information about a specific package from ecosyste.ms: | ||
|
@@ -138,6 +138,8 @@ It's important to note vulnerability data is moment-in-time information. By addi | |
|
||
Note the Snyk commands require you to be a Snyk customer, and require passing a valid Snyk API token in the `SNYK_TOKEN` environment variable. | ||
|
||
The API base url can be set using the `SNYK_API` environment variable, and if missing it will default to `https://api.snyk.io/rest`. | ||
|
||
``` | ||
parlay snyk enrich testing/sbom.cyclonedx.json | ||
``` | ||
|
@@ -248,9 +250,9 @@ There are lots of other sources of package data, and it would be great to add su | |
|
||
## Pipes! | ||
|
||
`parlay` is a fan of stdin and stdout. You can pipe SBOMs from other tools into `parlay`, and pipe between the separate `enrich` commands too. | ||
`parlay` is a fan of stdin and stdout. You can pipe SBOMs from other tools into `parlay`, and pipe between the separate `enrich` commands too. | ||
|
||
Maybe you want to enrich an SBOM with both ecosyste.ms and Snyk data: | ||
Maybe you want to enrich an SBOM with both ecosyste.ms and Snyk data: | ||
|
||
``` | ||
cat testing/sbom.cyclonedx.json | ./parlay e enrich - | ./parlay s enrich - | jq | ||
|
@@ -324,7 +326,7 @@ The various services used to enrich the SBOM data have data for a subset of purl | |
* `npm` | ||
* `nuget` | ||
* `pypi` | ||
* `rpm` | ||
* `rpm` | ||
* `swift` | ||
|
||
### OpenSSF Scorecard | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters