Download Fortify SCA User Guide

Transcript
At the end of translation, you can use -show-build-warnings to list all warnings and errors that were encountered during the translation process:
sourceanalyzer -b <build_id> -show-build-warnings
To view all of the files associated with a particular build ID, use the -show-files directive:
sourceanalyzer -b <build_id> -show-files
The following chapters describe how to translate different types of source code:
•
Translating Java Code
•
Translating .NET Source Code
•
Translating C/C++ Code
•
Translating Other Languages, such as ColdFusion, Classic ASP and JavaScript
Fortify SCA Per Use License Only, Verifying Available Lines
When using Fortify SCA with a per use license, the basic command line syntax to display the number of available lines is:
sourceanalyzer -auth-query
For translated projects, display the total number of lines required to analyze the project using the -show-loc option. Fortify SCA counts lines of code (LOC) in a project that are executable, and excludes lines such as comments and blank lines. The command to display the number of lines is: sourceanalyzer -b <build_id> -show-loc
If the number of available lines is less than the amount required to analyze the project, request lines from the Per Use Portal account before continuing with the analysis phase. See “Managing Per Use Accounts” on page 30 for details.
Analysis Phase
This topic describes the syntax for the analysis phase: scanning the intermediate files created during the translation and creating the analysis results file. The phase consists of one invocation of sourceanalyzer. You specify the build ID and include the -scan directive and any required analysis or output options.
Note: By default, Fortify SCA includes the source code in the FPR. The basic command line syntax for the analysis phase is:
sourceanalyzer -b <build_id> -scan -f results.fpr
The command line syntax to silently analyze a project for Fortify SCA with a per use license is:
sourceanalyzer -b <build-id> -auth-silent -scan -f results.fpr
This runs the scan without the prompt to deduct the lines. For more information about the command line options, see “Command Line Interface” on page 34.
Additional Steps for Fortify SCA Per Use If you are using Fortify SCA with a per use license, Fortify SCA displays the number of lines required to scan the project and prompts you before deducting the lines. Enter y (yes) to continue with the scan as follows:
Running this scan will deduct <number-of-lines> scan lines from 
your account. Would you like to proceed? [y/n] y
<number-of-lines> scan lines deducted. <number-of-lines> remaining
Fortify SCA User Guide
4