Skip to content

Commit

Permalink
fix: accept API key through environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
remie committed Dec 15, 2024
1 parent 29568e4 commit c273e8e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/commands/apt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,11 @@ program

program
.command('sca')
.description('Run the Data Center App Performance Testing software composition analysis (SCA) tool')
.addOption(new Option('--nvdApiKey <key>', 'The NVD API key (required due to rate limiting, see https://nvd.nist.gov/developers/request-an-api-key)'))
.description(`Run the Data Center App Performance Testing software composition analysis (SCA) tool
To avoid rate limiting issues, providing an NVD API Key is required (see https://nvd.nist.gov/developers/request-an-api-key)
`)
.addOption(new Option('--nvdApiKey <key>', 'The NVD API key (defaults to NVD_API_KEY environment variable)').default(process.env.NVD_API_KEY))
.addOption(new Option('--appKey <appKey>', 'The key of the app to scan'))
.addOption(new Option('-O, --outputDir <path>', 'Specify the output directory where to store the generated report (defaults to `./sca_report`)'))
.action(options => ActionHandler(program, SCACommand(), options));
Expand Down

0 comments on commit c273e8e

Please sign in to comment.