JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.

If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.

If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.

CodeSonar® 9.2p0 CONFIDENTIAL CodeSecure Inc
General

GUI Reference: Analysis

This page displays information about a CodeSonar analysis:

Several operations can be carried out on this page:

Analysis pages are also used to report the results of dry runs.

The Analysis page is available for all analyses, independent of the language or languages involved.



Navigating To

Important Note: the CodeSonar Web GUI makes extensive use of JavaScript. Make sure JavaScript is enabled in your web browser.

The Analysis page can be reached in any of the following ways.

From Analysis Cloud Active Jobs Click on a row in the table of processes to navigate to the corresponding Analysis page.
From Home
or Project Search Results
or Project Tree
Click on a project name in the project table to navigate to the Analysis page for the most recent CodeSonar analysis of the project.
(Note that if the hub analysis settings have been changed from the defaults, this may instead navigate to the Project page for the project.)
From Project
or Analysis Search Results
Click on a row in the analysis table to navigate to the corresponding Analysis page.
From Source Listing Click the analysis name in the breadcrumbs.

If the Analysis: Files tab is an establishing page for a file browse sequence, each Source Listing page that belongs to the sequence will also provide a browse sequence navigation link to that tab.

From Warning Report Click the analysis name in the breadcrumbs.

If the Analysis: Warnings tab is an establishing page for a warning browse sequence, each Warning Report page that belongs to the sequence will also provide a browse sequence navigation link to that tab.

By URL Depends on the page tab selected:
warnings tab
http://hub_location/analysis/analysis_id.html
files tab
http://hub_location/analysis/analysis_id-files.html
procedures tab
http://hub_location/analysis/analysis_id-procedures.html

Page Properties

See Tab Properties entries for individual tabs:

Contents and Usage

The following annotated screenshot shows the various parts of an Analysis page.

Annotated Screenshot: Analysis Page standard header breadcrumbs file explorer page heading page heading analysis information analysis information analysis messages, if any analysis messages, if any alerts (if any) alerts (if any) tabs standard footer

Standard Header See GUI Reference: Standard Header.
Breadcrumbs Home > [Other_ProjectTree_Ancestors >] Project_Name > Analysis_Name
where
  • Home links to the GUI Home page
  • Together with the Home link (corresponding to the root project tree), Other_ProjectTree_Ancestors represents the project tree ancestors of the analyzed project as a >-separated sequence of project tree names. Each name links to the corresponding Project Tree page.
  • Project_Name is the name of the analyzed project, and links to the corresponding Project page.
  • Analysis_Name is the current value of the Analysis property for this analysis.
Page Heading Project_Name : Analysis_Name
The heading line includes < previous and next > links. These allow forward and backward navigation through the chronologically ordered Analysis pages for Project_Name.
  • Click the < previous link to navigate to the Analysis page for the previous analysis of Project_Name. If the link is unavailable (grayed out), Analysis_Name is the earliest analysis of Project_Name stored on the hub.
  • Click the the next > link to navigate to the Analysis page for the next analysis of Project_Name. If the link is unavailable (grayed out), Analysis_Name is the most recent analysis of Project_Name stored on the hub.
Analysis Information Options Further information about the analysis is provided by the Analysis State progress bar along with eight information sections: Analysis Details, Properties, Charts and Tables, Reports, Metrics, Compare, and API Console (where available).
  Analysis State A progress bar showing the current analysis state and the estimated time to completion (unless it is finished).
  • If the state is Building, you can click on the progress bar to view the CodeSonar Parse Log.
  • If the state is Building over; Native build failed, you can click on the progress bar to view the Build Log.
  • If the state is anywhere in the range from Linking to Analyzing (inclusive), or is Stalled, you can click on the progress bar to view the CodeSonar Analysis Log.
  Analysis Details Click for general details about the analysis.

screenshot fragment: show Analysis Details expansion

Analysis The analysis name.
Auto-Deletion Settings A checkbox labeled Protect analysis from auto-deletion. For more information, see Auto-Deletion for Analyses, Analysis Logs, and Project Analysis Directories.
Analysis Description To change, click edit and proceed as described in Changing the Analysis or Analysis Description Text, below.
Project Description (if any) for the project analyzed.
Analysis ID  
Machines The machine or machines that managed building and analyzing the CodeSonar project:
If the analysis is still running, a kill this analysis link is displayed next to the Analysis Machine name. To terminate the analysis, leaving it in Stalled state, click kill this analysis and proceed as described in Terminating the Analysis, below.
Started  
Finished  
Details Basic properties of the Analysis Launch Daemon for the analysis: Username (System User), Hub User, Machine, Address.
Logs Links to the analysis Build Log, CodeSonar Parse Log, and CodeSonar Analysis Log.
To delete all logs for the analysis, click remove logs and proceed as described in Removing the Analysis Logs, below.
If the logs have already been removed, a "logs have been deleted" notification will be displayed instead of the table of links.
.prj_files Information about the project analysis directory (pfilesname.prj_files/), which is located on the analysis machine.

