fortify / fcli

fcli is a command-line utility for interacting with various Fortify products
https://fortify.github.io/fcli/
Other
31 stars 18 forks source link

FoD: Add command for downloading FPR #423

Closed rsenden closed 12 months ago

rsenden commented 1 year ago

Add fcli fod release download-fpr --scan-type <type> -f <file> or similar command.

rsenden commented 1 year ago

Rudimentary implementation in a918cda7d605127034f2cf300657f5f39df110ae.

To-do's:

rsenden commented 1 year ago

For now, fcli will need to assume a 2-year retention period; if last scan date is older than 2 years, then fcli will need to throw an error instead of trying to invoke the download-fpr endpoint. Just to be sure, we may want to add a time-out option with an appropriate default value like 1 or 5 minutes, aborting the download operation with an error if FoD has been returning 202 responses for longer than the configured time-out.

Structuring of the commands is subject to ongoing discussion.

For OSS/SBOM, there are separate endpoints; download-fpr endpoints only support Static and Dynamic scan types.

kadraman commented 1 year ago

The check for last scan date has been added.

I also looked at adding a maxRetries check but is unclear what a suitable value would be as it seems if the FPR is not available it is generated/pulled from some sort of storage (which can take some time) but after that is more or less instantly available.