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.0p0 Hot Tips | CONFIDENTIAL | CodeSecure Inc |
| Authentication | Third-party authentication mechanisms such as LDAP can be applied to a CodeSonar hub. |
|---|---|
| Access Control | The hub Administrator can restrict access to the information stored on the hub on a per-user basis. Full Role Based Access Control (RBAC) will be available in CodeSonar 4.2. |
| Configuration Tool | CodeSonar now provides a command line tool for performing configuration tasks such as setting up a hub or obtaining a signed license. For details, see The CodeSonar Configuration Tool. |
| Distributed Analysis | For all parallel CodeSonar analyses, the analysis master can accept any manually-started analysis slave process, regardless of the process location or owner, provided that the slave process has access to the address on which the analysis master is listening (and that the other conditions for accepting a manually-started slave process are met). In this sense, all parallel analyses can be distributed across multiple machines if the listening address for the analysis master permits it. For details, see Distributed Analysis. |
| Warning Classes | A large number of new warning classes, many of them in
support of the MISRA
C:2012 and MISRA C:2004 guidelines. Warning class category information is now available in CSV files. See the Warning Categories page for details and links. |
| Warning Clustering | New notions of warning cluster and cluster representative. |
| Browse Sequences | Where possible, the CodeSonar GUI will provide warning browse sequences A warning browse sequence facilitates stepping through Warning Reports for the warnings in a recently-viewed table without needing to navigate back and forth to the table. Similarly, the GUI will provide file browse sequences that facilitate stepping through Source Listings. For full details, see Warning and File Browse Sequences. |
| Automatic Warning Assignment | When automatic assignment is enabled and a user makes changes to a warning that has never previously been modified, that user will be made the Owner of the warning unless their modifications include setting an Owner. |
| Configuration Presets | Configuration presets are named combinations of configuration parameter settings that can be applied directly in the CodeSonar build/analysis command. CodeSonar ships with a number of ready-to-use presets. |
| Taint Path Checking | The propagation of taint to a specified value along a specified path can be examined in the CodeSonar GUI. |
| GUI Changes | Several new GUI page types, and new functionality on a number of existing pages. |
| New Build/Analysis Flags | -clean, -preset, -conf-file |
| Java Build/Analysis | Options -sourcepath and -auxclasspath can now be specified more than once. |
| Path Normalization | CodeSonar now also stores stores a normalized file path for files; searches that involves file and directory paths are now carried out with respect to the normalized forms. Unnormalized paths no longer undergo specific downcasing on Windows (although they may be downcased by Windows tools). There are new API functions to retrieve normalized forms. |
| codesonar relocate | If you have analyzed a project and then moved the analysis files, run codesonar relocate to inform the hub of their new location. Task: Relocate Analysis Files provides a detailed usage example. |
| Score | Score is a new property of a warning instance. |
| Significance | Significance is a new property of a warning class. |
| Metrics | There are a number of new built-in metrics. |
| Configuration Parameters | There are a number of new and modified configuration parameters; two parameters have been removed. |
| API Changes | Changes to Extension API, Plug-In API, General Purpose API. |
| AST Changes | There are new and modified AST classes. |
| Eclipse Plug-In Changes | The Warnings tab has new Score and Significance columns, and no longer has a Rank column. |
| GUI Internationalization | A selector in the standard GUI header allows users to select
the (human) language in which warning report
annotations are rendered. GUI links to warning class
documentation will navigate to documentation in the
appropriate language (where available). There are currently two available languages: English (en) and Japanese (ja). The default language selection is specified by the Administrator. |
| New OSes Supported |
We have added CodeSonar support for two operating systems:
|
| CWE Version | This version of CodeSonar uses CWE version 2.8, published July 31, 2014. |
| Other Improvements |
|
| Future Warning | In a future CodeSonar version, the C API will change from providing functions that operate on compilation unit based positions to providing functions that operate on file based positions. In particular, functions that take or return cs_uid/cs_unitline/cs_offset will be replaced with versions taking or returning cs_sfid/cs_line/cs_file_offset, or removed if no longer necessary. The corresponding changes will be made in the APIs provided for other languages. If you are writing new plug-ins based on location information, structure your code to make it easy to replace any calls to such functions. There will be no release in which both kinds of function are supported. |
See Authentication and User Accounts: User Authentication for full details.
If your organization already has infrastructure for authenticating users, you can use a hub authentication plug-in to configure the CodeSonar hub to use the same infrastructure for hub authentication. The new GUI Authentication Services and Edit Authentication Service pages provide functionality for viewing, modifying, adding, and removing authentication services.
| Authentication Type | Hub Machine OS |
|---|---|
| LDAP | all OSes |
| Linux/Unix/Mac Login | all OSes except Windows |
| Windows Login | Windows |
Users will always sign in to the hub through the GUI Sign In page. A sign-in attempt will be successful if
One consequence of the new authentication functionality is that hub user account email addresses are no longer required to be unique.
See Authentication and User Accounts: Access Control for full details.
The Administrator can set access controls for ordinary users with respect to several kinds of information:
| Analysis Results | The Administrator can control access to projects, analyses, warnings, files, procedures, metrics, and code by enforcing specified Visibility Filters on a hub-wide or per-user basis. |
| GUI Access by Session Type | The Administrator can specify whether anonymous sessions may access the GUI, and whether certain commands and functionality are available only to the Administrator. |
| User Account Information | The Administrator controls the settings of Can Change Email? and Can Change Password? for all ordinary users. |
For a usage example, see Task: Lock Down a Hub.
Full Role Based Access Control (RBAC) will be available in CodeSonar 4.2.
Pages that previously offered warning path feasibility checking now have additional modes in which they offer taint propagation checking and taint propagation checking in warning context.
For more details, see:
There are a number of GUI changes in this version of CodeSonar.
| Analysis Cloud | View information about the hub's analysis cloud register, modify process limits for launch daemons in the register. |
|---|---|
| Analysis Cloud Active Jobs | View information about analysis processes that are currently cloud-associated with launch daemons in the hub's analysis cloud register, broken down according to the analyses that the processes are attached to. |
| Authentication Services | View and configure authentication services for the hub. |
| Bulk Add Users | Create new user accounts in bulk. |
| Edit Authentication Service | View and modify the configuration for a hub authentication service. |
| Tainted Value | Examine propagation of taint to a specific value along a specific path. |
| Warning Cluster | List the representative instances of all warnings in a specific cluster, navigate to their warning reports. |
| Account Editor |
New access control functionality.
|
|---|---|
| Admin Settings |
Changes to several tabs.
|
| Advanced Search |
Changes to Warnings
tab:
|
| Analysis: Procedures | Additional available table columns: File Path, Directory, Line Number, Language. |
| Analysis: Warnings | Additional available table columns: Score (including score coloring), Cluster, Significance, Line Content. |
| Analysis Search Results | Additional available table column: Linking
Started. The availability of 'overwrite' functionality for saving a search is now managed by the new access control mechanism. |
| Code Search Results | The availability of 'overwrite' functionality for saving a search is now managed by the new access control mechanism. |
| Explore Callers |
Two additional page modes are
now available, supporting the new taint
path checking functionality.
We previously documented Explore Callers (Warning) and Explore Callers (Source) on separate GUI reference pages; they are considered to be two modes (Warning, Ordinary) of the "Explore Callers" page type and are documented as such. |
| File Search Results | The availability of 'overwrite' functionality for
saving a search is now managed by the new access control mechanism. New table columns: Analysis Name , Analysis ID, Analysis Description, Project, Project Description |
| Home | Additional available table column: Linking Started. |
| Manage Saved Searches | The availability of deletion functionality is now managed by the new access control mechanism. |
| Metric Report | Additional available columns for procedure-granularity
tables: File Path, Directory, Line Number, Language. The availability of 'overwrite' functionality for saving a search is now managed by the new access control mechanism. |
| Procedure Search Results | Additional available table columns: File Path, Directory,
Line Number, Language. The availability of 'overwrite' functionality for saving a search is now managed by the new access control mechanism. |
| Project | Additional available table column: Linking Started. |
| Project Search Results | Additional available table column: Linking
Started. The availability of 'overwrite' functionality for saving a search is now managed by the new access control mechanism. |
| Search Callers |
Two additional page modes are
now available, supporting the new taint
path checking functionality.
|
| Sign In | Because email addresses are no longer required to be unique,
they cannot be provided for identification at sign-in: a username
is required. The availability of "Forgot Password" functionality is now managed by the new access control mechanism. |
| Source Listing | Clicking a line number no longer offers navigation to the
Explore Callers
page: all path exploration options are offered through the
information
window. Automated scrolling to function definitions has been de-animated. |
| User Settings | The availability of functionality for changing password and email is now managed by the new access control mechanism. |
| Visualization Tool |
Several changes.
|
| Warning Report | Automated scrolling to the warning location has been de-animated. |
| Warning Search Results | Additional available table columns: Score (including
score
coloring), Cluster,
Significance,
Line
Content. The availability of 'overwrite' functionality for saving a search is now managed by the new access control mechanism. |
| Feature | Changes |
|---|---|
| Charting | The set of colors used for charts has been changed to improve the degree of contrast between adjacent chart elements. |
| Information Window | A number of changes. |
| Source Interaction |
A number of changes.
|
| Saving Searches | The availability of 'overwrite' functionality is now managed by the new access control mechanism. |
| Search Languages |
All search languages: The sql
field-name is only available if Command URLs and SQL Accessible
To is set to Anyone. Warning search language:
|
| Tables |
Standard browser functionality can be used to open the new GUI
page in a new tab or window. If a link is opened with
Ctrl-click or Shift-click, the corresponding table row will be
highlighted until another table row is clicked.
A marker will be displayed in a table column heading if the
rows are currently sorted by that column: The sub-menu for adding new columns is now labeled Show (previously it was "More Columns"). There is a new All item in this menu: select it to show all table columns. For warning tables there is also a new Notes item in this sub-menu, replacing the Show Notes/Hide Notes item that was previously present in the top-level menu. |
| Visibility Filters | The Administrator can use the new access control mechanism to specify that ordinary users cannot change their visibility settings. |
Score is a new property of a warning instance.
Significance is a new property of a warning class. Every class is classified with one of the following significance values: {"unspecified", "security", "reliability", "redundancy", "style", "diagnostic"}.
Consequences are as follows.
There are many new C/C++ warning classes, the majority of them in support of the MISRA C:2012 and MISRA C:2004 guidelines.
| Class | New Mnemonic | Previously |
|---|---|---|
| Condition Contains Side Effects | LANG.STRUCT.SE.COND | LANG.STRUCT.SIDEEFFECT |
| Global Variable Declared with Different Types | LANG.STRUCT.DECL.MGT | LANG.STRUCT.DECLTYPE |
| High Risk Loop | LANG.STRUCT.LOOP.HR | LANG.MEM.HRLOOP |
| Inconsistent Enumerator Initialization | LANG.STRUCT.INIT.ENUM | LANG.STRUCT.ENUMINIT |
| Multiple Declarations of a Global | LANG.STRUCT.DECL.MG | LANG.STRUCT.DECLMULTI |
| Multiple Declarations On Line | LANG.STRUCT.DECL.ML | LANG.STRUCT.MULTIDECL |
| Potential Unbounded Loop | LANG.STRUCT.LOOP.UB | LANG.STRUCT.ULOOP |
| Unused Value | LANG.STRUCT.UUVAL | LANG.STRUCT.UVAL |
| Class | Change |
|---|---|
| Socket In Wrong State |
No longer requires special additional steps for enabling. Can
now be enabled in the standard way with a WARNING_FILTER rule:
WARNING_FILTER += allow class="Socket In Wrong State" |
| All BSI-Specific BADFUNC Classes | Checks for these warning classes are now defined in the general template configuration file and no longer require special additional steps for enabling. They can now be enabled in the standard way with WARNING_FILTER rules. |
The CWE mapping assignments for some warning classes have changed, as shown in the following table.
Directory-granularity metrics are now computed for display in the visualization tool. They are not available in other parts of the GUI or through the plug-in API.
There are also some new file-granularity metrics.
| New at Directory granularity only (already existed at File granularity) |
New at both File and Directory granularity |
|---|---|
|
|
| Parameter | Purpose |
|---|---|
| ASSIGN_COND_MODE | Determines the scenarios under which Assignment in Conditional warnings are generated. |
| BAD_FUNCTION_SIGNIFICANCE | Specify warning class significance for a class defined with BAD_FUNCTION_* rules. |
| BOOL_TYPES | Specifies a set of types and values that are to be considered as Boolean for the purpose of the Misra C checks. |
| COMPILER_MODEL_PLUGINS | Provide paths to additional compiler model plug-ins. |
| DATA_RACE_MAX_RELATED_PATHS | Controls how many related Data Race warnings get reported. |
| FUNCTION_POINTER_RESOLUTION | Enable function pointer resolution. |
| GLOBAL_FUNCTION_POINTER_MODE | Specifies how function pointers propagate through global variables. |
| GLOBAL_TAINT_MODE | Specifies how taint propagates through global variables. |
| HARDCODED_ARGS_SIGNIFICANCE | Specify warning class significance for a class defined with HARDCODED_ARGS_* rules. |
| MANAGED_OBJECTS_IO_CHECKSUMS | Specifies whether checksums should be computed/checked when performing I/O. |
| MASTER_KEEPALIVE_PERIOD | Specifies how often the master will broadcast keepalive requests to all slaves. |
| MAX_CFG_EDGES | Specifies an approximate upper bound on the number of CFG edges a procedure can have. |
| MAX_CFG_NODES | Specifies an approximate upper bound on the number of CFG nodes a procedure can have. |
| MAX_CHECKED_FUNCTION_POINTER_RESOLVENTS | Specifies an upper bound on the number of targets that a function pointer or virtual call site may resolve to in order for interprocedural checking to be performed through that call. |
| MAX_PERCENT_F_CHARACTERS | Maximum number of characters that %f in printf-family functions will expand to, not including the decimal point or the minus sign. |
| MAX_PERCENT_LF_CHARACTERS | Maximum number of characters that %lf in printf-family functions will expand to, not including the decimal point or the minus sign. |
| MAX_POINTER_ANALYSIS_PASSES | Specifies an upper bound on the number of analysis passes that will take place in the pointer analysis phase (if pointer analysis is enabled). |
| MEMORY_PER_ANALYSIS_PROCESS | Used to compute slave limits for ANALYSIS_SLAVES=Auto and DAEMON_SLAVES=Auto. |
| METRIC_WARNING_SIGNIFICANCE | Specify warning class significance for a class defined with METRIC_WARNING_* rules. |
| REQUEST_REMOTE_SLAVES | Specifies whether or not automatically-started analysis slaves can be distributed through the hub's analysis cloud. |
| SIGNIFICANCE_LEN_EXTERN | Specifies the number of characters in which global identifiers should be considered to be significant. |
| SIGNIFICANCE_LEN_MACRO | Specifies the number of characters in which macros should be considered to be significant. |
| SIGNIFICANCE_LEN_OTHER | Specifies the number of characters in which identifiers other than globals or macros should be considered to be significant. |
| SKIP_ANALYSIS_OF | Use to specify that certain sets of procedures should not be analyzed. |
| SLAVE_TIMEOUT | The number of seconds a slave will wait for network operations with the master to time out. |
| TAINTED_BUF_TRIGGER_ON_UNKNOWN_BUFFERS | Specifies whether Tainted Buffer Access warnings will be issued when the accessed buffer cannot be identified and so the size of the accessed buffer cannot be determined. |
| TAINT_CALLSITE_EXPANSION_EFFORT | Bound effort for expanding callsites during taint refinement. |
| TAINT_HIGHLIGHTING | Enable taint highlighting in the hub GUI. |
| TAINT_MAX_WARNING_PATH_LENGTH | For warnings implemented by taint analysis, specifies the maximum number of program points along an execution path that will be considered. |
| TAINT_PLUS_DP_REFINEMENT_DISMISS | Specifies whether or not taint+dp warnings will be dismissed outright if refinement determines that they cannot occur. |
| TAINT_PLUS_DP_REFINEMENT_DISMISS_TIMEOUT | Specifies whether or not taint+dp warnings will be dismissed if the decision procedure times out during refinement of a taint/decision procedure warning. |
| TAINT_PLUS_DP_REFINEMENT_TIMEOUT | Specifies the timeout for the decision procedure when performing refinement for taint+dp warnings. |
| TAINT_RANK_BONUS | Specifies whether to increase rank of warnings that contain taint along the path of the warning. |
| TAINT_SEARCH_BOUND | Bound for searching paths during taint refinement. |
| TIME_LIMIT_TAINT_REFINE | Maximum number of seconds the analysis may spend refining taint warnings. |
| TIME_LIMIT_TAINT_REFINE_PER_PROCEDURE | Milliseconds the analysis may spend per procedure (amortized) on taint refinement. |
| UNINITIALIZED_GLOBALS | Specifies whether global variables without explicit initialization should be treated as uninitialized and therefore subject to Uninitialized Variable warnings. |
| UNINITIALIZED_GLOBALS | Specifies whether global variables without explicit initialization should be treated as uninitialized and therefore subject to Uninitialized Variable warnings. |
| Parameter | Changes |
|---|---|
| ANALYSIS_SLAVES, DAEMON_SLAVES |
The computation used for the Auto setting is now min(Cores, (Mem / MEMORY_PER_ANALYSIS_PROCESS) -
1). (previously it was min(Cores, (Mem / 512MB) - 1).) |
| FORCE_ENVIRONMENT | Factory setting is now Yes (previously No). |
| IGNORED_COMPILATIONS | Values now use Boost regex library style (previously STk style) |
| MAX_ALLOCATION_SIZE | Factory setting is now 1073741824 (previously 0: unlimited) |
| MAX_ANALYSIS_SLAVES | Factory setting is now 256 (previously 62). |
| MAX_DAEMON_SLAVES | Factory setting is now 256 (previously 62). |
| METRIC_DERIVED_DEF | Many new default derived metrics. |
| SYSTEM_INCLUDE_PATHS | Addition of cygwin64 and qnx default paths to recognized system include paths. |
| WARNING_FILTER | Additional functionality added. |
| Parameter | Notes |
|---|---|
| EXTRA_COMPILATION_UNITS | Removed because it did not work if any system headers were included in the extra compilation unit. Additionally, the extra compilation units were often built with an incompatible ABI when compared to the rest of the project. These pitfalls should be avoided by compiling the compilation units under each appropriate build/analyze command with the same compiler that builds the rest of the project. |
| TRACK_TAINTED_VALUES | If taint-related warning classes are enabled, the appropriate degree of taint tracking is enabled automatically. Taint highlighting availability is now controlled by TAINT_HIGHLIGHTING. |
| Function | Summary |
|---|---|
| csonar_sighand_create() | Informs the CodeSonar analysis of a signal handler entry point. Used by concurrency models . |
| csonar_warningclass_always_discarded_lm() | Check whether WARNING_FILTER settings are such that instances of the specified warning class will always be ignored. |
| Function | Change |
|---|---|
| csonar_trigger_m() csonar_trigger_extended() csonar_taint_sink() |
Each now take an additional Significance parameter. |
| C | Scheme |
|---|---|
| csonar_file_is_system_include() | codesonar:file-is-system-include? |
| - | codesonar:metric? |
| csonar_metric_compare() | - |
| csonar_metric_equal() | - |
| csonar_metric_hash() | - |
| csonar_pdg_vertex_callee_no_reroute() | codesonar:pdg-vertex-callee-no-reroute |
| csonar_pdg_vertex_callees_iter_first() csonar_pdg_vertex_callees_iter_next() csonar_pdg_vertex_callees_iter_close() |
codesonar:pdg-vertex-for-each-callee |
| csonar_pdg_vertex_callees_no_reroute_iter_first() csonar_pdg_vertex_callees_no_reroute_iter_next() csonar_pdg_vertex_callees_no_reroute_iter_close() |
codesonar:pdg-vertex-for-each-callee-no-reroute |
| csonar_report_location_warning_in_pdg() | optional additional argument to existing codesonar:report-location-warning |
| csonar_report_locations_warning_in_pdg() | optional additional argument to existing codesonar:report-locations-warning |
| csonar_warning_significance_lookup() | - |
| csonar_warning_significance_name() | - |
| Modified C API function | Notes |
|---|---|
| cs_pdg_call_sites() | Added a new flags parameter |
| cs_pdg_call_sites_count() | Added a flags parameter |
| cs_pdg_call_sites_iter_first() | Added a flags parameter |
| cs_pdg_vertex_set_actual_ins() | Type of ai_vertices parameter is now const cs_pdg_vertex * |
The following classes have one or more new fields.
The following classes have one or more new fields.
The following enums have one or more changes.
| 2231 | Bug reports may be hard to read if colorblind | fixed |
| 8659 | IGNORED_COMPILATIONS -> Boost regex | IGNORED_COMPILATIONS now takes a Boost regular expression |
| 8885 | Mark "last clicked" warning in table | If a link is opened with Ctrl-click or Shift-click, the corresponding table row will be highlighted until another table row is clicked. |
| 9224 | License errors after refreshing license on hub | fixed |
| 9987 | False Positive: #if without #endif if matching #if directive is preceded with tab character | fixed |
| 10318 | False Positive: buffer overrun with use of dynamic_cast<Derived*>(pBase) | fixed |
| 10452 | clarification needed: OSX with case sensitive HFS+ formatted partition | See note on working around a case-sensitive OS X file system. |
| 10670 | visual cue for table sort order | A marker will be displayed in a table column heading if the
rows are currently sorted by that column: |
| 10762 | Java: Bad Error Message on usage "cs-java-scan X - sourcepath Y" | fixed |
| 10785 | Japanese warning class documentation: automatically display depending on environment | fixed |
| 10859 | False Negative: Specific Buffer Overrun | fixed |
| 11959 | ascii codec can't decode byte 0x8b in position 0: ordinal not in range | fixed |
| 11977 | Explain how to write assertions for the analysis | See new manual section CodeSonar and assert(). |
| 12183 | Add Eclipse functionality to specify project name | fixed |
| 12254 | Some datarace warnings not detected with MP analysis | fixed |
| 12917 | Update cl compiler model to handle /FU flag (CLI mode) | fixed |
| 13624 | FORCE_ENVIRONMENT = Yes causes android build to fail | fixed |