Offline Mode enhancement -- improve database transfer process

name: improve database transfer process
about: offline mode enhancement to make transferring database caches to air-gapped environment

Is your feature request related to a problem? Please describe

The current offline mode implementation requires the user to transfer the locally cached databases to the air-gapped environment. The databases are currently stored in a scanner specific location that is unique to each scanner. This requires the user to hunt for these cached databases and HopprCop does not offer a means of consolidating them.

Describe the solution you'd like

Ultimately these databases should be stored in a shared location. This could be done a few different ways. One of the most promising I think would be to use the already available cache_dir that the gemnasium scanner uses with the Grype and Trivy scanners. This would require using settings the Grype and Trivy scanners provide to change the cache location.

The other thing that would be nice is a flag to pack the databases up for the user too. Though I think this is less important than ensuring the location is consistent and easily settable by the user.

An additional issue that was discovered during some additional testing was that the Gyrpe and Trivy scanners do not perform a validation of the database in offline mode. This results in both being activated and then failing without good logging. Both of these scanners should perform checks for the database in offline mode before activating.

Describe alternatives you've considered

The user can get the cache information from the scan tools and gather the databases. This is just annoying and mildly infuriating as the locations are not obvious.

This is the currently documented approach.

Edited by Seth Stevens