Cast Scan Tool, a powerful command-line interface for code analysis, requires specific system requirements and dependencies for optimal performance. This guide outlines the necessary components for various operating systems, including Windows, Linux (Debian/Ubuntu and RHEL/CENTOS), and macOS.
Prerequisites for Running CAST Scan Tool
Java: Regardless of the operating system, Java 11 or a more recent version is mandatory for utilizing the CAST scan tool. Verify your Java version using the command: java -version
.
Perl: Most operating systems will require a Perl distribution. While specific versions may be mentioned below, using the latest stable version of Strawberry Perl is generally recommended for compatibility and performance.
Windows System Requirements
For Windows users, installing CAST Highlight’s Code Reader is the preferred method. The Code Reader bundles the necessary Perl binaries (Strawberry Perl) and modules, simplifying the setup process. Download the Code Reader from your CAST Highlight account in the “APPLICATION SCANS” section.
Alternatively, install Strawberry Perl and the following Perl modules individually:
- Digest::SHA
- XML::LibXML
- JSON
- Time::HiRes
- Math::BigInt
- Win32::LongPath
Use the following CPAN commands to install these modules:
cpan install Digest::SHA
cpan install XML::LibXML
cpan install JSON
cpan install Time::HiRes
cpan install Math::BigInt
cpan install Win32::LongPath
Linux System Requirements (Debian/Ubuntu)
On Debian/Ubuntu systems, ensure Perl 5 and the following libraries are installed:
- libjson-perl
- libxml-libxml-perl
Verify installation using:
perl -v
dpkg --get-selections libxml-libxml-perl libjson-perl
Linux System Requirements (RHEL/CENTOS)
For RHEL/CENTOS based systems, use yum to install the required packages:
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
macOS System Requirements
For macOS users, leveraging the CAST Highlight Docker image is the recommended approach for running the CAST scan tool. This containerized solution simplifies dependency management and ensures a consistent execution environment. Refer to the official CAST Highlight documentation for detailed instructions on using the Docker image. Alternatively, you can install Perl and the necessary modules using CPAN:
perl -v
cpan install XML::LibXML
cpan install JSON
Authentication for SSO/SAML Users
Users utilizing Single Sign-On (SSO) or Security Assertion Markup Language (SAML) for authentication must employ user tokens to authenticate with the CAST Highlight platform and upload scan results. Detailed information on user token management is available in the CAST Highlight documentation. Consult the documentation for instructions on generating and using user tokens with the CAST scan tool.