While running the CLI with the properties file in a Docker environment, it is observed that the parameter --propertiesPath is not recognized at all.
As a test, provided a wrong path or another name of the file like highlight.properties_ but there was no any error and the scan & upload were completed without any issue, but the parameters mentioned in the highlight.properties was not recognized.
For example, user wanted to scan only CS and JS using the parameter technologies=CS,PS but after the upload all the technologies are available in Highlight portal like Ksh, MariaDB, etc.
Workaround or Action Plan
The issue occurs if Docker do not have direct access to the local drive, you need to mount volumes, and the .properties file must refer to these Docker volume aliases.
So in your command, it should be something like:
docker run -v "C:\diaa\app\hlresults":/workingDir -v "C:\diaa\app\sources":/sourceDir -v "C:\diaa\properties":/propertiesPath casthighlight/hl-agent-cli --propertiesPath "/properties/highlight.properties"
and your highlight.properties file should be:
### MANDATORY PARAMETERS ###
workingDir=/workingDir
sourceDir=/sourceDir
You'll also need to change these lines in your highlight.properties file:
perlInstallDir=/opt/hlt/perl
analyzerDir=/opt/hlt/perl
Additional Resources
CAST Highlight Troubleshooting Guides
CAST Highlight Product Documentation
Ticket
38814
Comments