To delete the project analysis directory and all its contents, click remove .prj_files and proceed as described in Removing the Analysis Directory, below.
If the project analysis directory has already been removed, or if a subsequent incremental analysis has used the same directory, a "deleted" notification will be displayed instead of the table of information.
Incremental Parent The analysis name of the parent of this analysis. Click the name to navigate to the corresponding Analysis page. This row is not displayed if there is no incremental parent on the hub.
Incremental Children A comma-separated list of the analysis names of all child analyses of this analysis. Click a name to navigate to the corresponding Analysis page. This row is not displayed if the analysis has no children on the hub.
Lines with Code The value of metric LCode.
Properties Click the link to expand the Properties section.

screenshot fragment: show Properties expansion (unpopulated)

The section provides access to the user-assigned properties for the analysis.

If no user-assigned properties have been associated with the analysis, the Properties section contains only an add new property link as shown above. Otherwise, the current properties are also shown, with edit and delete links:

screenshot fragment: show Properties expansion (populated)

If a property value contains a URL, the URL is displayed as a hyperlink.

Charts and Tables Click the link to expand the Charts and Tables section.

screenshot fragment: show Charts and Tables expansion

The section provides access to various summary information about the analysis:
  Reports Click the link to expand the Reports section.

screenshot fragment: show Reports expansion

See GUI Reference: Management Reports: Availability for full details.
  Metrics Click the link to expand the Metrics section.

screenshot fragment: show Metrics expansion

The section contains links to various summary information about the projects on the hub:
  Compare Click the link to expand the Compare Analyses section.

screenshot fragment: show Compare expansion

This section provides options for comparing the sets of warnings issued by two or more analyses.

The Show warnings ... by this analysis dropdown menu has three options. Select the type of comparison in this menu.

gained or lost Show all warnings from either analysis that are not in both analyses.

The comparison is carried out by executing a search where the query is of the form

(aid:Acurrent UNION aid:Aother) DIFFERENCE (aid:Acurrent INTERSECT aid:Aother)
gained Show only warnings that are in the current analysis but not the analysis selected in the compared to the ... analysis dropdown menu.

The comparison is carried out by executing a search where the query is of the form

aid:Acurrent DIFFERENCE aid:Aother
lost Show only warnings that are not in the current analysis but are in the analysis selected in the compared to the ... analysis dropdown menu.

The comparison is carried out by executing a search where the query is of the form

aid:Aother DIFFERENCE aid:Acurrent

The compared to the ... analysis dropdown menu has two options. Select the analysis to be compared against in this menu.

The previous analysis in the same project. If there is no previous analysis (because this is the first analysis of the project, or because all earlier analyses have been removed), this list item is not displayed.

Note that the previous analysis is defined as the previous analysis that is in the finished state. Any newer incomplete or failed analyses are ignored.

The next analysis in the same project. If there is no next analysis (because this is the most recent analysis of the project, or because all subsequent analyses have been removed), this list item is not displayed.

Note that the next analysis is defined as the next analysis that is in the finished state. Any newer incomplete or failed analyses are ignored.

Select analyses: if you want to compare against an analysis other than the previous or next analysis, or compare against two or more other analyses, you will need to specify which analyses to include. Note, this comparison uses the gained or lost behavior, and is carried out by executing a search where the query is of the form

for Analysis IDs A1..An.

See selecting analyses for comparison below for details.

Analysis comparison results are displayed in a Warning Search Results page with the following properties.

  • The table of warnings includes an analysis check column for each analysis involved in the comparison.
  • If at least one warning instance from warning group G was issued by at least one of the analyses involved in the comparison, there is exactly one instance of G in the table (and that instance was issued by one of the analyses in question). Otherwise there are no instances of G.
  • The table entry for a warning instance belonging to warning group G has a checkmark in the analysis check column for analysis A if and only if analysis A issued at least one warning instance in group G.
  API Console [Only available if WEB_CONSOLE=Yes for this analysis. ]
