Closed rsenden closed 1 year ago
Rudimentary implementation in a918cda7d605127034f2cf300657f5f39df110ae.
To-do's:
import-*
commands; we currently have a single download-fpr
command that accepts --scan-type
option, whereas we have separate import-*
commands for each scan typedownload-scan
instead?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.
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.
Add
fcli fod release download-fpr --scan-type <type> -f <file>
or similar command.