Description
While trying to execute ScanCentral command scancentral.bat package -bt none -o myPackage.zip
or scancentral package -bt none -o myPackage.zip the following error message appear:
error zsh: command not found: scancentral.bat
Resolution
Before running the Scan Central commands, please follow the steps below:
- Download the latest Fortify_ScanCentral_Client_XX.X.X.zip (current version: Fortify_ScanCentral_Client_24.2.0_x64.zip)
- Extract the contents of the Fortify_ScanCentral_Client__x64.zip file to any directory on your machine.
- What will be extracted:
a. “scancentral” and “scancentral.bat” is the client tool used to zip and publish projects
b. For Linux/Mac run “chmod 755 packagescanner pwtool scancentral”
c. Add the ScanCentral Client to the path.
i. Linux: export PATH= # Add to .bashrc or .profile
ii. Windows: System->Advanced->Environment Variables, Edit Path to add
iii. *nix-based systems: Same as Linux. Need bash installed.
Set the JAVA_HOME environment variable to point to JRE 11, and make sure that you add the java executable to the PATH environment variable.
Important! If you have a Java 8 project that fails to build because ScanCentral SAST requires Java 11 to run, set the SCANCENTRAL_JAVA_HOME environment variable to point Java 11. After you do, ScanCentral SAST runs correctly, and the build runs with the JAVA_HOME set to Java 8.
Open either Windows CMD or Terminal to use the scancentral commands.