Displaying Analysis Results Information from an FPR File
The FPRUtility
A command-line utility used to merge audited projects, verify FPR signatures, combine or split source code files and audit projects into FPR files, and display information from FPR files. -information option displays information about the analysis results. You can obtain information to:
- Validate signatures
- Examine any errors associated with the FPR
Fortify project results. The Fortify Static Code Analyzer output file format. - Obtain the number of issues for each analyzer
A component of a security software product that looks for security issues using one or more particular techniques., vulnerability
A weakness that allows an attacker to reduce a system’s information assurance. Vulnerability is the intersection of three elements: a system susceptibility or flaw, attacker access to the flaw, and attacker capability to exploit the flaw. To exploit a vulnerability, an attacker must have at least one applicable tool or technique that can connect to a system weakness. (same as issue) category, or custom grouping - Obtain lists of issues (including some basic information). You can filter these lists.
- Obtain the list of analyzed files and the number of lines of code (LOC) for each file. You can also compare the LOC with another FPR.
To display signature information for the analysis:
FPRUtility -information -signature -project <project>.fpr -f <output>.txt
To display a full analysis error report for the FPR:
FPRUtility -information -errors -project <project>.fpr -f <output>.txt
To display the number of issues per vulnerability category or analyzer:
FPRUtility -information -categoryIssueCounts -project <project>.fpr FPRUtility -information -analyzerIssueCounts -project <project>.fpr
To display the number of issues for a custom grouping based on a search:
FPRUtility -information -search -query <search_expression> \ [-categoryIssueCounts] [-analyzerIssueCounts] \ [-includeSuppressed] [-includeRemoved] \ -project <project>.fpr -f <output>.txt
Note: By default, the result does not include suppressed and removed issues. To include suppressed or removed issues, use the -includeSuppressed or -includeRemoved options.
To display information for issues in CSV format:
FPRUtility -information -listIssues \ -search [-queryAll | -query <search_expression>] \ [-categoryIssueCounts] [-analyzerIssueCouts] \ [-includeSuppressed] [-includeRemoved] \ -project <project>.fpr -f <output>.csv -outputFormat CSV
To display information for all issues from the most recent scan (excluding unsuppressed and removed issues) using the Quick View filter set
Determines the issues to display in the auditing interface. The filter set customizes the analysis results panel by determining the number and types of containers (folders) and how issues are displayed.:
FPRUtility -information -listIssues \ -search -queryAllExistingUnsuppressed \ -filterSet "Quick View" \ [-categoryIssueCounts] [-analyzerIssueCouts] \ -project <project>.fpr -f <output>.txt
To display a comparison of the number of lines of code for analyzed files in two FPRs:
FPRUtility -information -loc -project <project>.fpr \ -compareTo <oldproject>.fpr -f <output>.txt
FPRUtility Information Options
The following table lists the FPRUtility options that apply to project information.
| FPRUtility Option | Description |
|---|---|
|
|
Displays information for the project. |
| Specify one of the following options to indicate what information to display: | |
|
|
Displays the signature for analysis results and rules. |
-mappings
|
Displays the migration mappings report. |
-errors
|
Displays a full error report for the FPR. |
-versions
|
Displays the Fortify Static Code Analyzer and the Fortify Secure Coding Rulepacks versions used in the static scan. |
-functionsMeta
|
Displays all functions that the static analyzer encountered in CSV format.
To filter which functions are displayed, include |
-categoryIssueCounts
|
Displays the number of issues for each vulnerability category. |
-analyzerIssueCounts
|
Displays the number of issues for each analyzer. |
-search <query_option>
|
|
-loc
|
Displays the list of analyzed files each with the number of lines of code (LOC) in the following format: <filename>: <total_loc> (<executable_loc>) where <total_loc> is the approximate number of lines that contain code constructs (comments are excluded). Use
|
|
|
Specifies the FPR from which to extract the results information. |
|
|
Displays the location for each issue in one of the following formats:
You can also use the If you specify the "<instanceid>", "<category>", "<sink_filename>:<line_num>", "<analyzer>" |
-filterSet <filterset_name> |
Displays only the issues and counts that pass the filters specified in the filter set. Filter sets are ignored without this option. Important! You must use |
|
|
Specifies the output file. The default is |
|
|
Specifies the output format. The valid values are |
|
|
Displays debug information that can be helpful to troubleshoot issues with FPRUtility. |
FPRUtility Signature Exit Codes
Upon completion of the -information -signature command, FPRUtility provides one of the exit codes described in the following table.
| Exit Code | Description |
|---|---|
| 0 | The project is signed, and all the signatures are valid. |
| 1 | The project is signed, and some, but not all, of the signatures passed the validity test. |
| 2 | The project is signed but none of the signatures are valid. |
| 3 | The project had no signatures to validate. |