Click for a link to the Python Console.

screenshot fragment: show API Console expansion

Alerts Any alerts that have been issued for the build/analysis. Click on an alert for full information about the problem and how to resolve it.

screenshot fragment: alerts example

Analysis Messages Any messages that have been issued for the build/analysis. There are two message types.
  • " Error: The analysis stopped due to an unexpected problem..."
    The analysis has stalled. Click the link provided to navigate to the analysis log.
  • "This analysis was a dry run. A full analysis would utilize an additional <num> lines from the license..."
    This indicates that the analysis was a dry run.
File Explorer See below.
Page Tabs The Analysis page has three tabs, each of which has its own entry in the GUI reference:
  • Warnings contains a table of the warnings issued by the analysis, with links to individual warning reports.
  • Files contains a table of the files analyzed by the analysis, with links to individual source listings.
  • Procedures contains a table of the procedures encountered by the analysis, with links to individual procedure definitions inside source listings.
Standard Footer See GUI Reference: Standard Footer.

Changing the Analysis or Analysis Description Text

Follow these steps to change the Analysis or Analysis Description. This requires ANALYSIS_READ and ANALYSIS_WRITE permission for the analysis.

  1. Expand the Analysis Details.
  2. Click edit next to the entry you want to change. An editing form will open, as in the example below.

    screenshot fragment: description editing form expansion

    The text field will contain the text of the current entry, if any.
  3. Enter your new text (or edit the existing text).
  4. Click Save to save your changes, or Cancel to cancel the changes and close the editing form.
  5. If your change was successful, the page will now display your new description.

Terminating the Analysis

If the analysis is still running you can terminate it, leaving the analysis in Stalled state. This requires ANALYSIS_TERMINATE permission for the analysis.

  1. Expand the Analysis Details.
  2. In the Machines field, click kill this analysis. If there is no kill this analysis link, the analysis has already finished (or has already been terminated).
    A confirmation dialog will open, as shown below.

    screenshot fragment: link expansion for project removal

  3. Click Kill to terminate the analysis, or Cancel to cancel analysis termination and close the confirmation dialog.

Removing the Analysis

Follow these steps to remove all information related to the analysis from the hub database. This requires ANALYSIS_READ, ANALYSIS_DELETE, and ANALYSIS_TERMINATE permission for the analysis.

  1. Expand the Analysis Details.
  2. In the Analysis field, click remove this analysis. A confirmation dialog will open, as shown below.

    screenshot fragment: link expansion for project removal

  3. Click Remove to remove the analysis, or Cancel to cancel analysis removal and close the confirmation dialog.

Removing an analysis will also remove its logs, but will not remove the project analysis directory.

Removing the Analysis Logs

Follow these steps to remove all logs for the analysis from the hub database. All other analysis information will remain intact. You may wish to do this if you are trying to reduce the size of the hub database and do not anticipate any future need for any information in the logs from this analysis. If an analysis is still running when you remove its logs, any further log information that is submitted to the hub by that analysis will be ignored. This requires ANALYSIS_READ and ANALYSIS_DELETE permission for the analysis.

  1. Expand the Analysis Details.
  2. In the Logs field, click remove logs. A confirmation dialog will open, as shown below.

    screenshot fragment: link expansion for project removal

  3. Click Remove to remove the logs, or Cancel to cancel removal and close the confirmation dialog.

Removing the Project Analysis Directory

Follow these steps to remove the project analysis directory (pfilesname.prj_files/) from the analysis machine. Analysis information stored on the hub will remain intact. You may wish to do this if you are trying to make space available on the analysis machine and do not anticipate any future need for any information from the project analysis directory. In particular, do not remove the project analysis directory if you want to preserve access to any of the following.

Removing the project analysis directory requires ANALYSIS_READ, ANALYSIS_DELETE and ANALYSIS_TERMINATE permission for the analysis.

  1. Expand the Analysis Details.
  2. In the .prj_files field, click remove .prj_files. A confirmation dialog will open, as shown below.

    screenshot fragment: link expansion for project removal

  3. Click Remove to remove the .prj_files directory and all its contents, or Cancel to cancel removal and close the confirmation dialog.

The analysis launch daemon must be running in order to delete the project analysis directory. If that launch daemon is currently offline, the deletion will be delayed until it is online again.

Dry Runs

For dry runs:

File Explorer

The File Explorer allows you to restrict the contents of any Analysis page tab to a single source file or directory tree. This restriction is applied in addition to any constraints arising from the current visibility filter selection.

