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 |
CodeSonar includes a taint analysis that tracks the influence of untrusted data on program execution. The taint analysis takes place during the pointer analysis phase.
The taint analysis and GUI functionality described in this page apply to analyzed C/C++ code only. C# and Java code undergo similar analyses, but the analyses do not depend on the configuration parameters listed in this page and the resulting taint propagation is not depicted in the CodeSonar GUI. See Taint Tracking for CodeSonar C# Warning Classes and Taint Tracking for CodeSonar Java Warning Classes for more information.
A data value is considered to be tainted if it originates from an untrusted source and has not yet been verified to be safe, or if its computation included one or more values that are themselves tainted.
We use the following terminology.
| Taint Metrics | There are three built-in taint metrics, all with procedure granularity. |
|---|---|
| Warning Classes |
The following warning classes
make use of the CodeSonar taint analysis.
|
| Taint Propagation | Taint propagation checking is available through the CodeSonar GUI. |
| Extension API | The CodeSonar Extension API provides programmatic access to taint analysis functionality for use in creating custom checks or extending the coverage of existing checks. |
If one or more taint warning classes are enabled, the CodeSonar analysis will automatically perform sufficient taint-related analysis to detect warnings of those classes.
Further tainted-value checking is performed in the pointer analysis phase, and is controlled by configuration file parameters TAINT_HIGHLIGHTING and MAX_POINTER_ANALYSIS_PASSES.
| TAINT_HIGHLIGHTING | Set to Yes to enable source highlighting. |
|---|---|
| MAX_POINTER_ANALYSIS_PASSES | 1 (in combination with TAINT_HIGHLIGHTING=Yes) is sufficient to resolve taint propagation. This provides information for source highlighting, and can also improve analysis results for taint warning classes. |
Various aspects of the taint analysis are controlled by other configuration parameters:
CodeSonar presents taint propagation information in the web GUI.
| Source Highlighting |
Source code displayed in the following CodeSonar GUI locations
is highlighted to show tainted values in the code. You can
customize the highlighting scheme in the highlight
legend: by default, tainted values are underlined in red.
|
|---|---|
| Taint Propagation | Taint propagation checking is available in the Explore Callers and Search Callers pages. The Tainted Value page displays a single taint propagation path. |
To report problems with this documentation, please visit https://support.codesecure.com/.