When trying to run a CAST scan the perl executable can't be found.
INFO perl: out: Running Perl Discoverer
ERROR console: error: missing perl library: XML::LibXML
It looks for it in Program Files (x86) while on the VM it looks for it in Program Files. Is there a way to tell HL the exact location of the "perl.exe" file?
Details
Pass the option --perlInstallDir "path_to_your_perl_binary_folder"
Here, --perlInstallDir is used when perl installation is not found (Root directory for perl installation.)
Path to Perl (--perlInstallDir) should not contain the name of the .exe.
For Windows
Prior to using the command line, it is preferable to install the Highlight Local Agent on your machine, in order to embed the required Perl binaries. Alternatively, you can install the required Perl distribution (Strawberry) if you don’t want to install the Local Agent. The Local Agent can be downloaded from your Highlight user account, in the APPLICATION SCANS page.
If you do install Strawberry perl, then please use the --perlInstallDir flag to point to it.
For Linux – RHEL/CENTOS based systems
Install the libraries: perl-XML-LibXML, perl-JSON and perl-Digest-SHA
$>yum -y install perl-Digest-SHA
$>yum -y install perl-JSON
$>yum -y install perl-XML-LibXML
$>yum -y install perl-Time-HiRes
$>yum -y install perl-Math-BigInt
For Linux Debian/Ubuntu
The following components must be installed on your machine: Perl 5 (tested on Strawberry 5.12.3.0), libjson-perl, libxml-libxml-perl
$>perl -v
on debian/ubuntu systems
$>dpkg –get-selections libxml-libxml-perl libjson-perl
NB:
-
In Windows, to locate the Installation Path where perl is installed, open Command Prompt or PowerShell and type the following command to find the path to Perl:
where perl.This will return the full path to the Perl executable. For example, it might return:
C:\Strawberry\perl\bin\perl.exe - In RHEL Perl is the full functional package, whereas Perl-interpreter is a minimal package, so Perl package should be the one that should be installed.
Related Articles
Highlight Automated Code Scan (Command Line)
Additional Resources
CAST Highlight Troubleshooting Guides
CAST Highlight Product Documentation
Ticket
25740, 42152, 49099, 59222, 59229
Comments