fortify / fcli

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

Faster copy-state #624

Closed LordBongio closed 1 month ago

LordBongio commented 1 month ago

Enhancement Request

Right now the copy state feature is really slow and can't really be used in an integrated pipeline environment. That is because if we create the release with the copy state and immediately after we start the scan there is a chance the release will bug out and it will forever be in a "creation" state. Furthermore, if it doesn't bug out, it will not complete the copy-state.

rsenden commented 1 month ago

Thanks for reporting; we also identified similar issues during internal testing of our GitHub Action where scans would fail if started immediately after copying a release. From an fcli perspective, I can think of 3 ways to work around this issue:

  1. As you suggested, have the copy-state flag wait for the copy to be actually completed.
  2. Have the scan start commands wait with submitting the scan request until release is no longer in suspended state.
  3. Have a separate wait-for command to wait until the copy has been fully completed.

In general, we utilize option 3 for long-running operations, but we need to think about whether any of the other options might be better to handle this particular situation.

As for making copying faster, I'll discuss with the FoD product manager but you may also want to consider opening an FoD support ticket. I think the upcoming FoD 24.4 release will bring some performance improvements, but not sure whether this also includes better performance for copying state.

rsenden commented 1 month ago

After internal discussion, we'll likely be implementing option 3, i.e., having a separate fcli fod release wait-for command that you'd need to invoke after copying a release and before submitting the scan request.