In its collapsed state, the File Explorer is indicated by a shaded bar at the left of the page.

screenshot fragment: clicking shaded bar to expand File Explorer.

Using the File Explorer

Click on a file or directory name to select it. The tab contents will update automatically, and your selection will be highlighted in the File Explorer panel.

In the following annotated screenshot, the user has clicked on include.

annotated screenshot: effect of selecting a directory in the File Explorer

Expanding, Resizing, and Collapsing

expanding To expand the File Explorer from its collapsed state, click the shaded bar.
resizing To resize, drag on the right edge of the File Explorer.
collapsing To collapse it from its expanded state, drag the right edge to narrow the File Explorer until the shaded bar reappears.

Modifying User-Assigned Analysis Properties

You can add, remove, or edit the user-assigned properties associated with the analysis.

Add a User-Assigned Analysis Property

Follow these steps to associate a new user-assigned analysis property with the analysis.

  1. Expand the Properties.
  2. Click add new property. A form will open, as shown below.

    screenshot fragment: link expansion for adding a new property

  3. Enter the Property Key. This must contain at least one non-space character, and not match any field-name from the analysis search language or project search language.

    The Property Key is the "name" of the property. For example, you might have a property with key "commit" to store the information about which Git commit corresponds to the analysis.

    The set of all property keys on the hub is visible to all users, but the set of property keys and values for a specific analysis is only visible to users with ANALYSIS_READ permission for that analysis.

  4. Enter the Property Value. This can be any string.
    For example, suppose you have a property with key "commit" as described in the previous step. Then the value might be the commit hash, or a GitHub URL, or some other string that conveys the commit information in a useful way.
  5. Click Save to add the property, or Cancel to cancel the changes and close the form.
  6. If your change was successful, the Properties section will now include an entry showing the key and value for your new property.

Remove a User-Assigned Analysis Property

Follow these steps to remove one of the user-assigned analysis properties.

  1. Expand the Properties.
  2. Click delete next to the property you want to delete. A confirmation dialog will open.
  3. Click Remove to remove the property (key and value), or Cancel to cancel removal and close the confirmation dialog.

Edit a User-Assigned Analysis Property

Follow these steps to change the value of one of the user-assigned analysis properties (see note).

  1. Expand the Properties.
  2. Click edit next to the property whose value you want to change. An editing form will open, as in the example below. The text field will contain the current value, if any.

    screenshot fragment: link expansion for editing a property value

  3. Enter your new value (or edit the existing value).
  4. Click Save to save your changes, or Cancel to cancel the changes and close the form.
  5. If your change was successful, the Properties section will show the updated property value.

Note: If you want to adjust the key associated with a property you will need to add a new property with the new key and appropriate value, then remove the property with the old key.

Selecting Analyses For Comparison

The compare with previous analysis and compare with next analysis links provide direct shortcuts to analysis comparison results. If you want to compare the results of this analysis with some other analysis or analyses, you can construct a comparison query as follows.

  1. Expand the Compare section, if it is not already expanded.
  2. Click Select analyses.

    CodeSonar will display the Project page for the project analyzed by this analysis, augmented with functionality for selecting analyses for comparison.

    annotated screenshot fragment: augmented Project page

  3. Select an analysis to add to the comparison query.
  4. CodeSonar will return to the starting Analysis page. The Compare section will display an updated list of the analyses selected for comparison.

    annotated screenshot fragment: expanded Compare section showing current set of selected analyses

Navigating From

view the analysis warnings, files, or procedures Select the appropriate page tab. Note that each tab provides additional navigation functionality.
compare the analysis results against one or more other analyses Expand the Compare section, then select the desired comparison link.
create a metric report for this analysis Expand the Metrics section, then select create new report.
view a shortcut metric report for this analysis Expand the Metrics section, then select the desired report link.
view a shortcut metric chart for this analysis Expand the Metrics section, then select the desired chart link.
view a shortcut warning table or chart for the analysis Expand the Charts and Tables section, then select the desired chart or table link.
view the analysis build, parse, or analysis log Expand the Analysis Details section, then select the desired log from the list of links.
view parent project information Click on the project name in the page breadcrumbs.
view ancestor project tree information Click on the project tree name in the page breadcrumbs.
remove the analysis Click on Remove this analysis and proceed as described above.

Related Tasks

Other Related Links

 

To report problems with this documentation, please visit https://support.codesecure.com/.