Skip to content

Commit

Permalink
fix: export gentInputData in lib
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed May 27, 2021
1 parent dae5c7b commit a62508a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,21 @@
Snyk helps you find, fix and monitor for known vulnerabilities in your dependencies, both on an ad hoc basis and as part of your CI (Build) system.

## Snyk snyk2spdx
convert the snyk ouput to spdx format output
Convert the Snyk CLI output to SPDX format

## Usage
Basic:
`snyk test --json | snyk2spdx`

With output file:
`snyk test --json | snyk2spdx --output=spdx.json`

```
Commands:
snyk2spdx snyk:test Convert `snyk test --json` output to SPDX SBOM [default]
Options:
--version Show version number [boolean]
--help Show help [boolean]
--output Save the output to the specified file name. Defaults to stdout
```
1 change: 1 addition & 0 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'source-map-support/register';
import { SnykIssue, SnykTestOutput, SPDXv3, Profile } from '../types';
import { convertSnykIssueToSpdx } from './convert-issue-to-spdx';
import { generateDocumentNameSpace } from './generate-document-namespace';
export { getInputData } from './get-input-data';

export function convertSnykTestOutputToSPDX(data: SnykTestOutput): SPDXv3 {
const outputFileName = data.projectName;
Expand Down

0 comments on commit a62508a

Please sign in to comment.