Make convert function of Analyzers Common Library more generic

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

The convert function in the Analyzers Common Library currently makes use of a flagPrependPath CLI flag, however, not all analyzers need this flag. For example, the Container Scanning Tool doesn't need this flag, and instead needs to use a DockerImageName argument.

Also, the CLI context should be passed to the convert function, so that CLI flags can be extracted. This is needed when paths are absolute, and the root directory is defined in some environment variable.

Improvements

The purpose of this issue is to make the convert function more generic, so that a flag such as flagPrependPath is optional, and the client code can provide it's own set of flags without needing to override the entire convert function.

Risks

Involved components

Optional: Intended side effects

Optional: Missing test coverage

Edited by 🤖 GitLab Bot 🤖