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 |
A warning describes a single (potential) weakness identified by CodeSonar.
Individual warnings are not securable resources. Access to warning information is controlled by the ANALYSIS_WARNING_EXISTS and ANALYSIS_WARNING_READ permissions; warning ownership is subject to the ANALYSIS_OWN_WARNINGS permission. If a role has one or more of these permissions for a particular analysis, all warnings issued by that analysis are covered.
In discussing warnings, we sometimes need to make a distinction between a single instance of a warning and closely related groups of instances. We use the following terminology.
| warning instance | A warning with a specific path and location, issued by a specific analysis. |
|---|---|
| warning group |
A set of warning instances that CodeSonar has determined to be
closely related - because they have the same fingerprint - will have the same Group ID
(but different Instance IDs). This
will happen if:
By default, the scope of a warning group is hub-wide: all warnings with the same fingerprint will be assigned to the same group, even if they are issued by analyses of different projects. To restrict warning group scope to individual projects, deselect Share annotations between projects in the Analysis tab of the Settings page. For more information, see Warning Group Scope. |
| representative instance |
For each analysis, one instance in every warning group is
designated the representative instance by the hub.
|
| overall representative instance |
The overall representative instance of a warning group
is the representative
instance for the most recent analysis that issued a warning
belonging to the group.
|
| warning cluster |
A set of warning groups that CodeSonar
has determined to be related with respect to a single analysis.
Warning clusters provide an opportunity to consider sets of
warnings at a broader granularity than that provided by warning
groups.
|
| cluster representative | For each analysis, one instance in each cluster is designated the cluster representative instance by the hub. The cluster representative is always the representative instance of a group in the cluster. |
This section describes each of the properties of a warning. The full list of properties is (in alphabetical order):
Some properties are associated with individual warning instances, some are shared between all the instances of a warning group. The Stored By column in the table below indicates whether each property is associated with an instance or a group.
| Name ( Search Language Field Name, if any) |
Stored By | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Identification |
|||||||||||
| Warning
ID ( id ) |
instance | The full unique identifier for a warning instance, formatted as g.i where g is a Group ID and i is an Instance ID. | |||||||||
| Group ID | instance | Warnings that CodeSonar has determined to be closely related will have the same Group ID (but different Instance IDs). | |||||||||
| Instance ID ( iid ) |
instance | The short unique identifier for a warning instance; this allows multiple warnings with the same Group ID to be distinguished. The Instance ID is sufficient to uniquely identify the warning instance, but does not convey any information about the group the instance belongs to. | |||||||||
| Fingerprint | instance |
A hash value based on certain properties of the warning
instance.
|
|||||||||
| Scope | group |
Specifies the extent to which the group (and its associated
properties and annotations) is shared across the hub. There are
two possibilities:
|
|||||||||
| Representative? ( similar ) |
instance | "true" if the warning instance is a representative instance for its group, "false" otherwise. | |||||||||
| Cluster ( cluster ) |
instance |
A hash value based on certain properties of the warning. This
is distinct from the Fingerprint
value. Warnings instances in the same cluster will have the
same Cluster value and the same Warning Analysis. The properties used
to compute the hash value are:
|
|||||||||
| Cluster Representative? ( clustered) |
instance | "true" if the warning instance is the cluster representative for its cluster, "false" otherwise. | |||||||||
Classification |
|||||||||||
| Warning
Class |
instance |
Every warning instance is associated with exactly one warning class.
The GUI and warning search language provide direct access to several Warning Class properties:
|
|||||||||
| Score |
instance |
CodeSonar computes and reports Score in order to suggest a
review order for warnings: warnings with a higher Score value
before warnings with a lower Score value.
Score is a composite of several factors:
Score is calculated directly from Rank:
Score = 100 - Rank
Score ColoringWhen the Score column is displayed in a table of warnings (in Analysis: Warnings Tab, Warning Cluster, or Warning Search Results), each Score cell has a colored background. The color reflects a Score partitioning whose default "pivots" are 21 and 56, meaning that coloring is applied as follows.
To change the boundaries ("pivots") of these color bands:
The score coloring in warning tables will now reflect your updated pivot values. |
|||||||||
| Rank ( rank ) |
instance |
CodeSonar computes and reports Rank in order to suggest a
review order for warnings: warnings with a lower Rank value
(minimum 0) before warnings with a higher Rank value (maximum
100).
With factory settings, the CodeSonar Web GUI presents Score (computed as 100-Rank) rather than Rank, but you can view Rank values by adding the Rank column to any table of warning classes. Rank itself is unlikely to be interesting unless you are implementing a custom warning class and want to set up its Rank calculations: these will determine the Scores of the resulting warnings. Rank is a composite of several factors:
Rank is determined as follows:
select cs_warningclass.label_xml,
min(cs_warninginstance.rank),
avg(cs_warninginstance.rank),
stddev(cs_warninginstance.rank),
count(cs_warninginstance.rank)
from cs_warninginstance,
cs_warninginstdata,
cs_warningclass
where cs_warninginstance.data_id=cs_warninginstdata.id and
cs_warningclass.id=cs_warninginstdata.warningclass_id and
analysis_id=5
group by cs_warningclass.label_xml
order by min(cs_warninginstance.rank)
|
|||||||||
| Effective Parse Error? | instance |
"true" if the warning instance is also effectively a
parse error (which will likely appear in the parse log), "false"
otherwise.
|
|||||||||
| Parse Diagnostic Severity | instance |
The parse diagnostic severity associated with the warning
instance.
|
|||||||||
Analysis Details |
|||||||||||
| Warning Analysis | instance |
The analysis that issued
the warning instance. The GUI and warning search
language provide direct access to several Warning Analysis
properties:
|
|||||||||
| Warning Project | instance |
The project that was
analyzed by Warning Analysis.
The GUI and warning search
language provide direct access to several Warning Project
properties:
|
|||||||||
| Detected ( detected ) |
instance | The date and time at which the warning instance was issued. | |||||||||
| First Detected ( firstdetected ) |
group |
The date and time at which the first warning instance in the
group was issued.
Note that this value never changes, even if the analysis that issued the first warning is subsequently deleted. |
|||||||||
| New? ( new_warning ) |
instance | true if Detected is no more than 10 seconds from First Detected, false otherwise. | |||||||||
Source Details |
|||||||||||
| Warning File | instance |
The source file in which the
warning was issued. The GUI and warning search
language provide direct access to several Warning File
properties:
|
|||||||||
| Procedure ( procedure ) |
instance | The name of the procedure in which the warning was issued. Note that warnings of some classes are not associated with procedures, and warnings of some other classes may occur in locations that are not inside any procedure. | |||||||||
| Line Number ( line ) |
instance | The line number in Warning File at which the warning was issued. | |||||||||
| Line Content ( line_content ) |
instance | The contents of the line in Warning File at which the warning was issued. | |||||||||
| Line Content XML ( line_content_xml) |
instance | An enhanced version of Line Content that includes some semantic detail. | |||||||||
| Listing ( listing ) |
instance |
A representation of the code context in which the warning was
issued, including information about the execution path leading
to the warning (if any).
For warnings associated with execution paths, we refer to the path fragment covered by the Listing as the core path. This is the sequence of calls and program statements whose execution will trigger the warning. Users can examine the possible call sequences leading into the core path with the Explore Callers and Search Callers functionality. |
|||||||||
| Listing XML ( listing_xml ) |
instance | An enhanced version of Listing that contains file names and the expanded forms of all call sites, among other information. | |||||||||
| Source File Name | instance | For a warning issued by a binary code analysis with source
information available, the basename of the source file
corresponding to the warning location. This field is empty if the warning was issued by a source code analysis or a binary code analysis with no source information available. |
|||||||||
| Source File Path | instance | For a warning issued by a binary code analysis with source
information available, the absolute path name of the source file
corresponding to the warning location. Depending on the method
used to obtain source correspondence information, this may be
the same as Source File
Name. This field is empty if the warning was issued by a source code analysis or a binary code analysis with no source information available. |
|||||||||
| Source Line Number | instance | For a warning issued by a binary code analysis with source
information available, the line in Source File Name corresponding to the
warning location. This field is empty if the warning was issued by a source code analysis or a binary code analysis with no source information available. |
|||||||||
Conditions |
|||||||||||
| Preconditions | instance | The set of conditions that must hold in order for the vulnerability described by the warning to occur. | |||||||||
| Postconditions | instance | The set of conditions that must hold directly after the vulnerability described by the warning has occurred. | |||||||||
User-Controlled |
|||||||||||
| Priority ( priority ) |
group |
A ranking that reflects the relative importance placed on the
warning group.
Use the Settings page to specify a default priority for new warnings. |
|||||||||
| State ( state ) |
group |
The current state of the weakness(es) described by the warning
group.
Use the Settings page to specify a default state for new warnings. |
|||||||||
| Finding ( finding ) |
group | Whether or not the warning group corresponds to a real weakness in the code. | |||||||||
| Owner ( owner ) |
group | The user responsible for the warning group. This must be a user with ANALYSIS_OWN_WARNINGS permission for the analysis that issued the warning. | |||||||||
| Notes |
group |
A list of comments associated with the warning group. There are
two kinds of note:
|
|||||||||
| Modified | group |
The date and time at which the report was last modified
(user-controlled indirectly only). This is the most recent of:
|
|||||||||
Warning information is available in the CodeSonar GUI as follows.
| Warning Report | Full information about a single warning instance. |
|---|---|
| Warning Search Results | A table with one line for each warning instance that matches the search conditions. |
| Analysis | The Warnings tab contains a table with one line for each warning instance issued by the analysis. |
| Warning Cluster | Full information about a single warning cluster from a single analysis. |
| Source Listing | When Show warnings is selected CodeSonar will display annotations at locations where warnings were issued (if any). |
To report problems with this documentation, please visit https://support.codesecure.com/.