--- proj4.0p1.conf 2015-05-12 12:23:29.848386067 -0400 +++ proj4.1p0.conf 2015-05-12 12:26:08.230101186 -0400 @@ -120,10 +120,8 @@ # # Purpose # Defines a map from compiler executable basenames to compiler -# models. -# -# If your compiler executable has a basename not listed below as a -# 'default', then you should add an entry mapping it to the +# models. If your compiler executable basename is not listed below +# as a 'default', then you should add an entry mapping it to the # compiler model it is most similar to. # # Type @@ -191,6 +189,12 @@ # COMPILER_MODELS += cl.exe -> cl # COMPILER_MODELS += cl30.exe -> cl30 # COMPILER_MODELS += cl6x.exe -> cl6x +# COMPILER_MODELS += armcl.exe -> cl6x +# COMPILER_MODELS += cl430.exe -> cl6x +# COMPILER_MODELS += cl470.exe -> cl6x +# COMPILER_MODELS += cl55.exe -> cl6x +# COMPILER_MODELS += cl2000.exe -> cl6x +# COMPILER_MODELS += clang.exe -> cc # COMPILER_MODELS += clarm.exe -> cl # COMPILER_MODELS += clmips.exe -> cl # COMPILER_MODELS += clsh.exe -> cl @@ -239,13 +243,14 @@ # COMPILER_MODELS += ccts.exe -> visualdsp # COMPILER_MODELS += ccblkfn.exe -> visualdsp # -# Posix default models: +# POSIX default models: # COMPILER_MODELS += gcc -> gcc # COMPILER_MODELS += gxx -> gpp # COMPILER_MODELS += g++ -> gpp # COMPILER_MODELS += gpp -> gpp # COMPILER_MODELS += c++ -> gpp # COMPILER_MODELS += cc -> cc +# COMPILER_MODELS += clang -> cc # COMPILER_MODELS += null-cc -> xcc # COMPILER_MODELS += dcc -> dcc # COMPILER_MODELS += dplus -> dcc @@ -267,7 +272,7 @@ # COMPILER_MODELS += qcc -> qcc # COMPILER_MODELS += QCC -> qcc # -# On Solaris, in addition to posix default models: +# On Solaris, in addition to POSIX default models: # COMPILER_MODELS += CC -> acpp # # To activate the Hi-Tech compiler model for Linux, Solaris, and OS @@ -283,15 +288,6 @@ # follow the instructions in the manual # [doc/html/C_Module/CompilerModels/CompilerModelsIAR.html#using_iccgeneric]. # -# To use the TI CodeComposer cl6x compiler model with one or more -# of armcl, cl430, cl470, cl55, or cl2000 on Windows: -# -# COMPILER_MODELS += armcl.exe -> cl6x -# COMPILER_MODELS += cl430.exe -> cl6x -# COMPILER_MODELS += cl470.exe -> cl6x -# COMPILER_MODELS += cl55.exe -> cl6x -# COMPILER_MODELS += cl2000.exe -> cl6x -# # To activate the TI CodeComposer compiler models for non-Windows # systems: # COMPILER_MODELS += cl6x -> cl6x @@ -371,7 +367,6 @@ - # Parameter DISABLED_COMPILERS # # Tags @@ -436,7 +431,7 @@ # DISABLED_COMPILERS += tcc.exe # DISABLED_COMPILERS += tcpp.exe # -# Posix: +# POSIX: # DISABLED_COMPILERS += armcc # DISABLED_COMPILERS += armcpp # DISABLED_COMPILERS += c++ @@ -476,7 +471,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Behavior # Every time a process calls exec, if any important environment @@ -512,7 +507,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Notes # This parameter is ignored by the Windows project builder GUI and @@ -534,7 +529,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Notes # This parameter is ignored on non-Windows systems. Its only known @@ -554,7 +549,7 @@ # Windows kernel deadlock in the presence of CodeSonar. # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - No : CodeSonar will check for the existence of the Symantec @@ -563,9 +558,9 @@ # 12.1.4xxx.xxx is installed, then CodeSonar will refuse to run. # - Yes : CodeSonar will not perform this check. We do not # recommend this setting, since it may result in kernel deadlock. -# Either upgrade to SEP 12 RU5 (due out August 2014), or -# uninstall the Application and Device Control component to -# safely work around the issue. Disabling SEP has no effect. +# Either upgrade to SEP 12 RU5 or later, or uninstall the +# Application and Device Control component to safely work around +# the issue. Disabling SEP has no effect. #ALLOW_INCOMPATIBLE_SYMANTEC = No @@ -580,7 +575,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Behavior # When this is set to "Yes", the stdout, stderr, and stdin streams @@ -615,7 +610,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Behavior # By default, when creating a new compiler process after @@ -726,7 +721,8 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# STk-style regular expression [doc/html/Asides/STkRegExp.html] +# Boost regular expression +# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] # # Behavior # If a file in a compilation command has a path that matches the @@ -827,7 +823,7 @@ # - LANGUAGE_TREATMENT: Treatment of Language Constructs # # Type -# {RETURN_NULL, DOESNT_FAIL} +# { RETURN_NULL, DOESNT_FAIL } # # Behavior # - RETURN_NULL : allocators are modeled as returning NULL on @@ -858,7 +854,7 @@ # - LANGUAGE_TREATMENT: Treatment of Language Constructs # # Type -# {EXCEPTION, RETURN_NULL, DOESNT_FAIL} +# { EXCEPTION, RETURN_NULL, DOESNT_FAIL } # # Behavior # - EXCEPTION : new/new[] are modeled as throwing an exception on @@ -898,7 +894,7 @@ # - LANGUAGE_TREATMENT: Treatment of Language Constructs # # Type -# {RETURN_ERR, DOESNT_FAIL} +# { RETURN_ERR, DOESNT_FAIL } # # Behavior # - RETURN_ERR : lock acquire/release functions are modeled as @@ -972,9 +968,58 @@ # # Using "ulimit -s unlimited" in the shell from which the analysis # runs will make it possible to use higher values. + #AST_DEPTH_LIMIT = 256 +# Parameter MAX_CFG_NODES +# +# Purpose +# Specifies an approximate upper bound on the number of CFG nodes a +# procedure can have. +# +# Tags +# - ANALYSIS_BOUND: Analysis resource/effort limit +# +# Type +# integer +# +# Behavior +# - -1 : There is no limit. +# - N (for N>=0) : The analysis will ignore procedures containing +# more than N CFG nodes. +# +# Notes +# Very large procedures can cause CodeSonar to run out of memory. + +#MAX_CFG_NODES = 100000 + + +# Parameter MAX_CFG_EDGES +# +# Purpose +# Specifies an approximate upper bound on the number of CFG edges a +# procedure can have. +# +# Tags +# - ANALYSIS_BOUND: Analysis resource/effort limit +# +# Type +# integer +# +# Behavior +# - -1 : There is no limit. +# - N (for N>=0) : The analysis will ignore procedures containing +# more than N CFG edges. +# +# A value of -1 means that there is no limit. +# +# Notes +# Very large procedures can cause CodeSonar to run out of memory. + +#MAX_CFG_EDGES = 3000000 + + # Parameter VERBOSITY # # Purpose @@ -984,7 +1029,7 @@ # - ANALYSIS_PROPERTY: Analysis Properties # # Type -# {0, 1, 2, 3, ..., 10} +# { 0, 1, 2, 3, ..., 10 } # # Behavior # The higher the VERBOSITY value, the more status messages are @@ -1157,7 +1202,7 @@ # - ANALYSIS_PROPERTY: Analysis Properties # # Type -# {Yes, No} +# { Yes, No } # # Notes # In order to avoid the cost of context switches and OS overhead, @@ -1180,6 +1225,22 @@ #MANAGED_OBJECTS_IO_KERNEL_BUFFERING = Yes +# Parameter MANAGED_OBJECTS_IO_CHECKSUMS +# +# Purpose +# Specifies whether checksums should be computed/checked when +# performing I/O. Generally only necessary if the hardware or +# network is unreliable. +# +# Tags +# - ANALYSIS_PROPERTY: Analysis Properties +# +# Type +# { Yes, No } +# +#MANAGED_OBJECTS_IO_CHECKSUMS = No + + # Parameter ZFRAG_POOL_MINIMUM_CAPACITY # # Purpose @@ -1359,11 +1420,11 @@ # expression based replacement as described below. # # For example, -# SOURCE_PATTERN_REPLACEMENT=s/foo//I +# SOURCE_PATTERN_REPLACEMENT+=s/foo//I # specifies that all occurrences of "foo" in the source code, # regardless of case, should be deleted. This is exactly equivalent # to -# SOURCE_PATTERN_REPLACEMENT=s*foo**I +# SOURCE_PATTERN_REPLACEMENT+=s*foo**I # (the same expression with a different delimiter), and to # SOURCE_PATTERN=foo # SOURCE_REPLACEMENT= @@ -1404,7 +1465,6 @@ # - SOURCE_MODIFIERS corresponds to the + part of a # SOURCE_PATTERN_REPLACEMENT expression # -# # Notes # For the sake of execution order determination, a # SOURCE_PATTERN/SOURCE_REPLACEMENT/SOURCE_MODIFIERS triple is @@ -1448,7 +1508,7 @@ # execute on the source files before preprocessing occurs. # # For example, -# SOURCE_REPLACE_COMMAND=sed -e 's#@ *0x[0-9a-fA-F][0-9a-fA-F]*#/* CSURF: At removed */#' +# SOURCE_REPLACE_COMMAND+=sed -e 's#@ *0x[0-9a-fA-F][0-9a-fA-F]*#/* CSURF: At removed */#' # specifies that all strings consisting of "@" followed by zero or # more spaces followed by a hexadecimal number should be replaced # by a comment reading "/* CSURF: At removed */" @@ -1474,7 +1534,7 @@ # - ANALYSIS_PROPERTY: Analysis Properties # # Type -# {Yes, No} +# { Yes, No } # # Notes # If environment variable CS_PREPROCESS_IF_FAIL is set, its value @@ -1493,7 +1553,7 @@ # - ANALYSIS_PROPERTY: Analysis Properties # # Type -# {Yes, No} +# { Yes, No } # # Notes # If environment variable CS_PREPROCESS_ALWAYS is set, its value @@ -1540,7 +1600,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Notes # If environment variable GT_BADFS_NOSLEEP is set, its value will @@ -1587,7 +1647,7 @@ # NUMBER_OF_CONCURRENT_PARSES). Most systems have various limits on # the number of files a process can open. Typical file descriptor # limits for this platform are: -# - getrlimit(RLIMIT_NOFILE) = 1016 +# - getrlimit(RLIMIT_NOFILE) = 1024 # - GrammaTech-Internal Limit = 4096 # # Increasing this value may cause the product to exhaust available @@ -1596,6 +1656,7 @@ # #MAX_CONCURRENT_PARSE_PROCESSES = 582 + # Parameter PROCEDURE_METRIC_TIMEOUT # # Purpose @@ -1603,7 +1664,7 @@ # the operation is aborted. # # Type -# Integer +# integer # # Behavior # A value of -1 disables the timeout. Values of 0 or greater @@ -1618,6 +1679,26 @@ # - Essential Complexity (evG) # #PROCEDURE_METRIC_TIMEOUT = 60 + +# Parameter COMPILER_MODEL_PLUGINS +# +# Purpose +# Provide paths to additional compiler model plugins. +# +# Type +# file path +# +# Notes +# CodeSonar/Surfer will search in csurf/lib directory for user +# compiler models, then examine each compiler model specified in +# COMPILER_MODEL_PLUGINS. Compiler model plugin names are prefixed +# with "lib". User compiler models override builtin compiler models +# that ship with CodeSonar/Surfer. +# +# For example: +# COMPILER_MODEL_PLUGINS += /PATH/TO/libsamplecm.so +# Will add the compiler model samplecm. + # Parameter SOURCE_PATCH_DIRECTORIES # # Purpose @@ -1658,7 +1739,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Behavior # Let P be the name of the project. Then behavior is as follows. @@ -1674,7 +1755,7 @@ # the CodeSonar project (and therefore any analysis of the # project) will reflect only those parts that are being built. -#INCREMENTAL_BUILD = Yes +#INCREMENTAL_BUILD = Yes # Parameter DRY_RUN @@ -1690,7 +1771,7 @@ # Analyses # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : CodeSonar will perform a "dry run" - it will count lines @@ -1789,25 +1870,29 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : any launch daemon started by "codesonar analyze" will be -# created as a Windows service. +# created as a Windows service, unless the -no-services option is +# specified. # -# - No : Windows will kill hub processes and launch daemons when -# the user logs out, unless the processes are started from the -# Scheduled Tasks panel or by another Windows service. +# - No : launch daemons started by "codesonar analyze" will not be +# created as Windows services. This means that Windows will kill +# launch daemon processes when the user logs out, unless those +# processes were started from the Scheduled Tasks panel or by +# another Windows service. # # Notes -# This parameter is ignored by the Windows project builder GUI. +# This parameter is ignored by the Windows project builder GUI and +# by the "codesonar install-launchd" command. # # This parameter has no effect on non-Windows systems. # # For example: # USE_SERVICES = Yes -# USE_SERVICES = Yes +## USE_SERVICES = Yes # Parameter FOREGROUND @@ -1820,7 +1905,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : the "codesonar analyze" command runs the analysis itself. @@ -1842,29 +1927,48 @@ # Parameter ANALYSIS_SLAVES # # Purpose -# Specifies how many slave processes the CodeSonar analysis may -# start. The optimal number of slave processes depends on available -# system resources; each slave process uses CPU cycles and memory. -# -# Type -# {Auto, Serial} or integer -# -# Behavior -# - Serial : the analysis will take place in a single process. This -# will use the minimum amount of memory, but provides no -# parallelism or fault tolerance during analysis. It is useful on -# single-core systems and when resources are scarce. -# - Auto : CodeSonar will determine the appropriate maximum number -# of slaves based on the total number of logical cores (Cores) on -# the machine and the amount of free physical memory (Mem) using -# the following formula: min(Cores, (Mem / -# MEMORY_PER_ANALYSIS_PROCESS ) - 1). If the result is less than -# or equal to 1, a serial analysis is performed. -# - integer: CodeSonar will spawn up to the specified number of -# slaves, in addition to the master process. Empirically, each -# process might use up to about 512MB of memory. +# Specifies whether or not the CodeSonar analysis will run in +# parallel mode. For local-requesting analyses +# (REQUEST_REMOTE_SLAVES=No), additionally specifies a bound below +# which the analysis master may automatically start new slaves as +# needed. +# +# Type +# { Auto, Serial } or integer +# +# Behavior +# - Serial with REQUEST_REMOTE_SLAVES=No: the analysis will take +# place in a single process. This will use the minimum amount of +# memory, but provides no parallelism or fault tolerance during +# analysis. It is useful on single-core systems and when +# resources are scarce. +# - Auto with REQUEST_REMOTE_SLAVES=No : CodeSonar will determine +# the appropriate maximum number of slaves based on the total +# number of logical cores (Cores) on the machine and the amount +# of free physical memory (Mem) using the following formula: +# min(Cores, (Mem / MEMORY_PER_ANALYSIS_PROCESS ) - 1). If the +# result is less than or equal to 1, a serial analysis is +# performed. +# - integer with REQUEST_REMOTE_SLAVES=No : if fewer than this many +# analysis slaves are running, CodeSonar will automatically start +# new analysis slaves as needed. Empirically, each process might +# use up to about 512MB of memory. +# - any setting (including Serial) with REQUEST_REMOTE_SLAVES=Yes : +# the analysis will be parallel and distributed +# [doc/html/Workings/DistributedAnalysis.html]. The precise +# setting of this parameter will not be used (except as described +# for MAX_ANALYSIS_SLAVES): the analysis master will request new +# slaves from the hub as it wants them, the hub in turn will +# request slaves from those analysis daemons that have not +# reached their analysis cloud process limits +# [doc/html/Workings/DistributedAnalysis.html#process_limit], and +# the master will accept the newly-started slaves up to the limit +# imposed by MAX_ANALYSIS_SLAVES. # # Notes +# The optimal number of slave processes depends on available system +# resources; each slave process uses CPU cycles and memory. +# # Use MASTER_LISTEN_INTERFACE to specify the address on which the # master process will listen. # @@ -1877,61 +1981,123 @@ #ANALYSIS_SLAVES = Auto +# Parameter REQUEST_REMOTE_SLAVES +# +# Purpose +# Specifies whether or not automatically-started analysis slaves +# can be distributed through the hub's analysis cloud. +# +# Type +# {Yes, No} +# +# Behavior +# - Yes : if the analysis master determines that it requires +# additional analysis slaves, it will send a request to the hub. +# The hub determines which cslaunchd processes in its analysis +# cloud register have available capacity, then instructs each of +# these to start a new analysis slave. +# - No : if the analysis master determines that it requires +# additional analysis slaves, it will directly start one local +# slave at a time. +# +# Notes +# Setting this to No is not sufficient to guarantee that an +# analysis will run entirely locally. If the master process is +# listening on an address to which other machines have access, it +# can accept manually-started slaves from those other machines. To +# eliminate this possibility, use a restrictive +# MASTER_LISTEN_INTERFACE setting. +# +# For more information, see the manual sections on Parallelism in +# CodeSonar [doc/html/Workings/Parallelism.html] and Distributed +# Analysis [doc/html/Workings/DistributedAnalysis.html]. + +#REQUEST_REMOTE_SLAVES = No + + # Parameter MAX_ANALYSIS_SLAVES # # Purpose -# If set to a value greater than that of ANALYSIS_SLAVES, specifies -# an upper bound on the total number of CodeSonar analysis slaves. -# Otherwise the upper bound is the value of ANALYSIS_SLAVES - -# either the explicit value given by the user or the value computed -# for Auto. +# Specifies an upper bound on the total number of CodeSonar +# analysis slaves. # # Type # integer # # Behavior -# If the specified number of analysis slaves are running: -# - the CodeSonar analysis will not automatically start any new -# slaves, and -# - any attempt to manually start an analysis slave will fail. +# The upper bound on the number of CodeSonar analysis slaves is set +# to the higher of this value and the value of ANALYSIS_SLAVES +# (either the explicit value given by the user or the value +# computed for Auto). # -# Notes -# This upper bound applies to all analysis slaves, whether started -# automatically by the CodeSonar analysis or manually by a user. +# If the current number of analysis slaves matches this upper +# bound, any attempt to attach a new slave to the analysis will +# fail. +# +# For local-requesting analyses (REQUEST_REMOTE_SLAVES=No), this +# limit only affects manually-started analysis slaves: the upper +# bound is always greater than or equal to the value of +# ANALYSIS_SLAVES, so the analysis master will never automatically +# start any new slaves under these conditions. # +# For remote-requesting analyses (REQUEST_REMOTE_SLAVES=Yes), this +# limit affects both manually-started analysis slaves and slaves +# started due to a remote request +# [doc/html/Workings/DistributedAnalysis.html#adding_slaves]. +# +# Notes # If the analysis is running serially (either because # ANALYSIS_SLAVES=Serial, or because ANALYSIS_SLAVES=Auto and -# CodeSonar determined that it should run serially), -# MAX_ANALYSIS_SLAVES has no effect. +# REQUEST_REMOTE_SLAVES=No and CodeSonar determined that it should +# run serially), MAX_ANALYSIS_SLAVES has no effect. -#MAX_ANALYSIS_SLAVES = 62 +#MAX_ANALYSIS_SLAVES = 256 # Parameter DAEMON_SLAVES # # Purpose -# Specifies how many slave processes CodeSonar may start to service -# web requests. The optimal number of slave processes depends on -# available system resources; each slave process uses CPU cycles -# and memory. -# -# Type -# {Auto, Serial} or integer +# Specifies whether or not CodeSonar will service web requests in +# parallel mode. For local-requesting analyses +# (REQUEST_REMOTE_SLAVES=No), additionally specifies a bound below +# which the daemon master may automatically start new slaves as +# needed. +# +# Type +# { Auto, Serial } or integer # # Behavior -# - Serial : web requests are serviced by a single process. -# - Auto : CodeSonar will determine the appropriate maximum number -# of slaves based on the total number of logical cores (Cores) on -# the machine and the amount of free physical memory (Mem) using -# the following formula: min(Cores, (Mem / -# MEMORY_PER_ANALYSIS_PROCESS) - 1). If the result is less than -# or equal to 1, web requests are serviced by a single process. -# - integer: CodeSonar will spawn up to the specified number of -# slaves, in addition to the master process. + +# - Serial with REQUEST_REMOTE_SLAVES=No : web requests are +# serviced by a single process. +# - Auto with REQUEST_REMOTE_SLAVES=No : CodeSonar will determine +# the appropriate maximum number of slaves based on the total +# number of logical cores (Cores) on the machine and the amount +# of free physical memory (Mem) using the following formula: +# min(Cores, (Mem / MEMORY_PER_ANALYSIS_PROCESS) - 1). If the +# result is less than or equal to 1, web requests are serviced by +# a single process. +# - integer with REQUEST_REMOTE_SLAVES=No : if fewer than this many +# slaves are running to service web requests, the analysis master +# will automatically start/request new slaves as needed. +# - any setting (including Serial) with REQUEST_REMOTE_SLAVES=Yes : +# the daemon will be parallel and distributed +# [doc/html/Workings/DistributedAnalysis.html]. The precise +# setting of this parameter will not be used (except as described +# for MAX_DAEMON_SLAVES): the daemon master will request new +# slaves from the hub as it wants them, the hub in turn will +# request slaves from those analysis daemons that have not +# reached their analysis cloud process limits +# [doc/html/Workings/DistributedAnalysis.html#process_limit], and +# the master will accept the newly-started slaves up to the limit +# imposed by MAX_DAEMON_SLAVES. # # Notes -# Multiple daemon slaves will only start if multiple web requests -# are pending concurrently. +# Multiple daemon slaves will only be required if multiple web +# requests are pending concurrently. +# +# The optimal number of slave processes depends on available system +# resources; each slave process uses CPU cycles and memory. # # This parameter is analogous to ANALYSIS_SLAVES, but determines # the degree of parallelism for CodeSonar in daemon mode while @@ -1941,8 +2107,9 @@ # Use MASTER_LISTEN_INTERFACE to specify the address on which the # master process will listen. # -# For more information, see the manual section on Parallelism in -# CodeSonar [doc/html/Workings/Parallelism.html]. +# For more information, see the manual sections on Parallelism in +# CodeSonar [doc/html/Workings/Parallelism.html] and Distributed +# Analysis [doc/html/Workings/DistributedAnalysis.html]. #DAEMON_SLAVES = Auto @@ -1950,50 +2117,62 @@ # Parameter MAX_DAEMON_SLAVES # # Purpose -# If set to a value greater than that of DAEMON_SLAVES, specifies -# an upper bound on the total number of CodeSonar analysis slaves. -# Otherwise the upper bound is the value of DAEMON_SLAVES - either -# the explicit value given by the user or the value computed for -# Auto. +# Specifies an upper bound on the total number of CodeSonar daemon +# slaves. # # Type # integer # # Behavior -# If the specified number of daemon slaves are running: -# - CodeSonarwill not automatically start any new slaves, and -# - any attempt to manually start a daemon slave will fail. +# The upper bound on the number of CodeSonar daemon slaves is set +# to the higher of this value and the value of DAEMON_SLAVES +# (either the explicit value given by the user or the value +# computed for Auto). # -# Notes -# This upper bound applies to all daemon slaves, whether started -# automatically by CodeSonar or manually by a user. +# If the current number of daemon slaves matches this upper bound, +# any attempt to attach a new slave to the daemon master will fail. # +# For local-requesting analyses (REQUEST_REMOTE_SLAVES=No), this +# limit only affects manually-started daemon slaves: the upper +# bound is always greater than or equal to the value of +# DAEMON_SLAVES, so the daemon master will never automatically +# start any new slaves under these conditions. +# +# For remote-requesting analyses (REQUEST_REMOTE_SLAVES=Yes), this +# limit affects both manually-started daemon slaves and slaves +# started due to a remote request +# [doc/html/Workings/DistributedAnalysis.html#adding_slaves]. +# +# Notes # If the analysis is running serially in daemon mode (either # because DAEMON_SLAVES=Serial, or because DAEMON_SLAVES=Auto and -# CodeSonar determined that it should run serially), -# MAX_DAEMON_SLAVES has no effect. +# REQUEST_REMOTE_SLAVES=No and CodeSonar determined that it should +# run serially), MAX_DAEMON_SLAVES has no effect. + + +#MAX_DAEMON_SLAVES = 256 -#MAX_DAEMON_SLAVES = 62 # Parameter MEMORY_PER_ANALYSIS_PROCESS # # Purpose -# An estimate of how much physical memory (in megabytes) each -# analysis process will use. +# Used to compute slave limits for ANALYSIS_SLAVES=Auto, +# DAEMON_SLAVES=Auto, and REQUEST_REMOTE_SLAVES=Yes. # # Type # integer # # Behavior -# When ANALYSIS_SLAVES or DAEMON_SLAVES is set to Auto, the slave -# count is estimated by measuring the available memory (in MB) then -# dividing by this number. +# When ANALYSIS_SLAVES or DAEMON_SLAVES is set to Auto, or +# REQUEST_REMOTE_SLAVES is set to Yes and the analysis cloud +# register indicates the process count should be automatically +# computed, the slave count is computed by measuring the available +# memory (in MB) then dividing by this number. # # Notes # Has no effect if neither ANALYSIS_SLAVES nor DAEMON_SLAVES is set # to Auto. - #MEMORY_PER_ANALYSIS_PROCESS = 512 @@ -2063,10 +2242,6 @@ # String of the form or : # # Behavior -# - If is not specified, the analysis master will listen on -# the interface specified by , on a port allocated by the -# operating system. Inspect the analysis log to identify the port -# that is being used. # - If is specified and available, the analysis master will # listen on :. # - If is specified but unavailable, the master will not @@ -2075,6 +2250,10 @@ # requests will not be serviced. In both cases, there will be an # error message in the Analysis Log # [doc/html/GUI/GUI_Log_Analysis.html]. +# - If is not specified, the analysis master will listen on +# the interface specified by , on a port allocated by the +# operating system. Inspect the analysis log to identify the port +# that is being used. # # Notes # Examples: @@ -2085,8 +2264,91 @@ # MASTER_LISTEN_INTERFACE=mymachine # MASTER_LISTEN_INTERFACE=mymachine:1234 # +# For distributed analysis, ensure that specifies an +# interface that other machines in the analysis cloud will be able +# to communicate with. +# +# By default, MASTER_LISTEN_INTERFACE is not specified. In this +# case, it is determined based on the value of +# REQUEST_REMOTE_SLAVES. +# - 0.0.0.0 if REQUEST_REMOTE_SLAVES=Yes +# - 127.0.0.1 if REQUEST_REMOTE_SLAVES=No + + +# Parameter SLAVE_TIMEOUT +# +# Purpose +# The number of seconds a slave will wait for network operations +# with the master to time out. +# +# Type +# integer +# +# Behavior +# - 0 : There is no timeout. +# - N (for N>0) : A slave will exit if a network operation does not +# make progress for N seconds. +# +# Notes +# There are several reasons why timeouts can occur. +# - The network link is not functioning. +# - The master has lost power, blue screened, panicked, etc. +# - The master has disconnected the slave, but the slave never +# became aware of it. +# - The master has not given the slave any new work in the last N +# seconds. +# - The master process is busy and isn't responding in a timely +# fashion. +# - The slave has asked the master to do work that takes longer +# than the timeout. +# +# The latter two situations are unlikely to occur with the default +# value. +# +# This setting can be important to prevent orphaned slaves from +# waiting indefinitely on a master that no longer exists. +# +# For more information, see the manual section on Parallelism in +# CodeSonar [doc/html/Workings/Parallelism.html]. + +#SLAVE_TIMEOUT = 3600 + + +# Parameter MASTER_KEEPALIVE_PERIOD +# +# Purpose +# Specifies how often the master will broadcast keepalive requests +# to all slaves. +# +# Type +# integer +# +# Behavior +# - 0 : Keepalive requests are disabled. +# - N (for N>0) : A keepalive will be broadcast every N seconds. If +# it is time to broadcast another request, but nothing has been +# received from a slave since the previous request, then the +# slave is disconnected for being non-responsive. +# +# Notes +# There are several reasons why keepalives can fail. +# - The network link is not functioning. +# - The slave has lost power, blue screened, panicked, etc. +# - The slave has disconnected the master, but the master never +# became aware of it. +# - The slave process got busy doing something for longer than this +# period. +# +# The latter two situations are unlikely to occur with the default +# value. +# +# This setting can be important to prevent the master from starving +# because it is waiting on slaves that no longer exist. +# +# For more information, see the manual section on Parallelism in +# CodeSonar [doc/html/Workings/Parallelism.html]. -#MASTER_LISTEN_INTERFACE = 127.0.0.1 +#MASTER_KEEPALIVE_PERIOD = 86400 # Parameter WARNING_FILTER @@ -2123,6 +2385,7 @@ # - procedure # - procedure_typed # - reachable= +# - starts_in_source_libraries= # # and is one of: # - : (substring match, case-insensitive) @@ -2149,17 +2412,17 @@ # effect. # # Each specifies a condition that a warning must satisfy in -# order to match the rule. -# - is_sysinclude matches warnings that occur entirely within -# system include files (as designated by SYSTEM_INCLUDE_PATHS) -# with no user code involved. +# order to match the rule. The different types represent +# constraints on various warning properties +# [doc/html/Elements/PROPERTIES_Warning.html]. # -# The remaining rule types specify constraints on various warning -# properties [doc/html/Elements/PROPERTIES_Warning.html]: # - categories : Categories # - class : Class # - compilation_unit : Compilation Unit # - file : the basename of Warning File +# - is_sysinclude matches warnings for which Listing XML lies +# entirely within system include files (as designated by +# SYSTEM_INCLUDE_PATHS), with no user code involved. # - language : Language # - line= : Line # - line_contents : the contents of the source line on which the @@ -2180,14 +2443,24 @@ # whitespace-sensitive). If C, specifies a constraint on the # warning Procedure (so has the same behavior as a procedure # rule). -# - reachable= : whether or not the warning location is in a -# procedure that is reachable from one of the roots specified by +# - reachable : whether or not the first function in Listing XML is +# reachable from one of the roots specified by # REACHABILITY_ROOTS. Set to zero to specify that the rule -# applies only to unreachable warnings; or non-zero to specify -# that it applies only to reachable warnings. CodeSonar will -# issue an alert [doc/html/GUI/GUI_Alerts.html] if there are one -# or more WARNING_FILTER reachable rules, but no reachability +# applies only to warnings for which the first function is +# unreachable; non-zero to specify that it applies only to +# warnings for which the first function is reachable. CodeSonar +# will issue an alert [doc/html/GUI/GUI_Alerts.html] if there are +# one or more WARNING_FILTER reachable rules, but no reachability # roots have been specified. +# - starts_in_source_libraries : whether or not the first function +# in Listing XML is a CodeSonar Library Model +# [doc/html/C_Module/LibraryModels/LibraryModels.html], or is +# directly or transitively called by a library model. Set to zero +# to specify that the rule applies only to warnings for which the +# first function is a library model or called by a library model; +# non-zero to specify that it applies only to warnings for which +# the first function is not a library model and not called by a +# library model. # # Notes # If there are two or more s in a pattern, the pattern @@ -2198,38 +2471,49 @@ # subsequent "allow" patterns), CodeSonar will not even carry out # checks for that class. This will generally lead to time savings. # +# Most configuration presets [doc/html/Preferences/Presets.html] +# are composed primarily of WARNING_FILTER "allow" rules, plus the +# supporting configuration settings required by the allowed warning +# classes. +# +# String guidelines: +# - Strings that contains spaces must be quoted. +# - Characters in quoted strings that must be backslash-escaped: " +# and \ +# - Newlines and tabs are represented as \n and \t, respectively. +# # Example 1: Discard all warnings belonging to any class with a # LANG.MEM.* mnemonic # [doc/html/WarningClasses/MnemonicHierarchy.html#LANG_MEM]. -# WARNING_FILTER = discard categories:LANG.MEM +# WARNING_FILTER += discard categories:LANG.MEM # # Example 2: Discard all warnings whose class is Buffer Overrun, # Type Overrun, or any user-defined class with "underrun" in its # name. -# WARNING_FILTER = discard class:underrun +# WARNING_FILTER += discard class:underrun # # Example 3: Discard all warnings in the compilation unit # [doc/html/Elements/PROPERTIES_File.html#compilation_unit_def] # associated with mylib.cpp -# WARNING_FILTER = discard compilation_unit=mylib.cpp +# WARNING_FILTER += discard compilation_unit=mylib.cpp # # Example 4: Assign all warnings in file mylib.h to alex. If the # hub has no user called alex, this rule has no effect. -# WARNING_FILTER = owner:=alex file=mylib.h +# WARNING_FILTER += owner:=alex file=mylib.h # # Example 5: Assign all warnings in system include files to sandy. # If the hub has no user called sandy, this rule has no effect. -# WARNING_FILTER = owner:=sandy is_sysinclude +# WARNING_FILTER += owner:=sandy is_sysinclude # # Example 6: Discard all warnings in C compilation units. -# WARNING_FILTER = discard language=c +# WARNING_FILTER += discard language=c # # Example 7: Discard all warnings issued at line 47 (of any file). -# WARNING_FILTER = discard line=47 +# WARNING_FILTER += discard line=47 # # Example 8: Discard all warnings whose associated Listing XML # contains substring 'callPrinter'. -# WARNING_FILTER = discard listing_xml:callPrinter +# WARNING_FILTER += discard listing_xml:callPrinter # # Example 9: For all warnings issued in procedure writeThis(), set # Priority to "Incredible". For all warnings issued in any other @@ -2240,7 +2524,7 @@ # - if "Incredible" was not already a candidate Priority value on # the hub, it will be added to the list of candidates once a # warning with "Incredible" Priority is submitted. -# WARNING_FILTER = priority:="P0: High" procedure:write +# WARNING_FILTER += priority:="P0: High" procedure:write # WARNING_FILTER += priority:="Incredible" procedure=writeThis # # Example 10: In C compilation units, discard all warnings issued @@ -2249,7 +2533,7 @@ # such that the fully-qualified procedure name contains substring # 'gridproc', or one of the argument type names contains substring # gridproc. -# WARNING_FILTER = discard procedure_typed:gridproc +# WARNING_FILTER += discard procedure_typed:gridproc # # Example 11: In C++ compilation units, discard all warnings issued # in a procedure with exactly one, unsigned int, argument. @@ -2258,7 +2542,7 @@ # templating): warnings issued in those procedures will also be # discarded. In C compilation units, this rule will not match # anything. -# WARNING_FILTER = discard procedure_typed:"(unsigned int)" +# WARNING_FILTER += discard procedure_typed:"(unsigned int)" # # Example 12: In C++ compilation units, discard all warnings issued # inside the procedures with the specified (fully-qualified) names. @@ -2267,30 +2551,43 @@ # of the procedure name with cs_pdg_procedure_name() # [doc/html/API/CAPI/cs__pdg_8h.html#func_cs_pdg_procedure_name] # before creating the WARNING_FILTER rule. -# WARNING_FILTER = discard procedure_typed:"std::vector>::operator [](unsigned long)" -# WARNING_FILTER = discard procedure_typed:"only_param::return_S(int *)" +# WARNING_FILTER += discard procedure_typed:"std::vector>::operator [](unsigned long)" +# WARNING_FILTER += discard procedure_typed:"only_param::return_S(int *)" # # Example 13: Discard all warnings in procedures that are not # reachable from main() (this REACHABILITY_ROOTS rule matches any # function called main occurring in any file in the project). -# REACHABILITY_ROOTS += :main -# WARNING_FILTER = discard reachable=0 +# REACHABILITY_ROOTS = :main +# WARNING_FILTER += discard reachable=0 # # Example 14: Discard all warnings whose Listing begins with a # procedure whose name is "ignoreme" followed by one or more digits # (eg ignoreme1(), ignoreme275(), ...). -# WARNING_FILTER = discard path_start_procedure=~ignoreme\d+ +# WARNING_FILTER += discard path_start_procedure=~ignoreme\d+ # # Example 15: Discard all warnings in files whose path includes # directory ignoredir. Using two rules with different path # separators provides (some) portability. -# WARNING_FILTER = discard path:/ignoredir/ -# WARNING_FILTER = discard path:\ignoredir\ +# WARNING_FILTER += discard path:/ignoredir/ +# WARNING_FILTER += discard path:\ignoredir\ # -# Example 16: Discard all warnings occurring on a source line that +# Example 16: Discard all warnings in files whose path includes +# directory "ignore dir" (note the space). Using two rules with +# different path separators provides (some) portability. Patterns +# containing spaces must be quoted, and backslashes must be escaped +# in quoted strings. +# WARNING_FILTER += discard path:"/ignore dir/" +# WARNING_FILTER += discard path:"\\ignore dir\\" +# +# Example 17: Discard all warnings occurring on a source line that # contains the text "do not issue a warning here" (presumably in a # comment). -# WARNING_FILTER = discard line_contents:"do not issue a warning here" +# WARNING_FILTER += discard line_contents:"do not issue a warning here" +# +# Example 18: Discard all warnings for which the first function in +# Listing XML is a library model or is called (directly or +# transitively) by a library model. +# WARNING_FILTER += discard starts_in_source_libraries=1 # # The following checks are enabled by default. To discard warnings # of a particular class, use the corresponding "discard" rule. @@ -2315,13 +2612,13 @@ # WARNING_FILTER += discard class="Empty while Statement" # WARNING_FILTER += discard class="Encryption without Padding" # WARNING_FILTER += discard class="File System Race Condition" -# WARNING_FILTER += discard class="Format String" # WARNING_FILTER += discard class="Format String Injection" +# WARNING_FILTER += discard class="Format String" # WARNING_FILTER += discard class="Free Non-Heap Variable" # WARNING_FILTER += discard class="Free Null Pointer" # WARNING_FILTER += discard class="Function Call Has No Effect" -# WARNING_FILTER += discard class="GlobalLock on GMEM_FIXED Memory" # WARNING_FILTER += discard class="GlobalHandle on GMEM_FIXED Memory" +# WARNING_FILTER += discard class="GlobalLock on GMEM_FIXED Memory" # WARNING_FILTER += discard class="GlobalUnlock on GMEM_FIXED Memory" # WARNING_FILTER += discard class="Hardcoded Authentication" # WARNING_FILTER += discard class="Hardcoded Crypto Key" @@ -2331,16 +2628,16 @@ # WARNING_FILTER += discard class="LDAP Injection" # WARNING_FILTER += discard class="Leak" # WARNING_FILTER += discard class="Library Injection" -# WARNING_FILTER += discard class="LocalLock on LMEM_FIXED Memory" # WARNING_FILTER += discard class="LocalHandle on LMEM_FIXED Memory" +# WARNING_FILTER += discard class="LocalLock on LMEM_FIXED Memory" # WARNING_FILTER += discard class="LocalUnlock on LMEM_FIXED Memory" # WARNING_FILTER += discard class="MAX_PATH Exceeded" # WARNING_FILTER += discard class="Misaligned Object" # WARNING_FILTER += discard class="Missing Return Statement" # WARNING_FILTER += discard class="Missing Return Value" # WARNING_FILTER += discard class="Negative Character Value" -# WARNING_FILTER += discard class="Negative file descriptor" # WARNING_FILTER += discard class="Negative Shift Amount" +# WARNING_FILTER += discard class="Negative file descriptor" # WARNING_FILTER += discard class="No Space For Null Terminator" # WARNING_FILTER += discard class="Null Pointer Dereference" # WARNING_FILTER += discard class="Null Security Descriptor" @@ -2351,9 +2648,9 @@ # WARNING_FILTER += discard class="Redundant Condition" # WARNING_FILTER += discard class="Return Pointer to Freed" # WARNING_FILTER += discard class="Return Pointer to Local" -# WARNING_FILTER += discard class="Shift Amount Exceeds Bit Width" -# WARNING_FILTER += discard class="Socket In Wrong State" # WARNING_FILTER += discard class="SQL Injection" +# WARNING_FILTER += discard class="Shift Amount Exceeds Bit Width" +# WARNING_FILTER += discard class="Tainted Buffer Access" # WARNING_FILTER += discard class="Try-lock that will never succeed" # WARNING_FILTER += discard class="Type Mismatch" # WARNING_FILTER += discard class="Type Overrun" @@ -2367,11 +2664,11 @@ # WARNING_FILTER += discard class="Unused Value" # WARNING_FILTER += discard class="Use After Close" # WARNING_FILTER += discard class="Use After Free" +# WARNING_FILTER += discard class="Use of GetTempFileName" +# WARNING_FILTER += discard class="Use of SO_REUSEADDR" # WARNING_FILTER += discard class="Use of crypt" # WARNING_FILTER += discard class="Use of gets" -# WARNING_FILTER += discard class="Use of GetTempFileName" # WARNING_FILTER += discard class="Use of mktemp" -# WARNING_FILTER += discard class="Use of SO_REUSEADDR" # WARNING_FILTER += discard class="Use of tmpfile" # WARNING_FILTER += discard class="Use of tmpnam" # WARNING_FILTER += discard class="Useless Assignment" @@ -2382,58 +2679,153 @@ # (Checks for some classes may require additional settings in order # to work correctly. See the individual warning class documentation # in the manual for full information.) +# WARNING_FILTER += allow class="/* in Comment" +# WARNING_FILTER += allow class="// in Comment" +# WARNING_FILTER += allow class="2$Buffer Overrun" # WARNING_FILTER += allow class="Addition Overflow of Allocation Size" # WARNING_FILTER += allow class="Addition Overflow of Size" # WARNING_FILTER += allow class="Assignment in Conditional" +# WARNING_FILTER += allow class="Backwards goto" # WARNING_FILTER += allow class="Basic Numerical Type Used" -# WARNING_FILTER += allow class="2$Buffer Overrun" +# WARNING_FILTER += allow class="Bit-field Signedness Not Explicit" +# WARNING_FILTER += allow class="Bit-field Too Short" +# WARNING_FILTER += allow class="Body Is Not Compound Statement" +# WARNING_FILTER += allow class="Boolean switch Expression" +# WARNING_FILTER += allow class="C++ Comment in C" +# WARNING_FILTER += allow class="Cast Removes const Qualifier" +# WARNING_FILTER += allow class="Cast Removes volatile Qualifier" +# WARNING_FILTER += allow class="Cast: Arithmetic Type/Void Pointer" +# WARNING_FILTER += allow class="Cast: Non-integer Arithmetic Type/Object Pointer" +# WARNING_FILTER += allow class="Cast: Object Pointers" # WARNING_FILTER += allow class="Code Before #include" +# WARNING_FILTER += allow class="Comment Suggests Code Unfinished" +# WARNING_FILTER += allow class="Commented-out Code" # WARNING_FILTER += allow class="Condition Contains Side Effects" +# WARNING_FILTER += allow class="Condition Is Not Boolean" # WARNING_FILTER += allow class="Conditional Compilation" # WARNING_FILTER += allow class="Conflicting Lock Order" +# WARNING_FILTER += allow class="Confusing Literal Suffix" +# WARNING_FILTER += allow class="Continue Statement" +# WARNING_FILTER += allow class="Conversion from Function Pointer" +# WARNING_FILTER += allow class="Conversion to Function Pointer" +# WARNING_FILTER += allow class="Conversion: Pointer to Incomplete" +# WARNING_FILTER += allow class="Conversion: Pointer/Integer" +# WARNING_FILTER += allow class="Conversion: Void Pointer to Object Pointer" +# WARNING_FILTER += allow class="Dangerous Include File Name" # WARNING_FILTER += allow class="Data Race" +# WARNING_FILTER += allow class="Declaration of Flexible Array Member" +# WARNING_FILTER += allow class="Declaration of Variable Length Array" +# WARNING_FILTER += allow class="Disallowed Macro Name" # WARNING_FILTER += allow class="Dynamic Allocation After Initialization" # WARNING_FILTER += allow class="Excessive Stack Depth" -# WARNING_FILTER += allow class="Function Pointer" +# WARNING_FILTER += allow class="Expression Value Widened by Assignment" +# WARNING_FILTER += allow class="Expression Value Widened by Other Operand" +# WARNING_FILTER += allow class="Extern Array Without Size" +# WARNING_FILTER += allow class="Float-typed Loop Counter" +# WARNING_FILTER += allow class="Function Defined in Header File" # WARNING_FILTER += allow class="Function Pointer Conversion" +# WARNING_FILTER += allow class="Function Pointer" # WARNING_FILTER += allow class="Function Too Long" +# WARNING_FILTER += allow class="GNU Extension" +# WARNING_FILTER += allow class="GNU Typeof" # WARNING_FILTER += allow class="Global Variable Declared with Different Types" # WARNING_FILTER += allow class="Goto Statement" # WARNING_FILTER += allow class="Hardcoded DNS Name" # WARNING_FILTER += allow class="High Risk Loop" +# WARNING_FILTER += allow class="Implicit Address of Function" +# WARNING_FILTER += allow class="Inappropriate Assignment Type" +# WARNING_FILTER += allow class="Inappropriate Bit-field Type" +# WARNING_FILTER += allow class="Inappropriate Cast Type" +# WARNING_FILTER += allow class="Inappropriate Cast Type: Expression" +# WARNING_FILTER += allow class="Inappropriate Character Arithmetic" +# WARNING_FILTER += allow class="Inappropriate Operand Type" +# WARNING_FILTER += allow class="Incomplete Function Prototype" # WARNING_FILTER += allow class="Inconsistent Enumerator Initialization" +# WARNING_FILTER += allow class="Inconsistent Function Declarations" +# WARNING_FILTER += allow class="Inconsistent Object Declarations" +# WARNING_FILTER += allow class="Inline Function Not static" +# WARNING_FILTER += allow class="Label Not In Enclosing Block" # WARNING_FILTER += allow class="Leftover Debug Code" +# WARNING_FILTER += allow class="Line Splicing in Comment" # WARNING_FILTER += allow class="Lock/Unlock Mismatch" # WARNING_FILTER += allow class="Locked Twice" # WARNING_FILTER += allow class="Macro Defined in Function Body" # WARNING_FILTER += allow class="Macro Does Not End With } or )" # WARNING_FILTER += allow class="Macro Does Not Start With { or (" +# WARNING_FILTER += allow class="Macro Name is C Keyword" # WARNING_FILTER += allow class="Macro Undefined in Function Body" -# WARNING_FILTER += allow class="Macro Uses -> Operator" -# WARNING_FILTER += allow class="Macro Uses [] Operator" # WARNING_FILTER += allow class="Macro Uses ## Operator" +# WARNING_FILTER += allow class="Macro Uses -> Operator" # WARNING_FILTER += allow class="Macro Uses Unary * Operator" +# WARNING_FILTER += allow class="Macro Uses [] Operator" +# WARNING_FILTER += allow class="Malformed #include" +# WARNING_FILTER += allow class="Malformed for-loop Condition" +# WARNING_FILTER += allow class="Malformed for-loop Initialization" +# WARNING_FILTER += allow class="Malformed for-loop Step" +# WARNING_FILTER += allow class="Malformed switch Statement" # WARNING_FILTER += allow class="Memory Protection Removal" +# WARNING_FILTER += allow class="Microsoft Extension" +# WARNING_FILTER += allow class="Mismatched Operand Types" +# WARNING_FILTER += allow class="Misplaced Return Statement" +# WARNING_FILTER += allow class="Misplaced default" +# WARNING_FILTER += allow class="Missing Braces in Initialization" +# WARNING_FILTER += allow class="Missing External Declaration" +# WARNING_FILTER += allow class="Missing External Definition" +# WARNING_FILTER += allow class="Missing Final else" +# WARNING_FILTER += allow class="Missing Literal Suffix" # WARNING_FILTER += allow class="Missing Lock Acquisition" # WARNING_FILTER += allow class="Missing Lock Release" -# WARNING_FILTER += allow class="Multiple Declarations of a Global" +# WARNING_FILTER += allow class="Missing break" +# WARNING_FILTER += allow class="Missing default" +# WARNING_FILTER += allow class="Missing for-loop Step" +# WARNING_FILTER += allow class="Missing for-loop Termination" +# WARNING_FILTER += allow class="Mixed Assembly and Code" +# WARNING_FILTER += allow class="Multiple Abnormal Loop Exits" # WARNING_FILTER += allow class="Multiple Declarations On Line" +# WARNING_FILTER += allow class="Multiple Declarations of a Global" +# WARNING_FILTER += allow class="Multiple External Declarations" +# WARNING_FILTER += allow class="Multiple External Definitions" +# WARNING_FILTER += allow class="Multiple Return Statements" # WARNING_FILTER += allow class="Multiple Statements On Line" # WARNING_FILTER += allow class="Multiplication Overflow of Allocation Size" # WARNING_FILTER += allow class="Multiplication Overflow of Size" +# WARNING_FILTER += allow class="Nested Function Declaration" # WARNING_FILTER += allow class="Nested Locks" -# WARNING_FILTER += allow class="No Matching #if" # WARNING_FILTER += allow class="No Matching #endif" +# WARNING_FILTER += allow class="No Matching #if" +# WARNING_FILTER += allow class="Non-const String Literal" +# WARNING_FILTER += allow class="Non-distinct Identifiers: External Names" +# WARNING_FILTER += allow class="Non-distinct Identifiers: Macro/Macro" +# WARNING_FILTER += allow class="Non-distinct Identifiers: Macro/Other" +# WARNING_FILTER += allow class="Non-distinct Identifiers: Nested Scope" +# WARNING_FILTER += allow class="Non-distinct Identifiers: Same Scope" +# WARNING_FILTER += allow class="Non-unique Identifiers: External Name" +# WARNING_FILTER += allow class="Non-unique Identifiers: Internal Name" +# WARNING_FILTER += allow class="Non-unique Identifiers: Tag" +# WARNING_FILTER += allow class="Non-unique Identifiers: Typedef" # WARNING_FILTER += allow class="Not All Warnings Are Enabled" # WARNING_FILTER += allow class="Not Enough Assertions" +# WARNING_FILTER += allow class="Object Defined in Header File" +# WARNING_FILTER += allow class="Octal Constant" +# WARNING_FILTER += allow class="Over-initialized Element" +# WARNING_FILTER += allow class="Partially Uninitialized Aggregate" +# WARNING_FILTER += allow class="Partially Uninitialized Array" # WARNING_FILTER += allow class="Pointer Before Beginning of Object" # WARNING_FILTER += allow class="Pointer Past End of Object" # WARNING_FILTER += allow class="Pointer Type Inside Typedef" # WARNING_FILTER += allow class="Potential Unbounded Loop" +# WARNING_FILTER += allow class="Preprocessing Directives in Macro Argument" # WARNING_FILTER += allow class="Recursion" # WARNING_FILTER += allow class="Recursive Macro" +# WARNING_FILTER += allow class="Restrict Qualifier Used" +# WARNING_FILTER += allow class="Risky Integer Promotion" # WARNING_FILTER += allow class="Scope Could Be File Static" # WARNING_FILTER += allow class="Scope Could Be Local Static" +# WARNING_FILTER += allow class="Side Effects in Expression with Decrement" +# WARNING_FILTER += allow class="Side Effects in Expression with Increment" +# WARNING_FILTER += allow class="Side Effects in sizeof" +# WARNING_FILTER += allow class="Signal Handler Entry Point" +# WARNING_FILTER += allow class="Socket In Wrong State" # WARNING_FILTER += allow class="Subtraction Underflow of Allocation Size" # WARNING_FILTER += allow class="Subtraction Underflow of Size" # WARNING_FILTER += allow class="Tainted Allocation Size" @@ -2443,36 +2835,131 @@ # WARNING_FILTER += allow class="Tainted Write" # WARNING_FILTER += allow class="Task Delay Function" # WARNING_FILTER += allow class="Thread Entry Point" +# WARNING_FILTER += allow class="Too Few Cases in switch" # WARNING_FILTER += allow class="Too Many Dereferences" -# WARNING_FILTER += allow class="Too Much Indirection in Declaration" # WARNING_FILTER += allow class="Too Many Parameters" +# WARNING_FILTER += allow class="Too Much Indirection in Declaration" # WARNING_FILTER += allow class="Truncation of Allocation Size" # WARNING_FILTER += allow class="Truncation of Size" +# WARNING_FILTER += allow class="Typographically Ambiguous Identifiers" # WARNING_FILTER += allow class="Unbalanced Parenthesis" # WARNING_FILTER += allow class="Unchecked Parameter Dereference" +# WARNING_FILTER += allow class="Union Type" # WARNING_FILTER += allow class="Unknown Lock" # WARNING_FILTER += allow class="Unreachable Control Flow" +# WARNING_FILTER += allow class="Unused Label" +# WARNING_FILTER += allow class="Unused Macro" +# WARNING_FILTER += allow class="Unused Parameter" +# WARNING_FILTER += allow class="Unused Tag" +# WARNING_FILTER += allow class="Unused Type" +# WARNING_FILTER += allow class="Unused Variable" # WARNING_FILTER += allow class="Use of #undef" +# WARNING_FILTER += allow class="Use of Exception Handling Function" +# WARNING_FILTER += allow class="Use of " +# WARNING_FILTER += allow class="Use of " +# WARNING_FILTER += allow class="Use of Input/Output" +# WARNING_FILTER += allow class="Use of " +# WARNING_FILTER += allow class="Use of Time/Date Function" +# WARNING_FILTER += allow class="Use of Input/Output" +# WARNING_FILTER += allow class="Use of AddAccessAllowedAce" +# WARNING_FILTER += allow class="Use of AddAccessDeniedAce" +# WARNING_FILTER += allow class="Use of AfxLoadLibrary" +# WARNING_FILTER += allow class="Use of AfxParseURL" +# WARNING_FILTER += allow class="Use of CoLoadLibrary" +# WARNING_FILTER += allow class="Use of Comma Operator" +# WARNING_FILTER += allow class="Use of CreateFile" +# WARNING_FILTER += allow class="Use of CreateProcess" +# WARNING_FILTER += allow class="Use of CreateThread" +# WARNING_FILTER += allow class="Use of FormatMessage" +# WARNING_FILTER += allow class="Use of LoadLibrary" +# WARNING_FILTER += allow class="Use of LoadModule" +# WARNING_FILTER += allow class="Use of MoveFile" +# WARNING_FILTER += allow class="Use of OemToAnsi" +# WARNING_FILTER += allow class="Use of OemToChar" +# WARNING_FILTER += allow class="Use of SHCreateProcessAsUserW" +# WARNING_FILTER += allow class="Use of ShellExecute" +# WARNING_FILTER += allow class="Use of StrCatChainW" +# WARNING_FILTER += allow class="Use of WinExec" +# WARNING_FILTER += allow class="Use of _exec" +# WARNING_FILTER += allow class="Use of _spawn" +# WARNING_FILTER += allow class="Use of abort" +# WARNING_FILTER += allow class="Use of atof" +# WARNING_FILTER += allow class="Use of atoi" +# WARNING_FILTER += allow class="Use of atol" +# WARNING_FILTER += allow class="Use of atoll" +# WARNING_FILTER += allow class="Use of bsearch" +# WARNING_FILTER += allow class="Use of catopen" +# WARNING_FILTER += allow class="Use of chroot" +# WARNING_FILTER += allow class="Use of cuserid" +# WARNING_FILTER += allow class="Use of execlp" +# WARNING_FILTER += allow class="Use of execvp" +# WARNING_FILTER += allow class="Use of exit" +# WARNING_FILTER += allow class="Use of getenv" +# WARNING_FILTER += allow class="Use of getlogin" +# WARNING_FILTER += allow class="Use of getopt" +# WARNING_FILTER += allow class="Use of getpass" +# WARNING_FILTER += allow class="Use of getwd" # WARNING_FILTER += allow class="Use of longjmp" +# WARNING_FILTER += allow class="Use of memset" +# WARNING_FILTER += allow class="Use of mkstemp" +# WARNING_FILTER += allow class="Use of popen" +# WARNING_FILTER += allow class="Use of qsort" +# WARNING_FILTER += allow class="Use of rand" +# WARNING_FILTER += allow class="Use of rand48 Function" +# WARNING_FILTER += allow class="Use of random" +# WARNING_FILTER += allow class="Use of realpath" +# WARNING_FILTER += allow class="Use of recvmsg" # WARNING_FILTER += allow class="Use of setjmp" +# WARNING_FILTER += allow class="Use of setuid" +# WARNING_FILTER += allow class="Use of signal" +# WARNING_FILTER += allow class="Use of strcat" +# WARNING_FILTER += allow class="Use of strcmp" +# WARNING_FILTER += allow class="Use of strcpy" +# WARNING_FILTER += allow class="Use of strlen" +# WARNING_FILTER += allow class="Use of strtrns" +# WARNING_FILTER += allow class="Use of syslog" +# WARNING_FILTER += allow class="Use of system" +# WARNING_FILTER += allow class="Use of t_open" +# WARNING_FILTER += allow class="Use of ttyname" +# WARNING_FILTER += allow class="Use of vfork" # WARNING_FILTER += allow class="Variadic Macro" # WARNING_FILTER += allow class="Warnings Not Treated As Errors" # -# To enable all Power of Ten -# [doc/html/WarningClasses/Pow10Checks.html] checks: -# WARNING_FILTER += allow categories:POW10 -# BUILD_OPTIONS += -retain-unnormalized-c-ast yes -# -# To enable all JPL [doc/html/WarningClasses/JPLChecks.html] -# checks: -# WARNING_FILTER += allow categories:JPL -# BUILD_OPTIONS += -retain-unnormalized-c-ast yes +# To enable additional buffer overrun checking, which can best be +# described as better at finding buffer overruns involving pointer +# arithmetic: +# WARNING_FILTER += allow class="2$Buffer Overrun" # # To discard integer overflow warnings that occur entirely within # system headers: # WARNING_FILTER += discard class="Integer Overflow of Allocation Size" is_sysinclude -#WARNING_FILTER += discard class="Integer Overflow of Allocation Size" is_sysinclude +#WARNING_FILTER += discard class="Integer Overflow of Allocation Size" language="C++" is_sysinclude +#WARNING_FILTER += discard class="Unreasonable Size Argument" language="C++" is_sysinclude + + +# Parameter SKIP_ANALYSIS_OF +# +# Purpose +# Use to specify that certain sets of procedures should not be +# analyzed. +# +# Tags +# - ANALYSIS_FILTER: Analysis-Side Filtering +# +# Type +# { UNREACHABLE_FUNCTIONS, SOURCE_LIBRARIES } +# +# Behavior +# - UNREACHABLE_FUNCTIONS : instructs CodeSonar to skips analysis +# of any procedure that is not reachable from one of the roots +# specified by REACHABILITY_ROOTS. CodeSonar will issue an alert +# [doc/html/GUI/GUI_Alerts.html] if value UNREACHABLE_FUNCTIONS +# is set but no reachability roots are specified. +# - SOURCE_LIBRARIES : instructs CodeSonar to skip analysis of +# CodeSonar Library Models +# [doc/html/C_Module/LibraryModels/LibraryModels.html], and any +# functions transitively called by library models. # Parameter BAD_FUNCTION_REGEX @@ -2482,6 +2969,7 @@ # Parameter BAD_FUNCTION_INFO # Parameter BAD_FUNCTION_LINK # Parameter BAD_FUNCTION_RANK +# Parameter BAD_FUNCTION_SIGNIFICANCE # # Purpose # Use the BAD_FUNCTION_* family of parameters to define warning @@ -2499,6 +2987,8 @@ # - BAD_FUNCTION_BASE_RANK: number # - BAD_FUNCTION_INFO: string # - BAD_FUNCTION_LINK: string representing a URL +# - BAD_FUNCTION_SIGNIFICANCE: { UNSPECIFIED, SECURITY, +# RELIABILITY, REDUNDANCY, STYLE, DIAGNOSTIC } # # Behavior # These parameters are used together to specify bad functions to @@ -2515,22 +3005,26 @@ # [doc/html/Elements/PROPERTIES_Warning.html#base_rank] assigned # to the warning, with default 15.0. # - BAD_FUNCTION_INFO will be used in the warning description box -# [doc/html/GUI/GUI_Warning_Report.html#endbox] sentence 'Use of -# [funcname()] is not recommended because ...'. The default value -# is "it is correlated with security or safety problems." Use -# to delimit paragraphs. Use linktext to link "linktext" to linkURL. +# [doc/html/GUI/GUI_Warning_Report_Annotations.html#endbox] +# sentence 'Use of [funcname()] is not recommended because ...'. +# The default value is "it is correlated with security or safety +# problems." Use to delimit paragraphs. +# Use linktext to link "linktext" to +# linkURL. # - BAD_FUNCTION_LINK specifies a URL for further information. # Values beginning with "#' are interpreted relative to the # CodeSonar manual root. If a value is specified, CodeSonar will # append 'See here for more information.' to # the text in the warning description box -# [doc/html/GUI/GUI_Warning_Report.html#endbox]. If no value is -# specified, and BAD_FUNCTION_INFO is also not specified, -# CodeSonar will look for a category beginning with "BADFUNC" in -# the BAD_FUNCTION_CATEGORIES list. If there is such a category, -# CodeSonar will add the "See here..." sentence with a link to -# the corresponding warning class page. +# [doc/html/GUI/GUI_Warning_Report_Annotations.html#endbox]. If +# no value is specified, and BAD_FUNCTION_INFO is also not +# specified, CodeSonar will look for a category beginning with +# "BADFUNC" in the BAD_FUNCTION_CATEGORIES list. If there is such +# a category, CodeSonar will add the "See here..." sentence with +# a link to the corresponding warning class page. +# - BAD_FUNCTION_SIGNIFICANCE is a string representing the +# Significance [doc/html/WarningClasses/Significance.html] +# classification for this warning class. # # Notes # @@ -2542,8 +3036,9 @@ # BAD_FUNCTION_MESSAGE value, the same warning class will be used # to cover all cases. Therefore, sets of rules with the same # BAD_FUNCTION_MESSAGE should also have the same -# BAD_FUNCTION_CATEGORIES and BAD_FUNCTION_BASE_RANK values (that -# is, they should only differ in the BAD_FUNCTION_REGEX setting). +# BAD_FUNCTION_CATEGORIES, BAD_FUNCTION_INFO, and +# BAD_FUNCTION_BASE_RANK values (that is, they should only differ +# in the BAD_FUNCTION_REGEX setting). # # Similarly, if a set of BAD_FUNCTION_* rules has a # BAD_FUNCTION_MESSAGE that is the same as the name of a standard @@ -2556,6 +3051,7 @@ # BAD_FUNCTION_MESSAGE = Use of gets # BAD_FUNCTION_CATEGORIES = BADFUNC.BO.GETS;CWE:242 # BAD_FUNCTION_BASE_RANK = 1.0 +# BAD_FUNCTION_SIGNIFICANCE = SECURITY # specifies that uses of the function "gets" should be flagged as # warnings. # @@ -2567,6 +3063,7 @@ # BAD_FUNCTION_MESSAGE = Use of memset # BAD_FUNCTION_CATEGORIES = BADFUNC.MEMSET;CWE:14 # BAD_FUNCTION_BASE_RANK = 10.0 +# BAD_FUNCTION_SIGNIFICANCE = SECURITY # # For functions in C++ compilation units with C++ linkage, the # regular expression will be matched against the fully qualified @@ -2602,137 +3099,629 @@ #BAD_FUNCTION_MESSAGE = $Insecure Randomness$Use of crypt #BAD_FUNCTION_CATEGORIES = BADFUNC.CRYPT;BSI:CRYPT-01;BSI:CRYPT-02;CWE:326;CWE:330 #BAD_FUNCTION_BASE_RANK = 40.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY #BAD_FUNCTION_REGEX = ^gets$|^_get(t|w)s$ #BAD_FUNCTION_MESSAGE = $Dangerous Function$Use of gets #BAD_FUNCTION_CATEGORIES = BADFUNC.BO.GETS;BSI:GETS;CWE:120;CWE:242 #BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY #BAD_FUNCTION_REGEX = ^_?tmpfile$ #BAD_FUNCTION_MESSAGE = $Insecure Temporary File$Use of tmpfile #BAD_FUNCTION_CATEGORIES = BADFUNC.TEMP.TMPFILE;BSI:TMPNAM-TMPFILE;BSI:Truncate;CWE:377 #BAD_FUNCTION_BASE_RANK = 42.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY #BAD_FUNCTION_REGEX = ^tmpnam(_r)?$|^_(t|w)tmpnam$ #BAD_FUNCTION_MESSAGE = $Insecure Temporary File$Use of tmpnam #BAD_FUNCTION_CATEGORIES = BADFUNC.TEMP.TMPNAM;BSI:TMPNAM-TMPFILE;BSI:Truncate;CWE:377 #BAD_FUNCTION_BASE_RANK = 43.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY #BAD_FUNCTION_REGEX = ^tempnam$|^_(t|w)?tempnam$ #BAD_FUNCTION_MESSAGE = $Insecure Temporary File$Use of tmpnam #BAD_FUNCTION_CATEGORIES = BADFUNC.TEMP.TMPNAM;BSI:TMPNAM-TMPFILE;BSI:Truncate;CWE:377 #BAD_FUNCTION_BASE_RANK = 43.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY #BAD_FUNCTION_REGEX = ^GetTempFileName(A|W)?$ #BAD_FUNCTION_MESSAGE= Use of GetTempFileName #BAD_FUNCTION_CATEGORIES = BADFUNC.TEMP.GETTEMPFILENAME;BSI:GetTempFileName;CWE:377 #BAD_FUNCTION_BASE_RANK = 43.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY #BAD_FUNCTION_REGEX = ^setjmp$ #BAD_FUNCTION_MESSAGE = $Call to setjmp$Use of setjmp -#BAD_FUNCTION_CATEGORIES = BADFUNC.SETJMP;CWE:691;CWE:710;POW10:1;JPL:11 +#BAD_FUNCTION_CATEGORIES = BADFUNC.SETJMP;Misra2012:21.4;CWE:691;CWE:710;POW10:1;JPL:11 #BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY #BAD_FUNCTION_REGEX = ^longjmp$ #BAD_FUNCTION_MESSAGE = $Call to longjmp$Use of longjmp -#BAD_FUNCTION_CATEGORIES = BADFUNC.LONGJMP;CWE:691;CWE:710;POW10:1;JPL:11 +#BAD_FUNCTION_CATEGORIES = BADFUNC.LONGJMP;Misra2012:21.4;CWE:691;CWE:710;POW10:1;JPL:11 #BAD_FUNCTION_BASE_RANK = 12.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY #BAD_FUNCTION_REGEX = ^mktemp$|^_(t|w)?mktemp$ #BAD_FUNCTION_MESSAGE = $Insecure Temporary File$Use of mktemp -#BAD_FUNCTION_INFO = it creates filenames that are easily guessed, so the resulting files can be manipulated by other processes. Its use is therefore a security risk. #BAD_FUNCTION_CATEGORIES = BADFUNC.TEMP.MKTEMP;BSI:MKTEMP;CWE:377 #BAD_FUNCTION_BASE_RANK = 47.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY ## For "Task Delay Function" check. ## As with other JPL classes, this warning class is disabled by default. #BAD_FUNCTION_REGEX = ^sleep|usleep|taskDelay|nanosleep|clock_nanosleep$ #BAD_FUNCTION_MESSAGE = Task Delay Function -#BAD_FUNCTION_INFO = it is considered to be a task delay function. The use of task delay functions for synchronization can cause problems such as race conditions. #BAD_FUNCTION_CATEGORIES = CONCURRENCY.BADFUNC.DELAY;JPL:7 +#BAD_FUNCTION_SIGNIFICANCE = RELIABILITY #BAD_FUNCTION_REGEX = ^osal_task_delay|osal_task_pause$ #BAD_FUNCTION_MESSAGE = Task Delay Function -#BAD_FUNCTION_INFO = it is considered to be a task delay function. The use of task delay functions for synchronization can cause problems such as race conditions. #BAD_FUNCTION_CATEGORIES = CONCURRENCY.BADFUNC.DELAY;JPL:7 +#BAD_FUNCTION_SIGNIFICANCE = RELIABILITY ## For "Leftover Debug Code" check. ## This warning class is disabled by default. #BAD_FUNCTION_REGEX = ^puts|printf|vprintf$ #BAD_FUNCTION_MESSAGE = Leftover Debug Code -#BAD_FUNCTION_INFO = it may be a debugging trace statement unintentionally left in the code -#BAD_FUNCTION_CATEGORIES = CWE:489 +#BAD_FUNCTION_CATEGORIES = LANG.STRUCT.DBG;CWE:489 +#BAD_FUNCTION_SIGNIFICANCE = STYLE +#BAD_FUNCTION_REGEX = ^system$|^_wsystem$ +#BAD_FUNCTION_MESSAGE = Use of system +#BAD_FUNCTION_CATEGORIES = BADFUNC.PATH.SYSTEM;Misra2012:21.8;Misra2004:20.11;BSI:Exec-SearchPath-01;CWE:426 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY -# Parameter PLUGINS -# -# Purpose -# Specifies filenames of Scheme, Python, and C plug-ins to load. -# -# Tags -# - BUILD_BEHAVIOR: Governs the Build/Analysis -# -# Type -# string -# -# Behavior -# The specified files will be loaded as plug-ins. -# -# Notes -# For example: -# PLUGINS += /tmp/fname.stk -# PLUGINS += /tmp/fname.py -# PLUGINS += /tmp/fname.pyc -# PLUGINS += /tmp/fname.so -# PLUGINS += /tmp/fname.dll -# PLUGINS += /tmp/fname.bundle -# PLUGINS += c:\Documents and Settings\Bob\Desktop\fname.dll -# -# For more information about CodeSonar plug-ins, see CodeSonar -# Plug-In API [doc/html/API/CodeSonarPlugins/PluginAPI.html]. -# -# The Python API for CodeSonar currently has beta-level support. -# For more information, see the notes on API Languages -# [doc/html/API/Api.html#languages]. -# -# For plug-ins using other languages: -# - Java: use JAVA_PLUGIN_CLASSES, JAVA_PLUGIN_JVM, and -# JAVA_PLUGIN_CLASSPATH to load. -# - C#: use CSHARP_PLUGINS and CSHARP_PLUGIN_DOTNET_VERSION to -# load. -# - C++ (using the csonar_plugin.hpp interface and names in the cs -# namespace): #define the preprocessor symbol CS_CPP_IMPL in -# exactly one compilation unit before including any CodeSonar -# header files. This will define some global variables that would -# otherwise cause link errors. +## --- for BSI AddAccess-ACE Rule +#BAD_FUNCTION_REGEX = ^AddAccessAllowedAce$ +#BAD_FUNCTION_MESSAGE = Use of AddAccessAllowedAce +#BAD_FUNCTION_CATEGORIES = BADFUNC.ADDACCESSACE;BSI:AddAccess-ACE;CWE:269;CWE:281 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY -# Parameter JAVA_PLUGIN_JVM -# -# Purpose -# Specifies the JVM DLL or shared object to use for all Java plug- -# ins. -# -# Tags -# - BUILD_BEHAVIOR: Governs the Build/Analysis -# -# Type +#BAD_FUNCTION_REGEX = ^AddAccessDeniedAce$ +#BAD_FUNCTION_MESSAGE = Use of AddAccessDeniedAce +#BAD_FUNCTION_CATEGORIES = BADFUNC.ADDACCESSACE;BSI:AddAccess-ACE;CWE:269;CWE:281 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI AfxLoadLibrary Rule + +#BAD_FUNCTION_REGEX = ^AfxLoadLibrary$ +#BAD_FUNCTION_MESSAGE = Use of AfxLoadLibrary +#BAD_FUNCTION_CATEGORIES = BADFUNC.PATH.AFXLOADLIBRARY;BSI:AfxLoadLibrary;CWE:426 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^CoLoadLibrary$ +#BAD_FUNCTION_MESSAGE = Use of CoLoadLibrary +#BAD_FUNCTION_CATEGORIES = BADFUNC.PATH.COLOADLIBRARY;BSI:AfxLoadLibrary;CWE:426 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + + +## --- for BSI AfxParseURL Rule + +#BAD_FUNCTION_REGEX = ^AfxParseURL$ +#BAD_FUNCTION_MESSAGE = Use of AfxParseURL +#BAD_FUNCTION_CATEGORIES = BADFUNC.AFXPARSEURL;BSI:AfxParseURL;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI Catopen Rule + +#BAD_FUNCTION_REGEX = ^catopen$ +#BAD_FUNCTION_MESSAGE = Use of catopen +#BAD_FUNCTION_CATEGORIES = BADFUNC.CATOPEN;BSI:Catopen;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI CHROOT-01, CHROOT-02, CHROOT-03 Rules + +#BAD_FUNCTION_REGEX = ^chroot$ +#BAD_FUNCTION_MESSAGE = Use of chroot +#BAD_FUNCTION_CATEGORIES = BADFUNC.CHROOT;BSI:CHROOT-01;BSI:CHROOT-02;BSI:CHROOT-03;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI CreateFile-01, CreateFile-02 Rules + +#BAD_FUNCTION_REGEX = ^CreateFile(A|W)?$ +#BAD_FUNCTION_MESSAGE = Use of CreateFile +#BAD_FUNCTION_CATEGORIES = BADFUNC.CREATEFILE;BSI:CreateFile-01;BSI:CreateFile-02;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI CreateProcess-02, CreateProcess-03, CreateProcess-04 Rules + +#BAD_FUNCTION_REGEX = ^CreateProcess(A|W)?$|^CreateProcessAsUser(A|W)?$|^CreateProcessWithLogonW$ +#BAD_FUNCTION_MESSAGE = Use of CreateProcess +#BAD_FUNCTION_CATEGORIES = BADFUNC.CREATEProcess;BSI:CreateProcess-02;BSI:CreateProcess-03;BSI:CreateProcess-04;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI CreateThread Rule + +#BAD_FUNCTION_REGEX = ^CreateThread$ +#BAD_FUNCTION_MESSAGE = Use of CreateThread +#BAD_FUNCTION_CATEGORIES = BADFUNC.CREATETHREAD;BSI:CreateThread;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI CUSERID Rule + +#BAD_FUNCTION_REGEX = ^cuserid$ +#BAD_FUNCTION_MESSAGE = Use of cuserid +#BAD_FUNCTION_CATEGORIES = BADFUNC.CUSERID;BSI:CUSERID;CWE:477;CWE:863 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI Exec-SearchPath-01, Exec-SearchPath-02 Rules + +#BAD_FUNCTION_REGEX = ^_w?execlp?e?$|^_w?execvp?e?$ +#BAD_FUNCTION_MESSAGE = Use of _exec +#BAD_FUNCTION_CATEGORIES = BADFUNC.PATH._EXEC;BSI:Exec-SearchPath-01;BSI:Exec-SearchPath-02;CWE:426 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^execlp$ +#BAD_FUNCTION_MESSAGE = Use of execlp +#BAD_FUNCTION_CATEGORIES = BADFUNC.PATH.EXECLP;BSI:Exec-SearchPath-01;CWE:426 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^execvp$ +#BAD_FUNCTION_MESSAGE = Use of execvp +#BAD_FUNCTION_CATEGORIES = BADFUNC.PATH.EXECVP;BSI:Exec-SearchPath-01;CWE:426 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^popen$ +#BAD_FUNCTION_MESSAGE = Use of popen +#BAD_FUNCTION_CATEGORIES = BADFUNC.PATH.POPEN;BSI:Exec-SearchPath-01;CWE:426 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^_w?spawnlp?e?$|^_w?spawnvp?e?$ +#BAD_FUNCTION_MESSAGE = Use of _spawn +#BAD_FUNCTION_CATEGORIES = BADFUNC.PATH._SPAWN;BSI:Exec-SearchPath-01;BSI:Exec-SearchPath-02;CWE:426 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + + +## --- for BSI FormatMessage Rule + +#BAD_FUNCTION_REGEX = ^FormatMessage(A|W)?$ +#BAD_FUNCTION_MESSAGE = Use of FormatMessage +#BAD_FUNCTION_CATEGORIES = BADFUNC.FORMATMESSAGE;BSI:FormatMessage;CWE:134;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI GETLOGIN Rule + +#BAD_FUNCTION_REGEX = ^getlogin$ +#BAD_FUNCTION_MESSAGE = Use of getlogin +#BAD_FUNCTION_CATEGORIES = BADFUNC.GETLOGIN;BSI:GETLOGIN;CWE:863 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI GETOPT Rule + +#BAD_FUNCTION_REGEX = ^getopt(_long(_only)?)?$ +#BAD_FUNCTION_MESSAGE = Use of getopt +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.GETOPT;BSI:GETOPT;CWE:120;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI GETPASS Rule + +#BAD_FUNCTION_REGEX = ^getpass$ +#BAD_FUNCTION_MESSAGE = Use of getpass +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.GETPASS;BSI:GETPASS;CWE:120;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI LoadLibrary Rule + +#BAD_FUNCTION_REGEX = ^LoadLibrary(A|W)?$|^LoadLibraryEx(A|W)?$ +#BAD_FUNCTION_MESSAGE = Use of LoadLibrary +#BAD_FUNCTION_CATEGORIES = BADFUNC.PATH.LOADLIBRARY;BSI:LoadLibrary;CWE:426 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI MEMSET Rule + +#BAD_FUNCTION_REGEX = ^memset$ +#BAD_FUNCTION_MESSAGE = Use of memset +#BAD_FUNCTION_CATEGORIES = BADFUNC.MEMSET;CWE:14 +#BAD_FUNCTION_BASE_RANK = 10.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI MetaRule Rule (5) + +#BAD_FUNCTION_REGEX = ^(d|e|j|l|m|n|s)rand48$|^seed48$|^lcong48$ +#BAD_FUNCTION_MESSAGE = Use of rand48 Function +#BAD_FUNCTION_CATEGORIES = BADFUNC.RANDOM.RAND48;BSI:MetaRule;CWE:330 +#BAD_FUNCTION_BASE_RANK = 45.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^s?rand$ +#BAD_FUNCTION_MESSAGE = Use of rand +#BAD_FUNCTION_CATEGORIES = BADFUNC.RANDOM.RAND;BSI:MetaRule;CWE:330 +#BAD_FUNCTION_BASE_RANK = 45.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^s?random$ +#BAD_FUNCTION_MESSAGE = Use of random +#BAD_FUNCTION_CATEGORIES = BADFUNC.RANDOM.RANDOM;BSI:MetaRule;CWE:330 +#BAD_FUNCTION_BASE_RANK = 45.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI MKSTEMP Rule + +#BAD_FUNCTION_REGEX = ^mkstemp$ +#BAD_FUNCTION_MESSAGE = $Insecure Temporary File$Use of mkstemp +#BAD_FUNCTION_CATEGORIES = BADFUNC.TEMP.MKSTEMP;BSI:Mkstemp;CWE:377 +#BAD_FUNCTION_BASE_RANK = 47.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI MOVEFILE Rule + +#BAD_FUNCTION_REGEX = ^MoveFile(A|W)?$ +#BAD_FUNCTION_MESSAGE = Use of MoveFile +#BAD_FUNCTION_CATEGORIES = BADFUNC.MOVEFILE;BSI:MoveFile;CWE:477 +#BAD_FUNCTION_BASE_RANK = 45.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI OemToChar Rule + +#BAD_FUNCTION_REGEX = ^OemToChar(A|W)?$ +#BAD_FUNCTION_MESSAGE = Use of OemToChar +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.OEMTOCHAR;BSI:OemToChar;CWE:120;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^OemToAnsi(A|W)?$ +#BAD_FUNCTION_MESSAGE = Use of OemToAnsi +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.OEMTOCHAR;BSI:OemToChar;CWE:120;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI RecvMsg Rule + +#BAD_FUNCTION_REGEX = ^recvmsg$ +#BAD_FUNCTION_MESSAGE = Use of recvmsg +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.RECVMSG;BSI:RecvMsg;CWE:120;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI ShellExecute Rule + +#BAD_FUNCTION_REGEX = ^ShellExecute(A|W)?$|^ShellExecuteEx(A|W)?$ +#BAD_FUNCTION_MESSAGE = Use of ShellExecute +#BAD_FUNCTION_CATEGORIES = BADFUNC.PATH.SHELLEXECUTE;BSI:ShellExecute;CWE:426 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI SHCreateProcessAsUserW Rule + +#BAD_FUNCTION_REGEX = ^SHCreateProcessAsUserW$ +#BAD_FUNCTION_MESSAGE = Use of SHCreateProcessAsUserW +#BAD_FUNCTION_CATEGORIES = BADFUNC.PATH.SHCREATEPROCESSASUSERW;BSI:SHCreateProcessAsUserW;CWE:426 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI SIGNAL-01 Rule + +#BAD_FUNCTION_REGEX = ^signal$ +#BAD_FUNCTION_MESSAGE = Use of signal +#BAD_FUNCTION_CATEGORIES = BADFUNC.SIGNAL;BSI:SIGNAL-01;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI SIGNAL-02 Rule + +#BAD_FUNCTION_REGEX = ^setuid$ +#BAD_FUNCTION_MESSAGE = Use of setuid +#BAD_FUNCTION_CATEGORIES = BADFUNC.SETUID;BSI:SIGNAL-02;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI STRCAT Rule + +#BAD_FUNCTION_REGEX = ^lstrcat(A|W)?$|^strc?cat$|^StrCat(A|W)$|^olestrcat$ +#BAD_FUNCTION_MESSAGE = Use of strcat +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.STRCAT;BSI:STRCAT;CWE:120;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^_?mbscat$|^_f?tcscat$|^wcscat$ +#BAD_FUNCTION_MESSAGE = Use of strcat +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.STRCAT;BSI:STRCAT;CWE:120;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI StrCatChainW Rule + +#BAD_FUNCTION_REGEX = ^StrCatChainW$ +#BAD_FUNCTION_MESSAGE = Use of StrCatChainW +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.STRCATCHAINW;BSI:StrCatChainW;CWE:120;CWE:242;CWE:251 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI STRCMP Rule + +#BAD_FUNCTION_REGEX = ^l?strcmpi?$ +#BAD_FUNCTION_MESSAGE = Use of strcmp +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.STRCMP;BSI:STRCMP;CWE:120;CWE:242;CWE:251 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI STRCPY Rule + +#BAD_FUNCTION_REGEX = ^strcpy$|^StrCpy(A|W)?$|^strccpy$|^strcadd$ +#BAD_FUNCTION_MESSAGE = Use of strcpy +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.STRCPY;BSI:STRCPY;CWE:120;CWE:242;CWE:251 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^(ua)?lstrcpy(A|W)?$|^olestrcpy$ +#BAD_FUNCTION_MESSAGE = Use of strcpy +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.STRCPY;BSI:STRCPY;CWE:120;CWE:242;CWE:251 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^_f?tcscpy$|^_?mbscpy$|^wcscpy$ +#BAD_FUNCTION_MESSAGE = Use of strcpy +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.STRCPY;BSI:STRCPY;CWE:120;CWE:242;CWE:251 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI STRLEN Rule + +#BAD_FUNCTION_REGEX = ^l?strlen$ +#BAD_FUNCTION_MESSAGE = Use of strlen +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.STRLEN;BSI:STRLEN;CWE:120;CWE:242;CWE:251 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^_mbslen$|^_tcslen$|^wcslen$ +#BAD_FUNCTION_MESSAGE = Use of strlen +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.STRLEN;BSI:STRLEN;CWE:120;CWE:242;CWE:251 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI STRTRNS Rule + +#BAD_FUNCTION_REGEX = ^strtrns$ +#BAD_FUNCTION_MESSAGE = Use of strtrns +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.STRTRNS;BSI:STRTRNS;CWE:120;CWE:242;CWE:251 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI SYSLOG-1 Rule + +#BAD_FUNCTION_REGEX = ^syslog$ +#BAD_FUNCTION_MESSAGE = Use of syslog +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.SYSLOG;BSI:SYSLOG-1;CWE:120;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI T_OPEN Rule + +#BAD_FUNCTION_REGEX = ^t_open$ +#BAD_FUNCTION_MESSAGE = Use of t_open +#BAD_FUNCTION_CATEGORIES = BADFUNC.T_OPEN;BSI:T_Open;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI TTYNAME Rule + +#BAD_FUNCTION_REGEX = ^ttyname$ +#BAD_FUNCTION_MESSAGE = Use of ttyname +#BAD_FUNCTION_CATEGORIES = BADFUNC.TTYNAME;BSI:TTYNAME;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## --- for BSI VFORK Rule + +#BAD_FUNCTION_REGEX = ^vfork$ +#BAD_FUNCTION_MESSAGE = Use of vfork +#BAD_FUNCTION_CATEGORIES = BADFUNC.VFORK;BSI:VFORK;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^getwd$ +#BAD_FUNCTION_MESSAGE = Use of getwd +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.GETWD;BSI:GETWD;CWE:120;CWE:242 +#BAD_FUNCTION_BASE_RANK = 1.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^LoadModule$ +#BAD_FUNCTION_MESSAGE = Use of LoadModule +#BAD_FUNCTION_CATEGORIES = BADFUNC.LOADMODULE;BSI:LoadModule;CWE:477 +#BAD_FUNCTION_BASE_RANK = 44.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^realpath$ +#BAD_FUNCTION_MESSAGE = Use of realpath +#BAD_FUNCTION_CATEGORIES = BADFUNC.BO.REALPATH;BSI:REALPATH;CWE:785 +#BAD_FUNCTION_BASE_RANK = 46.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +#BAD_FUNCTION_REGEX = ^WinExec$ +#BAD_FUNCTION_MESSAGE = Use of WinExec +#BAD_FUNCTION_CATEGORIES = BADFUNC.WINEXEC;BSI:WinExec;CWE:477 +#BAD_FUNCTION_BASE_RANK = 48.0 +#BAD_FUNCTION_SIGNIFICANCE = SECURITY + +## List scraped from here: +## http://pubs.opengroup.org/onlinepubs/7908799/xsh/stdio.h.html +#BAD_FUNCTION_REGEX = ^(clearerr|ctermid|cuserid|fclose|fdopen|feof|ferror|fflush|fgetc|fgetpos|fgets|fileno|flockfile|fopen|fprintf|fputc|fputs|fread|freopen|fscanf|fseek|fseeko|fsetpos|ftell|ftello|ftrylockfile|funlockfile|fwrite|getc|getchar|getc_unlocked|getchar_unlocked|getopt|gets|getw|pclose|perror|popen|printf|putc|putchar|putc_unlocked|putchar_unlocked|puts|putw|remove|rename|rewind|scanf|setbuf|setvbuf|snprintf|sprintf|sscanf|tempnam|tmpfile|tmpnam|ungetc|vfprintf|vprintf|vsnprintf|vsprintf)$ +#BAD_FUNCTION_MESSAGE = Use of Input/Output +#BAD_FUNCTION_CATEGORIES = BADFUNC.STDIO_H;Misra2012:21.6;CWE:758;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + +## List scraped from here: +## http://pubs.opengroup.org/onlinepubs/7908799/xsh/wchar.h.html +#BAD_FUNCTION_REGEX = ^(btowc|fwprintf|fwscanf|iswalnum|iswalpha|iswcntrl|iswdigit|iswgraph|iswlower|iswprint|iswpunct|iswspace|iswupper|iswxdigit|iswctype|fgetwc|fgetws|fputwc|fputws|fwide|getwc|getwchar|mbsinit|mbrlen|mbrtowc|mbsrtowcs|putwc|putwchar|swprintf|swscanf|towlower|towupper|ungetwc|vfwprintf|vwprintf|vswprintf|wcrtomb|wcscat|wcschr|wcscmp|wcscoll|wcscpy|wcscspn|wcsftime|wcslen|wcsncat|wcsncmp|wcsncpy|wcspbrk|wcsrchr|wcsrtombs|wcsspn|wcsstr|wcstod|wcstok|wcstol|wcstoul|wcswcs|wcswidth|wcsxfrm|wctob|wctype|wcwidth|wmemchr|wmemcmp|wmemcpy|wmemmove|wmemset|wprintf|wscanf)$ +#BAD_FUNCTION_MESSAGE = Use of Input/Output +#BAD_FUNCTION_CATEGORIES = BADFUNC.WCHAR_H;Misra2012:21.6;CWE:758;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + + +#BAD_FUNCTION_REGEX = ^(atof)$ +#BAD_FUNCTION_MESSAGE = Use of atof +#BAD_FUNCTION_CATEGORIES = BADFUNC.ATOF;Misra2012:21.7;Misra2004:20.10;CWE:758;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + +#BAD_FUNCTION_REGEX = ^(atoi)$ +#BAD_FUNCTION_MESSAGE = Use of atoi +#BAD_FUNCTION_CATEGORIES = BADFUNC.ATOI;Misra2012:21.7;Misra2004:20.10;CWE:758;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + +#BAD_FUNCTION_REGEX = ^(atol)$ +#BAD_FUNCTION_MESSAGE = Use of atol +#BAD_FUNCTION_CATEGORIES = BADFUNC.ATOL;Misra2012:21.7;Misra2004:20.10;CWE:758;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + +#BAD_FUNCTION_REGEX = ^(atoll)$ +#BAD_FUNCTION_MESSAGE = Use of atoll +#BAD_FUNCTION_CATEGORIES = BADFUNC.ATOLL;Misra2012:21.7;Misra2004:20.10;CWE:758;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + +#BAD_FUNCTION_REGEX = ^(abort)$ +#BAD_FUNCTION_MESSAGE = Use of abort +#BAD_FUNCTION_CATEGORIES = BADFUNC.ABORT;Misra2012:21.8;Misra2004:20.11;CWE:758;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + +#BAD_FUNCTION_REGEX = ^(exit)$ +#BAD_FUNCTION_MESSAGE = Use of exit +#BAD_FUNCTION_CATEGORIES = BADFUNC.EXIT;Misra2012:21.8;Misra2004:20.11;CWE:758;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + +#BAD_FUNCTION_REGEX = ^(getenv)$ +#BAD_FUNCTION_MESSAGE = Use of getenv +#BAD_FUNCTION_CATEGORIES = BADFUNC.GETENV;Misra2012:21.8;Misra2004:20.11;CWE:758;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + +#BAD_FUNCTION_REGEX = ^(bsearch)$ +#BAD_FUNCTION_MESSAGE = Use of bsearch +#BAD_FUNCTION_CATEGORIES = BADFUNC.BSEARCH;Misra2012:21.9;CWE:758;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + +#BAD_FUNCTION_REGEX = ^(qsort)$ +#BAD_FUNCTION_MESSAGE = Use of qsort +#BAD_FUNCTION_CATEGORIES = BADFUNC.QSORT;Misra2012:21.9;CWE:400;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + +#BAD_FUNCTION_REGEX = ^(asctime|asctime_r|clock|clock_getres|clock_gettime|clock_settime|ctime|ctime_r|difftime|getdate|gmtime|gmtime_r|localtime|localtime_r|mktime|nanosleep|strftime|strptime|time|timer_create|timer_delete|timer_gettime|timer_getoverrun|timer_settime|tzset)$ +#BAD_FUNCTION_MESSAGE = Use of Time/Date Function +#BAD_FUNCTION_CATEGORIES = BADFUNC.TIME_H;Misra2012:21.10;CWE:758;CWE:676 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + +#BAD_FUNCTION_REGEX = ^(feclearexcept|fegetexceptflag|feraiseexcept|fesetexceptflag|fetestexcept|fegetround|fesetround|fegetenv|feholdexcept|fesetenv|feupdateenv)$ +#BAD_FUNCTION_MESSAGE = Use of Exception Handling Function +#BAD_FUNCTION_CATEGORIES = BADFUNC.FENV_H;Misra2012:21.12 +#BAD_FUNCTION_BASE_RANK = 10 +#BAD_FUNCTION_SIGNIFICANCE = STYLE + + +# Parameter PLUGINS +# +# Purpose +# Specifies filenames of C, Python, and Scheme plug-ins to load. +# +# Tags +# - BUILD_BEHAVIOR: Governs the Build/Analysis +# +# Type +# string +# +# Behavior +# The specified files will be loaded as plug-ins. +# +# CodeSonar will instantiate variable $GTHOME with the path to the +# CodeSonar installation. +# +# Notes +# For example: +# PLUGINS += /tmp/pname.stk +# PLUGINS += /tmp/pname.py +# PLUGINS += /tmp/pname.pyc +# PLUGINS += /tmp/pname.so +# PLUGINS += /tmp/pname.dll +# PLUGINS += /tmp/pname.bundle +# PLUGINS += $GTHOME/projectXplugins/pname.so +# PLUGINS += c:\Documents and Settings\Bob\Desktop\pname.dll +# +# For more information about CodeSonar plug-ins, see CodeSonar +# Plug-In API [doc/html/API/CodeSonarPlugins/PluginAPI.html]. +# +# Distributed analysis [doc/html/Workings/DistributedAnalysis.html] +# slaves will use the PLUGINS setting from the analysis master (not +# the one from the slave's associated launch daemon). +# +# The Python API for CodeSonar currently has beta-level support. +# For more information, see the notes on API Languages +# [doc/html/API/Api.html#languages]. +# +# For plug-ins using other languages: +# - Java: use JAVA_PLUGIN_CLASSES, JAVA_PLUGIN_JVM, and +# JAVA_PLUGIN_CLASSPATH to load. +# - C#: use CSHARP_PLUGINS and CSHARP_PLUGIN_DOTNET_VERSION to +# load. +# - C++ (using the csonar_plugin.hpp interface and names in the cs +# namespace): #define the preprocessor symbol CS_CPP_IMPL in +# exactly one compilation unit before including any CodeSonar +# header files. This will define some global variables that would +# otherwise cause link errors. + + +# Parameter JAVA_PLUGIN_JVM +# +# Purpose +# Specifies the JVM DLL or shared object to use for all Java plug- +# ins. +# +# Tags +# - BUILD_BEHAVIOR: Governs the Build/Analysis +# +# Type # string # # Behavior # The specified string will be treated as the absolute path to the # Java DLL or shared object. # +# CodeSonar will instantiate variable $GTHOME with the path to the +# CodeSonar installation. +# # Notes # The Java API for CodeSonar currently has beta-level support. For # more information, see the notes on API Languages # [doc/html/API/Api.html#languages]. # -## JAVA_PLUGIN_JVM = C:\Program Files\Java\jre6\bin\server\jvm.dll -## JAVA_PLUGIN_JVM = /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so - +# For example: +# JAVA_PLUGIN_JVM = C:\Program Files\Java\jre6\bin\server\jvm.dll +# JAVA_PLUGIN_JVM = /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so # Parameter JAVA_PLUGIN_CLASSPATH @@ -2750,28 +3739,37 @@ # Multiple directories can be placed in the classpath by using the # += operator. # +# CodeSonar will instantiate variable $GTHOME with the path to the +# CodeSonar installation. +# # Notes # The Java API for CodeSonar currently has beta-level support. For # more information, see the notes on API Languages # [doc/html/API/Api.html#languages]. # -## JAVA_PLUGIN_CLASSPATH += c:\pluginclasspath - +# For example: +# JAVA_PLUGIN_CLASSPATH += c:\pluginclasspath # Parameter JAVA_PLUGIN_CLASSES # # Purpose -# Specifies the Java class whose main function should be invoked. +# Specifies a Java plug-in by naming the Java class whose main() +# method should be invoked. # # Tags # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# string +# string, representing a fully-qualified class name: use / as the +# package separator if the class is in a package. # # Behavior -# Use / as the package separator if the class is in a package. +# The specified string will be used as the name argument to the JNI +# FindClass() +# [http://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/functions.html#FindClass] +# function; the main() function of the identified class will be +# invoked as a CodeSonar plug-in. # # Notes # The Java API for CodeSonar currently has beta-level support. For @@ -2801,9 +3799,12 @@ # } # } # -## JAVA_PLUGIN_CLASSES += Test -## JAVA_PLUGIN_CLASSES += com/example/csplugin/Test - +# Then to include this plug-in, make sure the path to the class +# file/package is specified with JAVA_PLUGIN_CLASSPATH, then use +# JAVA_PLUGIN_CLASSES to specify the class name: +# JAVA_PLUGIN_CLASSES += Test +# or, if it is in a package: +# JAVA_PLUGIN_CLASSES += com/example/csplugin/Test # Parameter CSHARP_PLUGIN_DOTNET_VERSION @@ -2854,6 +3855,9 @@ # static method named main, with signature: # public static int main(String dummy) # +# CodeSonar will instantiate variable $GTHOME with the path to the +# CodeSonar installation. +# # Notes # The C# API for CodeSonar currently has beta-level support. For # more information, see the notes on API Languages @@ -2911,7 +3915,7 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - No : warnings will not be produced just because conditionals @@ -2958,7 +3962,7 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - No : warnings will not be produced just because conditionals @@ -3083,7 +4087,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - No : the analysis will refuse to run on a project that contains @@ -3104,7 +4108,7 @@ # Determines what qualifies as a Null Pointer Dereference # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_LANG.MEM.NPD: Used by Null Pointer Dereference # # Type @@ -3139,11 +4143,11 @@ # - WARNING_TUNING: Fine Tuning for Warnings # - WC_LANG.STRUCT.RC: Used by Redundant Condition # - WC_LANG.STRUCT.UC: Used by Unreachable Code: 5 warning classes -# - WC_LANG.STRUCT.UVAL: Used by Unused Value +# - WC_LANG.STRUCT.UUVAL: Used by Unused Value # - WC_LANG.STRUCT.UA: Used by Useless Assignment # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If set to "Yes", then warnings of classes requiring universal @@ -3179,11 +4183,11 @@ # - WARNING_TUNING: Fine Tuning for Warnings # - WC_LANG.STRUCT.RC: Used by Redundant Condition # - WC_LANG.STRUCT.UC: Used by Unreachable Code: 5 warning classes -# - WC_LANG.STRUCT.UVAL: Used by Unused Value +# - WC_LANG.STRUCT.UUVAL: Used by Unused Value # - WC_LANG.STRUCT.UA: Used by Useless Assignment # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If set to "Yes", then warnings of classes requiring universal @@ -3215,7 +4219,7 @@ # - WC_LANG.STRUCT.NTAD: Used by Null Test After Dereference # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If set to "Yes", then Null Test After Dereference warnings will @@ -3245,11 +4249,11 @@ # - WC_LANG.STRUCT.NTAD: Used by Null Test After Dereference # - WC_LANG.STRUCT.RC: Used by Redundant Condition # - WC_LANG.STRUCT.UC: Used by Unreachable Code: 5 warning classes -# - WC_LANG.STRUCT.UVAL: Used by Unused Value +# - WC_LANG.STRUCT.UUVAL: Used by Unused Value # - WC_LANG.STRUCT.UA: Used by Useless Assignment # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If set to "Yes", then warnings of classes requiring universal @@ -3297,7 +4301,7 @@ # This parameter affects checks for most warning classes. The # classes NOT affected are: # - Dangerous Function Cast -# - Empty {Branch, if, switch, while} Statement +# - Empty {Branch, for, if, switch, while} Statement # - Function Call Has No Effect # - Negative Character Value # - Varargs Function Cast @@ -3332,13 +4336,13 @@ # This parameter affects checks for most warning classes. The # classes NOT affected are: # - Dangerous Function Cast -# - Empty {Branch, if, switch, while} Statement +# - Empty {Branch, for, if, switch, while} Statement # - Format String # - Function Call Has No Effect # - Ignored Return Value # - Negative Character Value -# - Null Test After Dereference # - Potential Unbounded Loop +# - Null Test After Dereference # - Redundant Condition # - Unreachable Code: 5 warning classes # - Unused Value @@ -3591,6 +4595,78 @@ #TIME_LIMIT_DATA_RACE_PATH_SEARCH_PER_PROCEDURE = 100 +# Parameter TIME_LIMIT_TAINT_REFINE +# +# Purpose +# Maximum number of seconds the analysis may spend refining taint +# warnings. +# +# Tags +# - TIME_LIMIT: Analysis Time Limits +# +# Type +# integer +# +# Behavior +# Once likely taint warnings have been identified in a procedure +# (at the start of the path), a search phase takes place to +# determine which of those taint warnings are valid. This limits +# the number of seconds, per procedure, that this search may take. +# +# Notes +# This specifies elapsed time. +# +# The warning classes affected by this parameter are: +# +# - Command Injection +# - Format String Injection +# - LDAP Injection +# - Library Injection +# - SQL Injection +# - Tainted Network Address +# - Tainted Configuration Setting +# - Tainted Filename +# - Tainted Allocation Size +# - Tainted Write +# - Tainted Buffer Access +# - Multiplication Overflow of Allocation Size +# - Multiplication Overflow of Size +# - Subtraction Underflow of Allocation Size +# - Subtraction Underflow of Size +# - Addition Overflow of Allocation Size +# - Addition Overflow of Size +# - Truncation of Allocation Size +# - Truncation of Size. +# +#TIME_LIMIT_TAINT_REFINE = 60 + + +# Parameter TIME_LIMIT_TAINT_REFINE_PER_PROCEDURE +# +# Purpose +# Milliseconds the analysis may spend per procedure (amortized) on +# taint refinement. +# +# Tags +# - TIME_LIMIT: Analysis Time Limits +# +# Type +# integer +# +# Behavior +# The analysis computes a total budget for taint refinement by +# multiplying the number of procedures by the value specified here. +# The total budget will not be exceeded. +# +# Notes +# This specifies time per procedure in milliseconds. The default +# setting of 200 would allow the taint refinement phase to run for +# 55 hours on a program with a million procedures (very large +# program). +# +#TIME_LIMIT_TAINT_REFINE_PER_PROCEDURE = 200 + + # Parameter DATA_RACE_MAX_MEM_ACCESSES # # Purpose @@ -3624,7 +4700,7 @@ # - ANALYSIS_PROPERTY: Analysis Properties # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If set to "Yes", summaries for a function will be rolled back if @@ -3673,7 +4749,7 @@ # - ANALYSIS_BOUND: Analysis resource/effort limit # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - No : The analysis will consider a standard set of loop @@ -3706,50 +4782,52 @@ # - ANALYSIS_BOUND: Analysis resource/effort limit # # Type -# {0, 1, 2, 3, 4, 5} +# { 0, 1, 2, 3, 4, 5 } # # Behavior # - 0 : Never treat loop counters as adversarial -# - 1 : Treat loop counters in infinite loops as adversarial -# - 2 : Also treat loop counters in loops reading input as -# adversarial -# - 3 : Also treat loop counters in loops whose iteration counts -# can, but may not reach some constant bound as adversarial -# - 4 : Also treat loop counters in loops whose iteration counts -# can, but may not reach some symbolic bound as adversarial -# - 5 : All loop counters treated as adversarial +# - 1 : Treat as adversarial: loop counters in infinite loops. +# - 2 : Treat as adversarial: everything from 1, plus loop counters +# in loops reading input. +# - 3 : Treat as adversarial: everything from 2, plus loop counters +# in loops whose iteration counts can, but may not, reach some +# constant bound. +# - 4 : Treat as adversarial: everything from 3, plus loop counters +# in loops whose iteration counts can, but may not, reach some +# symbolic bound. +# - 5 : Treat all loop counters as adversarial. # # Notes # The following overruns can only be detected with sufficient # values of this setting. # -# Requires >=1: +# Requires LOOP_COUNTER_DISTRUST=1 or higher: # void x1(){ # int i = 0; int A[10]; # for(;;){ i++; A[i] = 10; } # } # -# Requires >=2: +# Requires LOOP_COUNTER_DISTRUST=2 or higher: # void x2(){ # int i = 0; # int A[10]; # while(getchar() != 'c'){ i++; A[i] = 10; } # } # -# Requires >=3: +# Requires LOOP_COUNTER_DISTRUST=3 or higher: # void x3(){ # int i = 0; # int A[10]; # for(i = 0; i < 20; i++ ){ if( inscrutible_condition() ) break; A[i] = 10; } # } # -# Requires >=4: +# Requires LOOP_COUNTER_DISTRUST=4 or higher: # void x4(){ # int i = 0; int A[10]; int j = inscrutible_number(); # for(i = 0; i < j; i++ ){ if( inscrutible_condition() ) break; A[i] = 10; } # } # -# Requires >=5: +# Requires LOOP_COUNTER_DISTRUST=5: # void x5(){ # int i = 0; int A[10]; # for(i = 0; inscrutible_condition(); i++ ){ A[i] = 10; } @@ -3827,7 +4905,7 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : the analysis will report every warning instance @@ -3987,10 +5065,43 @@ #MAX_GLOBAL_CHECK_AGE = 0 +# Parameter MAX_CHECKED_FUNCTION_POINTER_RESOLVENTS +# +# Purpose +# 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. +# +# Tags +# - ANALYSIS_BOUND: Analysis resource/effort limit +# +# Type +# integer +# +# Behavior +# - N (for N>-1) : If a function pointer or virtual call site +# resolves to more than N targets, interprocedural checking will +# not be performed for paths starting before the call and ending +# (transitively) inside the call. +# - -1 : No such limit is imposed. +# +# Notes +# Some targets of function pointer calls might only be viable in +# some calling contexts or under some circumstances that CodeSonar +# is unaware of. A low value (such as 1) can reduce false positives +# due to overapproximations while increasing false negatives. A +# setting of 1 can be particularly attractive because it is +# unlikely to be an overapproximation. Small settings can increase +# performance. +# +#MAX_CHECKED_FUNCTION_POINTER_RESOLVENTS = 8 + + # Parameter MAX_CHECK_COMPLEXITY # # Purpose -# Maximum complexity of an expression in an interprocedural check. +# Specifies the maximum complexity of an expression in an +# interprocedural check. # # Tags # - ANALYSIS_BOUND: Analysis resource/effort limit @@ -4119,11 +5230,16 @@ # [doc/html/GUI/GUI_Path_Checking.html] will also use exact # refinement. # +# If set to No, the analysis will not perform exact refinement. +# +# Taint+dp warnings [#taint_dp] are always excluded from exact +# refinement. +# # Tags # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Notes # The effects of exact refinement differ from those of approximate @@ -4143,7 +5259,9 @@ # It can be beneficial to enable both exact and approximate # refinement, because the sets of warnings that each can dismiss # are incomparable. In this case, the two refinement phases are -# carried out in sequence. +# carried out in sequence. Taint+dp warnings [#taint_dp] are not +# included in exact or approximate refinement, but instead have +# their own refinement stage. # # See DP_REFINEMENT_APPROXIMATE for more information about # approximate refinement. @@ -4179,7 +5297,9 @@ # the warning is handled as specified by # DP_REFINEMENT_EXACT_DISMISS_TIMEOUT. # -# To enable exact refinement, set DP_REFINEMENT_EXACT=Yes. +# To enable exact refinement, set DP_REFINEMENT_EXACT=Yes. Note +# that taint+dp warnings [#taint_dp] are always excluded from exact +# refinement. #DP_REFINEMENT_EXACT_TIMEOUT = 2 @@ -4201,10 +5321,12 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Notes -# To enable exact refinement, set DP_REFINEMENT_EXACT=Yes. +# To enable exact refinement, set DP_REFINEMENT_EXACT=Yes. Note +# that taint+dp warnings [#taint_dp] are always excluded from exact +# refinement. #DP_REFINEMENT_EXACT_DISMISS = Yes @@ -4226,13 +5348,15 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Notes # Setting this to Yes can cause true positive warnings to be # dismissed. # -# To enable exact refinement, set DP_REFINEMENT_EXACT=Yes. +# To enable exact refinement, set DP_REFINEMENT_EXACT=Yes. Note +# that taint+dp warnings [#taint_dp] are always excluded from exact +# refinement. # # The timeout for exact refinement is controlled by # DP_REFINEMENT_EXACT_TIMEOUT. @@ -4256,34 +5380,40 @@ # - The CodeSonar analysis will perform approximate refinement on # the core path # [doc/html/Elements/PROPERTIES_Warning.html#core_path] for each -# warning. Warnings determined to be unfeasible are handled as -# specified by the setting of DP_REFINEMENT_APPROXIMATE_DISMISS. -# Warnings for which the decision procedure times out are handled -# as specified by the setting of -# DP_REFINEMENT_APPROXIMATE_DISMISS_TIMEOUT. +# warning. # - On-demand extended path checking # [doc/html/GUI/GUI_Path_Checking.html] will also use approximate -# refinement. Tags WARNING_TUNING +# refinement. # -# Type -# {Yes, No} +# Taint+dp warnings [#taint_dp] are always excluded from +# approximate refinement. # -# Notes +# Tags +# - WARNING_TUNING: Fine Tuning for Warnings +# +# Type +# { Yes, No } +# +# Notes # It is possible for approximate refinement to incorrectly conclude # that a warning cannot occur, but this does not happen often in # practice. # +# For approximate refinement: +# - DP_REFINEMENT_APPROXIMATE_DISMISS specifies handling for +# warnings determined to be unfeasible, +# - DP_REFINEMENT_APPROXIMATE_TIMEOUT specifies refinement timeout, +# - DP_REFINEMENT_APPROXIMATE_DISMISS_TIMEOUT specifies handling +# when the decision procedure times out for a particular warning. +# # See DP_REFINEMENT_EXACT for information about the differences -# between exact and approximate refinement. +# between exact and approximate refinement. Taint+dp warnings +# [#taint_dp] are not included in exact or approximate refinement, +# but instead have their own refinement stage. # # It can be beneficial to enable both forms of refinement, because # the sets of warnings that each can dismiss are incomparable. In # this case, the two refinement phases are carried out in sequence. -# -# Parameters DP_REFINEMENT_APPROXIMATE_TIMEOUT, -# DP_REFINEMENT_APPROXIMATE_DISMISS, and -# DP_REFINEMENT_APPROXIMATE_DISMISS_TIMEOUT control various aspects -# of exact refinement. #DP_REFINEMENT_APPROXIMATE = Yes @@ -4292,7 +5422,7 @@ # # Purpose # Specifies the timeout for the decision procedure when performing -# approximate refinement. +# approximate refinement on warnings. # # Behavior # - 0 : There is no timeout for approximate refinement. @@ -4311,7 +5441,9 @@ # DP_REFINEMENT_APPROXIMATE_DISMISS_TIMEOUT. # # To enable approximate refinement, set -# DP_REFINEMENT_APPROXIMATE=Yes. +# DP_REFINEMENT_APPROXIMATE=Yes. Note that taint+dp warnings +# [#taint_dp] are always excluded from approximate refinement. + #DP_REFINEMENT_APPROXIMATE_TIMEOUT = 2 @@ -4332,11 +5464,12 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Notes # To enable approximate refinement, set -# DP_REFINEMENT_APPROXIMATE=Yes. +# DP_REFINEMENT_APPROXIMATE=Yes. Note that taint+dp warnings +# [#taint_dp] are always excluded from approximate refinement. #DP_REFINEMENT_APPROXIMATE_DISMISS = Yes @@ -4357,19 +5490,178 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Notes # Setting this to Yes can cause true positive warnings to be -# dismissed. +# dismissed. Note that taint+dp warnings [#taint_dp] are always +# excluded from approximate refinement. # -# - To enable exact refinement, set DP_REFINEMENT_APPROXIMATE=Yes. -# - The timeout for exact refinement is controlled by +# - To enable approximate refinement, set +# DP_REFINEMENT_APPROXIMATE=Yes. +# - The timeout for approximate refinement is controlled by # DP_REFINEMENT_APPROXIMATE_TIMEOUT. #DP_REFINEMENT_APPROXIMATE_DISMISS_TIMEOUT = No +# Parameter TAINT_PLUS_DP_REFINEMENT_TIMEOUT +# +# Purpose +# Specifies the timeout for the decision procedure when performing +# refinement for "taint+dp" [#taint_dp] warnings. +# +# Behavior +# - 0 : There is no timeout for refinement. +# - N (for N>0) : The decision procedure will spend N seconds on +# each path before giving up. +# +# Tags +# - TIME_LIMIT: Analysis Time Limits +# +# - WC_LANG.MEM.TBA: Used by Tainted Buffer Access +# - WC_ALLOC.SIZE.MULOFLOW: Used by Multiplication Overflow of +# Allocation Size +# - WC_MISC.MEM.SIZE.MULOFLOW: Used by Multiplication Overflow of +# Size +# - WC_ALLOC.SIZE.SUBUFLOW: Used by Subtraction Underflow of +# Allocation Size +# - WC_MISC.MEM.SIZE.SUBUFLOW: Used by Subtraction Underflow of +# Size +# - WC_ALLOC.SIZE.ADDOFLOW: Used by Addition Overflow of Allocation +# Size +# - WC_MISC.MEM.SIZE.ADDOFLOW: Used by Addition Overflow of Size +# - WC_ALLOC.SIZE.TRUNC: Used by Truncation of Allocation Size +# - WC_MISC.MEM.SIZE.TRUNC: Used by Truncation of Size +# +# Type +# non-negative integer +# +# Notes +# [#taint_dp] "Taint+dp" warnings are those of the following +# classes. +# +# - Tainted Buffer Access +# - Multiplication Overflow of Allocation Size +# - Multiplication Overflow of Size +# - Subtraction Underflow of Allocation Size +# - Subtraction Underflow of Size +# - Addition Overflow of Allocation Size +# - Addition Overflow of Size +# - Truncation of Allocation Size +# - Truncation of Size. +# +# Taint+dp warnings are not included in exact or approximate +# refinement (as governed by DP_REFINEMENT_EXACT, +# DP_REFINEMENT_EXACT, and related parameters). Instead, they +# undergo a dedicated refinement phase in which the analysis runs +# the decision procedure on each warning path, handling procedures +# and loops by converting their summaries into SMT formulas. +# +# The taint+dp refinement phase cannot be disabled. Its timeouts +# and handling are specified by the following parameters. +# - TAINT_PLUS_DP_REFINEMENT_DISMISS specifies handling for +# warnings determined to be unfeasible, +# - TAINT_PLUS_DP_REFINEMENT_TIMEOUT specifies refinement timeout, +# - TAINT_PLUS_DP_REFINEMENT_DISMISS_TIMEOUT specifies handling +# when the decision procedure times out for a particular warning. + +#TAINT_PLUS_DP_REFINEMENT_TIMEOUT = 4 + + +# Parameter TAINT_PLUS_DP_REFINEMENT_DISMISS +# +# Purpose +# Specifies whether or not "taint+dp" [#taint_dp] warnings will be +# dismissed outright if refinement determines that they cannot +# occur. +# +# Type +# { Yes, No } +# +# Behavior +# - Yes : warnings will be dismissed outright if decision procedure +# refinement determines that they cannot occur. +# - No : warnings will not be dismissed in this situation, but they +# will incur a significant rank penalty. +# +# Tags +# - WARNING_TUNING: Fine Tuning for Warnings +# +# - WC_LANG.MEM.TBA: Used by Tainted Buffer Access +# - WC_ALLOC.SIZE.MULOFLOW: Used by Multiplication Overflow of +# Allocation Size +# - WC_MISC.MEM.SIZE.MULOFLOW: Used by Multiplication Overflow of +# Size +# - WC_ALLOC.SIZE.SUBUFLOW: Used by Subtraction Underflow of +# Allocation Size +# - WC_MISC.MEM.SIZE.SUBUFLOW: Used by Subtraction Underflow of +# Size +# - WC_ALLOC.SIZE.ADDOFLOW: Used by Addition Overflow of Allocation +# Size +# - WC_MISC.MEM.SIZE.ADDOFLOW: Used by Addition Overflow of Size +# - WC_ALLOC.SIZE.TRUNC: Used by Truncation of Allocation Size +# - WC_MISC.MEM.SIZE.TRUNC: Used by Truncation of Size +# +# Notes +# Handling for unfeasible non-taint+dp warnings is controlled by +# parameters DP_REFINEMENT_APPROXIMATE_DISMISS (approximate +# refinement) and DP_REFINEMENT_EXACT_DISMISS (exact refinement) + + +#TAINT_PLUS_DP_REFINEMENT_DISMISS = Yes + + +# Parameter TAINT_PLUS_DP_REFINEMENT_DISMISS_TIMEOUT +# +# Purpose +# Specifies whether or not "taint+dp" [#taint_dp] warnings will be +# dismissed if the decision procedure times out during refinement +# of a taint/decision procedure warning. +# +# Behavior +# - Yes : warnings will be dismissed outright if the decision +# procedure times out during refinement. +# - No : warnings will not be dismissed in this situation, but they +# will incur a significant rank penalty. +# +# Tags +# - WARNING_TUNING: Fine Tuning for Warnings +# +# - WC_LANG.MEM.TBA: Used by Tainted Buffer Access +# - WC_ALLOC.SIZE.MULOFLOW: Used by Multiplication Overflow of +# Allocation Size +# - WC_MISC.MEM.SIZE.MULOFLOW: Used by Multiplication Overflow of +# Size +# - WC_ALLOC.SIZE.SUBUFLOW: Used by Subtraction Underflow of +# Allocation Size +# - WC_MISC.MEM.SIZE.SUBUFLOW: Used by Subtraction Underflow of +# Size +# - WC_ALLOC.SIZE.ADDOFLOW: Used by Addition Overflow of Allocation +# Size +# - WC_MISC.MEM.SIZE.ADDOFLOW: Used by Addition Overflow of Size +# - WC_ALLOC.SIZE.TRUNC: Used by Truncation of Allocation Size +# - WC_MISC.MEM.SIZE.TRUNC: Used by Truncation of Size +# +# Type +# { Yes, No } +# +# Notes +# Setting this to No can cause more false positive warnings to be +# reported. +# +# The timeout for refining taint+dp warnings is controlled by +# TAINT_PLUS_DP_REFINEMENT_TIMEOUT. +# +# Handling for non-taint+dp warnings for which the decision +# procedure times out is controlled by parameters +# DP_REFINEMENT_APPROXIMATE_DISMISS_TIMEOUT (approximate +# refinement) and DP_REFINEMENT_EXACT_DISMISS_TIMEOUT (exact +# refinement) + +#TAINT_PLUS_DP_REFINEMENT_DISMISS_TIMEOUT = Yes + + # Parameter RETURN_CHECKER_SAMPLE_SIZE # # Purpose @@ -4378,7 +5670,7 @@ # about an Ignored Return Value for that function. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_LANG.FUNCS.IRV: Used by Ignored Return Value # # Type @@ -4387,7 +5679,7 @@ # Behavior # A smaller value will cause more warnings based on statistical # decisions. Negative values are prohibited. -# + #RETURN_CHECKER_SAMPLE_SIZE = 20 @@ -4399,7 +5691,7 @@ # sites, no Ignored Return Value warnings will be produced. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_LANG.FUNCS.IRV: Used by Ignored Return Value # # Type @@ -4408,7 +5700,7 @@ # Behavior # Making this number larger will cause more warnings. A value of 0 # will effectively disable statistical warnings. -# + #RETURN_CHECKER_RATIO = 0.04 @@ -4633,7 +5925,7 @@ # problems. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_MISC.FMT: Used by Format String # # Type @@ -4656,7 +5948,7 @@ # String warnings will be produced for the function/position pair. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_MISC.FMT: Used by Format String # # Type @@ -4783,13 +6075,14 @@ # - WC_CONCURRENCY.DATARACE: Used by Data Race # # Type -# {Yes, No} +# { Yes, No } # # Behavior -# If set to Yes, CodeSonar will report Data Race warnings in which -# both threads start at the same entry procedure/method. Normally, -# only warnings between threads that start at different points are -# reported. +# - Yes : CodeSonar will report Data Race warnings in which both +# threads start at the same entry procedure/method, as well as +# warnings in which the threads start at different points. +# - No : CodeSonar will only report Data Race warnings in which the +# threads start at different points. # # Notes # Setting this to Yes can result in a large number of false @@ -4855,11 +6148,15 @@ # thread entry discovery mechanisms cannot prove that. # # Notes -# # Example rules: # FORCE_THREAD_ENTRY_NAMES += ^f1$ # FORCE_THREAD_ENTRY_NAMES += ^handler$ # +# Specifying a thread entry point with FORCE_THREAD_ENTRY_NAMES is +# not sufficient to ensure that CodeSonar will carry out Data Race +# checking. See Data Race : Note +# [doc/html/WarningClasses/CONCURRENCY/CONCURRENCY.DATARACE.html#note] +# for details. # Parameter THREAD_ENTRY_METHOD_NAMES @@ -4905,6 +6202,13 @@ # # Example rule: # THREAD_ENTRY_METHOD_NAMES += ^Main$ +# +# Specifying a thread entry point with THREAD_ENTRY_METHOD_NAMES is +# not sufficient to ensure that CodeSonar will carry out Data Race +# checking. See Data Race : Note +# [doc/html/WarningClasses/CONCURRENCY/CONCURRENCY.DATARACE.html#note] +# for details. + #THREAD_ENTRY_METHOD_NAMES += ^run$ @@ -5157,7 +6461,7 @@ # - HUB_BEHAVIOR: Hub and Web GUI # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - No: if a path includes any part of a procedure, the warning @@ -5173,7 +6477,7 @@ # allowable length of a function. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_LANG.FUNCS.TOOLONG: Used by Function Too Long # # Type @@ -5198,7 +6502,7 @@ # can have to comply with the Too Many Parameters check. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_LANG.FUNCS.TMFP: Used by Too Many Parameters # # Type @@ -5222,7 +6526,7 @@ # number of assertions each function must contain. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_LANG.FUNCS.ASSERTS: Used by Not Enough Assertions # # Type @@ -5251,7 +6555,7 @@ # non-negative integer # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_LANG.FUNCS.ASSERTS: Used by Not Enough Assertions # # Behavior @@ -5273,7 +6577,7 @@ # number of dereferencing levels permitted on a single item. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_LANG.STRUCT.TMD: Used by Too Many Dereferences # # Type @@ -5303,7 +6607,7 @@ # Declaration check. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_LANG.STRUCT.TMID: Used by Too Much Indirection in # Declaration # @@ -5334,12 +6638,12 @@ # local static but are declared with file or global scope. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_LANG.STRUCT.SCOPE.LOCAL: Used by Scope Could Be Local Static # - WC_LANG.STRUCT.SCOPE.FILE: Used by Scope Could Be File Static # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : variables that are global or file static but could be @@ -5495,6 +6799,66 @@ #DATA_RACE_PATH_FINDING_EFFORT = 10000 +# Parameter DATA_RACE_MAX_RELATED_PATHS +# +# Purpose +# Controls how many related Data Race warnings get reported. Can +# greatly influence runtime. +# +# Tags +# - WARNING_TUNING: Fine Tuning for Warnings +# - WC_CONCURRENCY.DATARACE: Used by Data Race +# +# Type +# non-negative integer +# +# Behavior +# Given DATA_RACE_MAX_RELATED_PATHS=N: +# - The CodeSonar will consider N paths to accesses of a particular +# memory location for each thread entry point. +# - Because a Data Race warning involves two threads, the result is +# that up to N^2 warnings can be reported per (memory_location, +# thread_entry_A, access_mode_A, thread_entry_B, access_mode_B) +# tuple. +# +# Where +# - A memory location might be a global variable. +# - The functions treated as thread entry points include program +# entry functions main() and WinMain(), library functions that +# are modeled as thread entry points or signal handler entry +# points, functions specified with FORCE_THREAD_ENTRY_NAMES, and +# object-oriented API methods specified with +# THREAD_ENTRY_METHOD_NAMES. For more details, see Concurrency +# Models: Thread Entry Points +# [doc/html/C_Module/LibraryModels/ConcurrencyModelsEntryPoints.html]. +# - Access mode is either read or write. +# +# A setting of 0 (zero) will be treated the same as a setting of 1 +# (one). +# +# Notes +# The related warnings that are reported will differ only by call +# stack. Call stacks that contain the same functions but different +# return addresses are considered different. +# +# The related warnings are often, but not always, in the same +# warning group +# [doc/html/Elements/PROPERTIES_Warning.html#group_def]. To see +# multiple instances of the same warning group in the CodeSonar Web +# GUI, set Visible Warnings +# [doc/html/GUI/GUI.html#visible_elements] to "all". +# +# The analysis may become quite time-intensive for values other +# than 1. +# +# You may need to adjust DATA_RACE_PATH_FINDING_EFFORT, +# TIME_LIMIT_DATA_RACE_PATH_SEARCH, and +# TIME_LIMIT_DATA_RACE_PATH_SEARCH_PER_PROCEDURE to fully realize +# the additional warnings. +# +#DATA_RACE_MAX_RELATED_PATHS = 1 + + # Parameter STACK_DEPTH_THRESHOLD # # Purpose @@ -5502,7 +6866,7 @@ # allowable depth of the call stack, in bytes. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_LANG.STRUCT.CALLSTACK: Used by Excessive Stack Depth # # Type @@ -5656,30 +7020,38 @@ # # Tags # - LANGUAGE_TREATMENT: Treatment of Language Constructs -# - WC_LANG.STRUCT.SIDEEFFECT: Used by Condition Contains Side -# Effects +# - WC_LANG.STRUCT.SE.COND: Used by Condition Contains Side Effects # # Type -# {Yes, No} -# +# { Yes, No } + #UNDEFINED_FUNCTIONS_HAVE_SIDE_EFFECTS = Yes # Parameter EMIT_PROCEDURE_SIDE_EFFECTS # # Purpose -# Specifies whether or not CodeSonar will output an xml file +# Specifies whether or not CodeSonar will output an XML file # showing the variables modified by each procedure. # # Tags # - BUILD_OUTPUT: Additional Outputs from the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } +# +# Behavior +# - Yes : the analysis will output an XML file showing the +# variables modified by each procedure. For an analysis whose +# analysis directory +# [doc/html/Elements/PROPERTIES_analysis.html#analysis_dir] is +# //.prj_files, the XML file path will be +# //.side_effects.xml. +# - No : this XML file will not be output. # # Notes # Modifications are stated in terms of inputs to the procedure. -# + #EMIT_PROCEDURE_SIDE_EFFECTS = No @@ -5690,11 +7062,11 @@ # warnings for values that arise from constant assignments. # # Tags -# - WC_LANG.STRUCT.UVAL: Used by Unused Value +# - WC_LANG.STRUCT.UUVAL: Used by Unused Value # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If "Yes", CodeSonar will issue Unused Value warnings in cases @@ -5717,7 +7089,7 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If "Yes", CodeSonar will issue Redundant Condition warnings in @@ -5737,7 +7109,9 @@ # Tells CodeSonar that function A works like function B. # # Type -# String of the form "A -> B" where A and B are function names. +# String of the form +# A -> B +# where A and B are function names. # # Behavior # The value "A -> B" indicates that CodeSonar should treat calls to @@ -5745,12 +7119,16 @@ # a stub using csonar_replace_A that calls B, but may be more # convenient. # -# If A -> B and B -> C then A ->C +# If A -> B and B -> C then A -> C # -# The behavior is undefined if +# The behavior is undefined if: # - the types of A and B are not binary-compatible (for example, # because they have different numbers of parameters), or -# - there are cycles in the function map. +# - there are cycles in the function map, or +# - multiple FUNCTION_MAP rules with the same LHS function are +# specified, or +# - for some function A, csonar_replace_A exists in the project and +# a FUNCTION_MAP rule mapping A -> B is specified for some B. # # Notes # The most common use cases are: @@ -5763,17 +7141,19 @@ # This feature cannot be used with C++ identifiers containing # spaces. # -# Examples: -# -# To specify that fatal causes the program to abort: +# Behavior is undefined if csonar_replace_A is defined and +# FUNCTION_MAP += A -> B +# is specified, for any functions \tt A and \tt B. +# +# Example 1: specify that \tt fatal causes the program to abort. # FUNCTION_MAP += fatal -> abort # -# To specify that pmalloc behaves like malloc: +# Example 2: specify that pmalloc behaves like malloc: # FUNCTION_MAP += pmalloc -> malloc # -# To specify that pfree behaves like free: +# Example 3: specify that pfree behaves like free: # FUNCTION_MAP += pfree -> free -# + #FUNCTION_MAP += @@ -5787,13 +7167,13 @@ # - LANGUAGE_TREATMENT: Treatment of Language Constructs # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : CodeSonar will ignore all C++ compilation units: C++ code # will not be checked. # - No : CodeSonar will check both C and C++ compilation units. -# + #IGNORE_CPP_CODE = No @@ -5818,7 +7198,7 @@ # Notes # This parameter has no effect on whether or not a compilation is # included in the analysis. -# + #ERROR_SUBMISSION_LIMIT_PER_COMPILATION = 30 @@ -5869,7 +7249,7 @@ # while( timer != 1000 ) # ; # j = 42; -# + #VOLATILE_TREATMENT = UNKNOWABLE @@ -5883,7 +7263,7 @@ # - LANGUAGE_TREATMENT: Treatment of Language Constructs # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : any attempt to convert a floating point to an integer @@ -5900,7 +7280,7 @@ # A[d] = 0; # d = 5.0; # A[d] = 0; -# + #FLOAT_IS_ADVERSARIAL = No @@ -5911,7 +7291,7 @@ # values as integral typed values. # # Type -# {Yes, No} +# { Yes, No } # # Behavior # The analysis normally ignores floating point values in order to @@ -5922,7 +7302,7 @@ # Notes # The "No" setting is recommended. Using this and # FLOAT_IS_ADVERSARIAL at the same time is probably not useful. -# + #PRETEND_FLOAT_IS_INT = No @@ -5936,7 +7316,7 @@ # - LANGUAGE_TREATMENT: Treatment of Language Constructs # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : assume these variables never change @@ -6023,7 +7403,7 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If set to "Yes", Pointer Past End of Object warnings will be @@ -6054,7 +7434,7 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If set to "Yes", Uninitialized Variable warnings will be issued @@ -6145,6 +7525,9 @@ # METRIC_FILTER += discard metric="Modules" # METRIC_FILTER += discard metric="TopLF" # METRIC_FILTER += discard metric="InclF" +# METRIC_FILTER += discard metric="TaintSource" +# METRIC_FILTER += discard metric="TaintProp" +# METRIC_FILTER += discard metric="TaintSink" # # The following metrics are disabled by default. To enable a # particular metric class, use the corresponding "allow" rule. @@ -6195,7 +7578,7 @@ # - only contain characters matching: [a-zA-Z][0-9] _- # # is the granularity of the new metric, and is one of -# {ANALYSIS, COMPUNIT, FILE, PROCEDURE} +# {ANALYSIS, COMPUNIT, DIRECTORY, FILE, PROCEDURE} # # is an expression containing mathematical operators, # functions, constant (floating point) values, and references to @@ -6209,7 +7592,7 @@ # tanh | exp | ldexp | log | log10 | pow | sqrt | # ceil | fabs | floor | fmod | sum | prod | avg | min | max # metric -> "[a-zA-Z0-9]+\[granularity\]" -# granularity -> PROJECT | COMPUNIT | FILE | PROCEDURE +# granularity -> ANALYSIS | COMPUNIT | FILE | PROCEDURE # # - All metric values must match an existing metric; metric tags # are case-sensitive. @@ -6229,11 +7612,12 @@ # | COMPUNIT | sum(PROCEDURE) | Sums over all procedures in | # | | | the compilation unit. | # | | | | -# | PROJECT | sum(PROCEDURE) | Sums over all procedures in | -# | | | the project. | +# | ANALYSIS | sum(PROCEDURE) | Sums over all procedures in | +# | | | the analyzed project. | # | | | | # | COMPUNIT | sum(FILE) | Sums over all files in the | # | | | compilation unit. | +# | | | | # | ... etc | # +-----------------------------------------------------------------------+ # @@ -6265,7 +7649,7 @@ # The following are some examples defining file-granularity # versions of the Halstead and McCabe metrics. # METRIC_DERIVED_DEF += "vG", "Cyclomatic Complexity", FILE, sum("vG[PROCEDURE]") -# METRIC_DERIVED_DEF += "ivG", "Design Complexity", FILE, sum("ivG[PROCEDURE]") +# METRIC_DERIVED_DEF += "ivG", "Module Design Complexity", FILE, sum("ivG[PROCEDURE]") # METRIC_DERIVED_DEF += "evG", "Essential Complexity", FILE, sum("evG[PROCEDURE]") # METRIC_DERIVED_DEF += "n1", "Distinct Operators", FILE, sum("n1[PROCEDURE]") # METRIC_DERIVED_DEF += "N1", "Total Operators", FILE, sum("N1[PROCEDURE]") @@ -6282,9 +7666,53 @@ # The following are more examples, this time slight variations on # the basic McCabe metrics. # METRIC_DERIVED_DEF += "vG-code", "Cyclomatic Density", PROCEDURE, "vG[PROCEDURE]" / "LCode[PROCEDURE]" -# METRIC_DERIVED_DEF += "ivG-vG", "Design Density", PROCEDURE, "ivG[PROCEDURE]" / "vG[PROCEDURE]" +# METRIC_DERIVED_DEF += "ivG-vG", "Module Design Density", PROCEDURE, "ivG[PROCEDURE]" / "vG[PROCEDURE]" # METRIC_DERIVED_DEF += "evG-vG", "Essential Density", PROCEDURE, ("evG[PROCEDURE]" - 1) / "vG[PROCEDURE]" # +## The following define the default derived metrics. +#METRIC_DERIVED_DEF += "LCodeOnly", "Code Lines", DIRECTORY, sum("LCodeOnly[FILE]") + sum("LCodeOnly[DIRECTORY]") +#METRIC_DERIVED_DEF += "LMCC", "Mixed Lines", DIRECTORY, sum("LMCC[FILE]") + sum("LMCC[DIRECTORY]") +#METRIC_DERIVED_DEF += "LComOnly", "Comment Lines", DIRECTORY, sum("LComOnly[FILE]") + sum("LComOnly[DIRECTORY]") +#METRIC_DERIVED_DEF += "LB", "Blank Lines", DIRECTORY, sum("LB[FILE]") + sum("LB[DIRECTORY]") +#METRIC_DERIVED_DEF += "TL", "Total Lines", DIRECTORY, sum("TL[FILE]") + sum("TL[DIRECTORY]") +#METRIC_DERIVED_DEF += "LCode", "Lines with Code", DIRECTORY, sum("LCode[FILE]") + sum("LCode[DIRECTORY]") +#METRIC_DERIVED_DEF += "LCom", "Lines with Comments", DIRECTORY, sum("LCom[FILE]") + sum("LCom[DIRECTORY]") +#METRIC_DERIVED_DEF += "vG", "Cyclomatic Complexity", FILE, sum("vG[PROCEDURE]") +#METRIC_DERIVED_DEF += "mvG", "Modified Cyclomatic Complexity", FILE, sum("mvG[PROCEDURE]") +#METRIC_DERIVED_DEF += "ivG", "Module Design Complexity", FILE, sum("ivG[PROCEDURE]") +#METRIC_DERIVED_DEF += "evG", "Essential Complexity", FILE, sum("evG[PROCEDURE]") +#METRIC_DERIVED_DEF += "vG", "Cyclomatic Complexity", DIRECTORY, sum("vG[FILE]") + sum("vG[DIRECTORY]") +#METRIC_DERIVED_DEF += "mvG", "Modified Cyclomatic Complexity", DIRECTORY, sum("mvG[FILE]") + sum("mvG[DIRECTORY]") +#METRIC_DERIVED_DEF += "ivG", "Module Design Complexity", DIRECTORY, sum("ivG[FILE]") + sum("ivG[DIRECTORY]") +#METRIC_DERIVED_DEF += "evG", "Essential Complexity", DIRECTORY, sum("evG[FILE]") + sum("evG[DIRECTORY]") +#METRIC_DERIVED_DEF += "n1", "Distinct Operators", FILE, sum("n1[PROCEDURE]") +#METRIC_DERIVED_DEF += "N1", "Total Operators", FILE, sum("N1[PROCEDURE]") +#METRIC_DERIVED_DEF += "n2", "Distinct Operands", FILE, sum("n2[PROCEDURE]") +#METRIC_DERIVED_DEF += "N2", "Total Operands", FILE, sum("N2[PROCEDURE]") +#METRIC_DERIVED_DEF += "N", "Halstead Program Length", FILE, sum("N[PROCEDURE]") +#METRIC_DERIVED_DEF += "L", "Halstead Program Level", FILE, sum("L[PROCEDURE]") +#METRIC_DERIVED_DEF += "V", "Halstead Program Volume", FILE, sum("V[PROCEDURE]") +#METRIC_DERIVED_DEF += "D", "Halstead Program Difficulty", FILE, sum("D[PROCEDURE]") +#METRIC_DERIVED_DEF += "E", "Halstead Programming Effort", FILE, sum("E[PROCEDURE]") +#METRIC_DERIVED_DEF += "I", "Halstead Intelligent Content", FILE, sum("I[PROCEDURE]") +#METRIC_DERIVED_DEF += "T", "Halstead Programming Time", FILE, sum("T[PROCEDURE]") +#METRIC_DERIVED_DEF += "n1", "Distinct Operators", DIRECTORY, sum("n1[FILE]") + sum("n1[DIRECTORY]") +#METRIC_DERIVED_DEF += "N1", "Total Operators", DIRECTORY, sum("N1[FILE]") + sum("N1[DIRECTORY]") +#METRIC_DERIVED_DEF += "n2", "Distinct Operands", DIRECTORY, sum("n2[FILE]") + sum("n2[DIRECTORY]") +#METRIC_DERIVED_DEF += "N2", "Total Operands", DIRECTORY, sum("N2[FILE]") + sum("N2[DIRECTORY]") +#METRIC_DERIVED_DEF += "N", "Halstead Program Length", DIRECTORY, sum("N[FILE]") + sum("N[DIRECTORY]") +#METRIC_DERIVED_DEF += "L", "Halstead Program Level", DIRECTORY, sum("L[FILE]") + sum("L[DIRECTORY]") +#METRIC_DERIVED_DEF += "V", "Halstead Program Volume", DIRECTORY, sum("V[FILE]") + sum("V[DIRECTORY]") +#METRIC_DERIVED_DEF += "D", "Halstead Program Difficulty", DIRECTORY, sum("D[FILE]") + sum("D[DIRECTORY]") +#METRIC_DERIVED_DEF += "E", "Halstead Programming Effort", DIRECTORY, sum("E[FILE]") + sum("E[DIRECTORY]") +#METRIC_DERIVED_DEF += "I", "Halstead Intelligent Content", DIRECTORY, sum("I[FILE]") + sum("I[DIRECTORY]") +#METRIC_DERIVED_DEF += "T", "Halstead Programming Time", DIRECTORY, sum("T[FILE]") + sum("T[DIRECTORY]") +#METRIC_DERIVED_DEF += "TaintSource", "Taint Source Total", FILE, sum("TaintSource[PROCEDURE]") +#METRIC_DERIVED_DEF += "TaintProp", "Taint Propagator Total", FILE, sum("TaintProp[PROCEDURE]") +#METRIC_DERIVED_DEF += "TaintSink", "Taint Sink Total", FILE, sum("TaintSink[PROCEDURE]") +#METRIC_DERIVED_DEF += "TaintSource", "Taint Source Total", DIRECTORY, sum("TaintSource[FILE]") + sum("TaintSource[DIRECTORY]") +#METRIC_DERIVED_DEF += "TaintProp", "Taint Propagator Total", DIRECTORY, sum("TaintProp[FILE]") + sum("TaintProp[DIRECTORY]") +#METRIC_DERIVED_DEF += "TaintSink", "Taint Sink Total", DIRECTORY, sum("TaintSink[FILE]") + sum("TaintSink[DIRECTORY]") # Parameter METHOD_INVOCATION_DEREFERENCE_BEHAVIOR @@ -6334,6 +7762,7 @@ # Parameter METRIC_WARNING_CATEGORIES # Parameter METRIC_WARNING_BASE_RANK # Parameter METRIC_WARNING_RANK +# Parameter METRIC_WARNING_SIGNIFICANCE # # Purpose # Specifies a warning condition for a metric; if that condition is @@ -6341,7 +7770,6 @@ # # Tags # - METRIC: metric-related -# - WC_METRIC.CUSTOM: Used by Custom Metric-Based Warning Classes # # Type # - METRIC_WARNING_CONDITION: metric number where the metric @@ -6350,6 +7778,8 @@ # - METRIC_WARNING_CLASS_NAME: string # - METRIC_WARNING_CATEGORIES: string # - METRIC_WARNING_BASE_RANK: number +# - METRIC_WARNING_SIGNIFICANCE: { UNSPECIFIED, SECURITY, +# RELIABILITY, REDUNDANCY, STYLE, DIAGNOSTIC } # # Behavior # These parameters are used together to specify conditions on @@ -6363,22 +7793,24 @@ # metrics can be used. # - METRIC_WARNING_CLASS_NAME is the warning class name. # - METRIC_WARNING_CATEGORIES is the set of categories for the -# warning, as a semicolon-separated list. This defaults to -# "METRIC.CUSTOM". +# warning, as a semicolon-separated list. # - METRIC_WARNING_BASE_RANK is the base rank # [doc/html/Elements/PROPERTIES_Warning.html#representative_def] # assigned to the warning, with default 25.0. +# - METRIC_WARNING_SIGNIFICANCE is a string representing the +# Significance [doc/html/WarningClasses/Significance.html] +# classification for this warning class. # # Notes # Parameter METRIC_WARNING_RANK is deprecated in favor of # METRIC_WARNING_BASE_RANK; the two currently have identical # behavior. # -# The METRIC_WARNING_CATEGORIES and METRIC_WARNING_BASE_RANK -# settings are optional, but both METRIC_WARNING_CONDITION and -# METRIC_WARNING_CLASS_NAME must be fully specified. The -# METRIC_WARNING_CONDITION message must come first, and the -# METRIC_WARNING_CLASS_NAME second. +# The METRIC_WARNING_CATEGORIES, METRIC_WARNING_BASE_RANK, and +# METRIC_WARNING_SIGNIFICANCE settings are optional, but +# METRIC_WARNING_CONDITION and METRIC_WARNING_CLASS_NAME must be +# fully specified. The METRIC_WARNING_CONDITION message must come +# first, and the METRIC_WARNING_CLASS_NAME second. # # If two or more sets of METRIC_WARNING_* rules have the same # METRIC_WARNING_CLASS_NAME value, the same warning class will be @@ -6404,6 +7836,7 @@ # METRIC_WARNING_CLASS_NAME = High Cyclomatic Complexity # METRIC_WARNING_CATEGORIES = METRIC.VG # METRIC_WARNING_BASE_RANK = 5.0 +# METRIC_WARNING_SIGNIFICANCE = STYLE # # Instruct CodeSonar to issue a warning of class "Large procedure" # for any function containing more than 100 lines with code: @@ -6411,6 +7844,7 @@ # METRIC_WARNING_CLASS_NAME = Large procedure # METRIC_WARNING_CATEGORIES = METRIC.LCODE # METRIC_WARNING_BASE_RANK = 1.0 +# METRIC_WARNING_SIGNIFICANCE = STYLE # # Instruct CodeSonar to issue a warning of class "Too few comments" # for any insufficiently commented function (defined here as a @@ -6419,6 +7853,7 @@ # METRIC_WARNING_CLASS_NAME = Too few comments # METRIC_WARNING_CATEGORIES = METRIC.LCOM # METRIC_WARNING_BASE_RANK = 2.0 +# METRIC_WARNING_SIGNIFICANCE = STYLE # # Note that the categories in these examples are arbitrary text. # @@ -6434,7 +7869,7 @@ # - HUB_BEHAVIOR: Hub and Web GUI # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : the Scheme Console will be available and functional for @@ -6470,7 +7905,7 @@ # - HUB_BEHAVIOR: Hub and Web GUI # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If set to "Yes", the hub will only display one procedure in cases @@ -6510,7 +7945,7 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If set to "Yes", leaks will be reported on paths that iterate @@ -6537,7 +7972,7 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If set to "No", leaks will be reported significantly more @@ -6558,7 +7993,7 @@ # - ANALYSIS_PROPERTY: Analysis Properties # # Type -# {Yes, No} +# { Yes, No } # # Behavior # If set to "Yes", undefined functions will be marked with events @@ -6616,7 +8051,7 @@ # should not be issued. # # Tags -# - WC_LANG.STRUCT.ULOOP: Used by Potential Unbounded Loop +# - WC_LANG.STRUCT.LOOP.UB: Used by Potential Unbounded Loop # # Type # Boost regular expression @@ -6838,6 +8273,8 @@ #SYSTEM_INCLUDE_PATHS += /opt/sfw/lib/ #SYSTEM_INCLUDE_PATHS += /cygwin/lib/ #SYSTEM_INCLUDE_PATHS += /cygwin/local/lib/ +#SYSTEM_INCLUDE_PATHS += /cygwin64/lib/ +#SYSTEM_INCLUDE_PATHS += /cygwin64/local/lib/ #SYSTEM_INCLUDE_PATHS += :\Program Files\Microsoft #SYSTEM_INCLUDE_PATHS += :\Program Files\Windows #SYSTEM_INCLUDE_PATHS += :\Program Files\Freescale @@ -6857,6 +8294,9 @@ #SYSTEM_INCLUDE_PATHS += :\cygwin\usr\include\ #SYSTEM_INCLUDE_PATHS += :\cygwin\lib\ #SYSTEM_INCLUDE_PATHS += :\cygwin\local\lib\ +#SYSTEM_INCLUDE_PATHS += :\cygwin64\usr\include\ +#SYSTEM_INCLUDE_PATHS += :\cygwin64\lib\ +#SYSTEM_INCLUDE_PATHS += :\cygwin64\local\lib\ #SYSTEM_INCLUDE_PATHS += \csurf\include\ #SYSTEM_INCLUDE_PATHS += \csurf\csinclude\ #SYSTEM_INCLUDE_PATHS += \codesonar\smel\ @@ -6871,14 +8311,18 @@ #SYSTEM_INCLUDE_PATHS += :\Program Files (x86)\Borland #SYSTEM_INCLUDE_PATHS += :\Program Files (x86)\CodeGear #SYSTEM_INCLUDE_PATHS += :\Program Files (x86)\Hi-Tech -#SYSTEM_INCLUDE_PATHS += /Developer/Headers/ -#SYSTEM_INCLUDE_PATHS += /Developer/SDKs/ -#SYSTEM_INCLUDE_PATHS += /Library/Frameworks/ -#SYSTEM_INCLUDE_PATHS += /System/Library/ -#SYSTEM_INCLUDE_PATHS += /opt/local/include/ -#SYSTEM_INCLUDE_PATHS += /sw/include/ +#SYSTEM_INCLUDE_PATHS += /Developer/Headers/ +#SYSTEM_INCLUDE_PATHS += /Developer/SDKs/ +#SYSTEM_INCLUDE_PATHS += /Library/Frameworks/ +#SYSTEM_INCLUDE_PATHS += /System/Library/ +#SYSTEM_INCLUDE_PATHS += /opt/local/include/ +#SYSTEM_INCLUDE_PATHS += /sw/include/ #SYSTEM_INCLUDE_PATHS += /usr/llvm-gcc- #SYSTEM_INCLUDE_PATHS += codesonar_classfile_summaries +#SYSTEM_INCLUDE_PATHS += /qnx660/target/ +#SYSTEM_INCLUDE_PATHS += /qnx660/host/ +#SYSTEM_INCLUDE_PATHS += /qnx650/target/ +#SYSTEM_INCLUDE_PATHS += /qnx650/host/ # Parameter VISUALIZATION @@ -6887,7 +8331,7 @@ # Specifies whether to generate a call graph for visualization. # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : the CodeSonar analysis generates additional data in @@ -6931,7 +8375,7 @@ # targets, structure fields, and so on). # # Type -# {Yes, No} +# { Yes, No } # # Tags # - LANGUAGE_TREATMENT: Treatment of Language Constructs @@ -7035,7 +8479,8 @@ # # Purpose # Specifies the procedures from which reachability information is -# computed for interpreting WARNING_FILTER reachable rules. +# computed for interpreting WARNING_FILTER reachable rules and the +# SKIP_ANALYSIS_OF UNREACHABLE_FUNCTIONS setting. # # Type # Procedure, as a string of the form "file:procedure" or @@ -7047,40 +8492,45 @@ # suffix. Empty fname matches all files in the project. # - XXXX must be nonempty. If it is an integer, it is treated as a # line number and matches every procedure whose definition -# includes line XXXX. Otherwise, it matches every procedures -# whose cs_pdg_friendly_name() +# includes line XXXX. If it is '*', it matches every procedure. +# Otherwise, it matches every procedure whose +# cs_pdg_friendly_name() # [doc/html/API/CAPI/cs__pdg_8h.html#func_cs_pdg_friendly_name] # is exactly XXXX. # -# For example, all of the following will match procedure main() in -# file /home/me/myproject/src/main.c -# REACHABILITY_ROOTS += :main -# REACHABILITY_ROOTS += main.c:main -# REACHABILITY_ROOTS += /main.c:main -# REACHABILITY_ROOTS += myproject/src/main.c:main +# Notes +# By default, the set of reachability roots is empty. # # CodeSonar will generate # - an alert [doc/html/GUI/GUI_Alerts.html] for each -# REACHABILITY_ROOTS rule that does not match at least one -# procedure in the project. +# REACHABILITY_ROOTS fname:XXXX rule that does not match at least +# one procedure in the project. # - an alert [doc/html/GUI/GUI_Alerts.html] if there are one or -# more WARNING_FILTER reachable rules, but no reachability roots +# more WARNING_FILTER reachable rules, or SKIP_ANALYSIS_OF += +# UNREACHABLE_FUNCTIONS is specified, but no reachability roots # have been specified. This includes the case where # REACHABILITY_ROOTS rules exist but none of the rules matches a # procedure. # - a Analysis Log [doc/html/GUI/GUI_Log_Analysis.html] message for -# each REACHABILITY_ROOTS rule that matches more than one -# procedure (these are permitted, but are logged in case they -# were not have been intentional). +# each REACHABILITY_ROOTS fname:XXXX rule that matches more than +# one procedure (these are permitted, but are logged in case they +# were not intentional). # -# Notes -# By default, the set of REACHABILITY_ROOTS is empty. -# -# For a typical simple C program, we are only interested in +# For a typical simple C program, we might be only interested in # reachability from main(), and consider any procedure that is not # [transitively] called by main() to be unreachable. For example: +# REACHABILITY_ROOTS = main.c:main +# +# Example 1: all of the following will match procedure main() in +# file /home/me/myproject/src/main.c +# REACHABILITY_ROOTS += :main # REACHABILITY_ROOTS += main.c:main +# REACHABILITY_ROOTS += /main.c:main +# REACHABILITY_ROOTS += myproject/src/main.c:main # +# Example 2: the following will match any procedure in every file +# whose full path name has foo.c as a suffix. +# REACHABILITY_ROOTS += foo.c:* # Parameter HARDCODED_ARGS_REGEX @@ -7088,6 +8538,7 @@ # Parameter HARDCODED_ARGS_CLASS_NAME # Parameter HARDCODED_ARGS_CATEGORIES # Parameter HARDCODED_ARGS_BASE_RANK +# Parameter HARDCODED_ARGS_SIGNIFICANCE # # Purpose # Use the HARDCODED_ARGS_* family of parameters to define warning @@ -7101,6 +8552,8 @@ # - HARDCODED_ARGS_CLASS_NAME: string # - HARDCODED_ARGS_CATEGORIES: string # - HARDCODED_ARGS_BASE_RANK: number +# - HARDCODED_ARGS_SIGNIFICANCE: { UNSPECIFIED, SECURITY, +# RELIABILITY, REDUNDANCY, STYLE, DIAGNOSTIC } # # Behavior # These parameters are used together to specify functions with @@ -7120,13 +8573,16 @@ # - HARDCODED_ARGS_BASE_RANK is the base rank # [doc/html/Elements/PROPERTIES_Warning.html#base_rank] assigned # to the warning, with default 25.0. +# - HARDCODED_ARGS_SIGNIFICANCE is a string representing the +# Significance [doc/html/WarningClasses/Significance.html] +# classification for this warning class. # # Notes -# The HARDCODED_ARGS_CATEGORIES and HARDCODED_ARGS_BASE_RANK -# settings are optional, but both HARDCODED_ARGS_REGEX and -# HARDCODED_ARGS_CLASS_NAME must be fully specified. The -# HARDCODED_ARGS_REGEX message must come first, and the -# HARDCODED_ARGS_CLASS_NAME second. +# The HARDCODED_ARGS_CATEGORIES, HARDCODED_ARGS_BASE_RANK, and +# HARDCODED_ARGS_SIGNIFICANCE settings are optional, but +# HARDCODED_ARGS_REGEX and HARDCODED_ARGS_CLASS_NAME must be fully +# specified. The HARDCODED_ARGS_REGEX message must come first, and +# the HARDCODED_ARGS_CLASS_NAME second. # # If two or more sets of HARDCODED_ARGS_* rules have the same # HARDCODED_ARGS_CLASS_NAME value, the same warning class will be @@ -7147,6 +8603,7 @@ # HARDCODED_ARGS_REGEX = ^crypt(_r)?$ # HARDCODED_ARGS_LIST = 2 # HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Salt +# HARDCODED_ARGS_SIGNIFICANCE = SECURITY # specifies that the second argument to crypt() and crypt_r() # should not be hardcoded, and that warnings of class "Hardcoded # Crypto Salt" should be issued at locations where this constraint @@ -7157,148 +8614,218 @@ #HARDCODED_ARGS_LIST = 1, 3 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Authentication #HARDCODED_ARGS_CATEGORIES = HARDCODED.AUTH;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^LogonUser(Ex|ExEx)?(A|W)?$ #HARDCODED_ARGS_LIST = 1, 3 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Authentication #HARDCODED_ARGS_CATEGORIES = HARDCODED.AUTH;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^CredUIPromptForCredentials(A|W)?$ #HARDCODED_ARGS_LIST = 5, 7 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Authentication #HARDCODED_ARGS_CATEGORIES = HARDCODED.AUTH;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^WNetAddConnection(A|W)?$ #HARDCODED_ARGS_LIST = 2 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Authentication #HARDCODED_ARGS_CATEGORIES = HARDCODED.AUTH;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^WNetAddConnection2?(A|W)?$ #HARDCODED_ARGS_LIST = 2, 3 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Authentication #HARDCODED_ARGS_CATEGORIES = HARDCODED.AUTH;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^WNetAddConnection3(A|W)?$ #HARDCODED_ARGS_LIST = 3, 4 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Authentication #HARDCODED_ARGS_CATEGORIES = HARDCODED.AUTH;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^ChangeAccountPassword(A|W)?$ #HARDCODED_ARGS_LIST = 3, 4, 5 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Authentication #HARDCODED_ARGS_CATEGORIES = HARDCODED.AUTH;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^SQLConnect(A|W|UNIX)?$ #HARDCODED_ARGS_LIST = 4, 6 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Authentication #HARDCODED_ARGS_CATEGORIES = HARDCODED.AUTH;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^WTSConnectSession(A|W)?$ #HARDCODED_ARGS_LIST = 3 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Authentication #HARDCODED_ARGS_CATEGORIES = HARDCODED.AUTH;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^(ecb_|cbc_)?crypt(_r)?$ #HARDCODED_ARGS_LIST = 1 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Key #HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^passwd2des$ #HARDCODED_ARGS_LIST = 1 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Key #HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^x(en|de)crypt$ #HARDCODED_ARGS_LIST = 2 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Key #HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^krb5_c_(en|de)crypt$ #HARDCODED_ARGS_LIST = 2 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Key #HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^BF_set_key$ #HARDCODED_ARGS_LIST = 3 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Key #HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^DES_set_key(_unchecked|_checked)?$ #HARDCODED_ARGS_LIST = 1 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Key #HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^DES_string_to_key$ #HARDCODED_ARGS_LIST = 1 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Key #HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^DES_string_to_2keys$ #HARDCODED_ARGS_LIST = 1 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Key #HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^krb5_c_string_to_key$ #HARDCODED_ARGS_LIST = 3 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Key #HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^DES_(f)?crypt$ #HARDCODED_ARGS_LIST = 2 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Salt #HARDCODED_ARGS_CATEGORIES = HARDCODED.SALT;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^crypt(_r)?$ #HARDCODED_ARGS_LIST = 2 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Salt #HARDCODED_ARGS_CATEGORIES = HARDCODED.SALT;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY #HARDCODED_ARGS_REGEX = ^krb5_c_string_to_key$ #HARDCODED_ARGS_LIST = 4 #HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Salt #HARDCODED_ARGS_CATEGORIES = HARDCODED.SALT;CWE:547 +#HARDCODED_ARGS_SIGNIFICANCE = SECURITY -# Parameter TRACK_TAINTED_VALUES +# Parameter TAINT_HIGHLIGHTING # # Purpose -# For the taint analysis, specifies the level of tainted-value -# tracking performed. +# Enable taint highlighting +# [doc/html/Elements/Taint.html#source_highlighting] in the hub +# GUI. +# +# Type +# { Yes, No } # # Behavior -# - More : enables taint warnings such as Command Injection. -# - Most : enables taint warnings and code highlighting. +# - Yes : CodeSonar will perform taint propagation analysis, and +# use the results of that analysis to highlight tainted values in +# source code displayed in the hub GUI. +# +# - No : CodeSonar will not perform taint propagation analysis, and +# taint highlighting will not be available. +# +# Notes +# Taint propagation analysis takes place in the pointer analysis +# phase +# [doc/html/Elements/PROPERTIES_Analysis.html#pointer_analysis]. +# Note that if TAINT_HIGHLIGHTING=No then taint propagation +# analysis will not be performed even if pointer analysis passes +# are being performed for the sake of resolving function pointers +# (for FUNCTION_POINTER_RESOLUTION). +# +# The extra information gained during taint propagation analysis +# can also improve taint warnings in some cases. + +#TAINT_HIGHLIGHTING = Yes + + +# Parameter FUNCTION_POINTER_RESOLUTION +# +# Purpose +# Enable function pointer resolution. # # Type -# {Some, More, Most} +# { Yes, No } +# +# Behavior +# - Yes : CodeSonar will perform function pointer resolution, with +# the number of iterations bounded by +# MAX_POINTER_ANALYSIS_PASSES. +# +# - No : CodeSonar will not perform function pointer resolution. # +# Notes +# Function pointer resolution takes place in the pointer analysis +# phase +# [doc/html/Elements/PROPERTIES_Analysis.html#pointer_analysis]. +# Note that if FUNCTION_POINTER_RESOLUTION=No then function pointer +# resolution will not be performed even if pointer analysis passes +# are being performed for the sake of taint propagation analysis +# (for TAINT_HIGHLIGHTING). +# +# Setting this to Yes can improve CodeSonar results by permitting a +# more precise analysis of behavior at function pointer call sites. -#TRACK_TAINTED_VALUES = Most -##TRACK_TAINTED_VALUES = More -##TRACK_TAINTED_VALUES = Some +#FUNCTION_POINTER_RESOLUTION = Yes # Parameter TAINT_TRIGGER_ON_GLOBALS # # Purpose -# For the taint analysis, specifies whether to track global -# variables interprocedurally. +# For the taint analysis, specifies whether global inputs to +# procedures (as opposed to parameter inputs) should be checked for +# taint, provided the procedure uses them in ways where they should +# not be tainted. # # Type -# {Yes, No} +# { Yes, No } # # Tags # - ANALYSIS_BOUND: Analysis resource/effort limit # # Behavior -# - Yes : the taint analysis will track global variables -# interprocedurally. -# - No : the taint analysis will not track global variables -# interprocedurally. +# - Yes : the taint analysis will check global inputs to prodedures +# for taint. +# - No : the taint analysis will not check global inputs to +# prodedures for taint. # # Notes # Setting this to Yes can lead to scalability issues on large # projects. +# +# This setting is analogous to MAX_GLOBAL_CHECK_AGE, but for taint, +# and only has two possible settings (effectively 0 and unlimited). #TAINT_TRIGGER_ON_GLOBALS = No @@ -7348,8 +8875,8 @@ # # Purpose # For the taint analysis, specifies a per-procedure bound on the -# number of modified values (outputs) that CodeSonar will keep -# track of in procedure summaries. +# number of modified values (outputs and side effects) that +# CodeSonar will keep track of in procedure summaries. # # Tags # - ANALYSIS_BOUND: Analysis resource/effort limit @@ -7455,6 +8982,27 @@ #TAINT_MAX_CHECKED_TAINT_KINDS_PER_PROCEDURE = 100 +# Parameter TAINT_MAX_WARNING_PATH_LENGTH +# +# Purpose +# For warnings implemented by taint analysis, specifies the maximum +# number of program points along an execution path that will be +# considered. +# +# Tags +# - ANALYSIS_BOUND: Analysis resource/effort limit +# +# Type +# integer +# +# Behavior +# Taint warnings traversing more than this many program points will +# not be detected during refinement. Larger values may allow +# warning refinement to use more time and detect longer warnings. + +#TAINT_MAX_WARNING_PATH_LENGTH = 10000 + + # Parameter DISABLED_TAINT_KINDS # # Purpose @@ -7511,7 +9059,7 @@ # satisfied on the target platform. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # # Type # non-negative integer @@ -7531,7 +9079,7 @@ # useful to suppress some warnings that might only be possible if # the program has already run out of memory. -#MAX_ALLOCATION_SIZE = 0 +#MAX_ALLOCATION_SIZE = 1073741824 # Parameter OVERFLOWN_SIZE_UPPER_BOUND @@ -7542,7 +9090,7 @@ # exceed the upper bound, then the warning will be dropped. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # - WC_ALLOC.SIZE.ADDOFLOW: Used by Addition Overflow of Allocation # Size # - WC_ALLOC.SIZE.MULOFLOW: Used by Multiplication Overflow of @@ -7587,10 +9135,10 @@ # using 32-bit or wider division. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # Setting this to Yes can allow CodeSonar to rule out certain @@ -7613,10 +9161,10 @@ # or merely results in an unknown value. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : CodeSonar will treat division by zero as a crashing bug. @@ -7629,7 +9177,7 @@ # Notes # The vast majority of environments will terminate execution on # division by zero. -# + #DIV_BY_ZERO_CRASHES = Yes @@ -7640,10 +9188,10 @@ # NULL_POINTER_THRESHOLD will terminate execution. # # Tags -# - WARNING_THRESHOLD: Warning-Class-Specific Thresholds +# - WARNING_THRESHOLD: Warning-Class-Specific Settings # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : CodeSonar will treat null pointer dereferences (defined @@ -7651,14 +9199,22 @@ # as crashing bugs. In particular, the analysis will deduce that # if execution continues after a pointer dereference, the pointer # cannot have been NULL. This can eliminate some false positives. -# - No : CodeSonar will treat null pointer dereferences like any -# other pointer dereferences. +# - No : CodeSonar will not impose constraints on the pointer value +# as a consequence of dereferencing it. # # Notes # Some embedded environments may allow dereferencing of NULL. # # We do not recomment setting this to No as it may produce -# confusing results or false positives. +# confusing results or false positives, such as the following +# division by zero: +# +# p = unknown_value(); +# if( rand() ) { +# *p = 42; +# j = 0; +# } else { j = 1; } +# if( !p ) j = 1 / j; #NULL_POINTER_DEREF_CRASHES = Yes @@ -7689,7 +9245,7 @@ # second rule will be prepended to the options in the first # setting. -#JAVA_FLAGS_PREPEND += +#JAVA_FLAGS_PREPEND += # Parameter JAVA_FLAGS_APPEND @@ -7723,7 +9279,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : FindBugs will be run during Java analyses, unless build @@ -7745,7 +9301,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : PMD will be run during Java analyses, unless build option @@ -7768,7 +9324,7 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# {Yes, No} +# { Yes, No } # # Behavior # - Yes : ThreadSafe will be run during Java analyses. @@ -7785,33 +9341,481 @@ #JAVA_ENABLE_THREADSAFE = No -# Parameter EXTRA_COMPILATION_UNITS + +# Parameter MAX_POINTER_ANALYSIS_PASSES # # Purpose -# Specifies extra compilation units to be added to every CodeSonar -# project. In particular, use this parameter to include custom -# checks written with the Extension API -# [doc/html/Extensions/Extensions.html]. +# Specifies an upper bound on the number of analysis passes that +# will take place in the pointer analysis phase +# [doc/html/Elements/PROPERTIES_Analysis.html#pointer_analysis]. +# +# Tags +# - ANALYSIS_BOUND: Analysis resource/effort limit # # Type -# Space-separated list of strings, each representing the full path -# to a .c file. +# positive integer # # Behavior -# For each file listed, CodeSonar will obtain the corresponding IR -# from the file's sibling CSURF.FILES directory and include it in -# the project. +# Depends on the settings of TAINT_HIGHLIGHTING and +# FUNCTION_POINTER_RESOLUTION. +# - If one or both are set to Yes : the pointer analysis phase will +# stop after this many passes, or after pointer analysis results +# converge - whichever occurs first. +# - If both are set to No: the CodeSonar analysis will not include +# a pointer analysis phase, regardless of the setting of +# MAX_POINTER_ANALYSIS_PASSES. # # Notes -# If a path contains spaces, it should be quoted "". +# CodeSonar uses pointer analysis to obtain information about: +# - function pointer resolution (including virtual function +# dispatch), and +# - taint propagation. # -# Every file listed should be a C or C++ source file that -# has previously been compiled in the file's directory with -# (Windows) -# codesonar -w xcc "-I/codesonar/libmodels" -c -# -# (Otherwise) -# codesonar -w xcc -I/codesonar/libmodels -c -# EXTRA_COMPILATION_UNITS += $GTHOME/codesonar/smel/socket_state.c +# Pointer analysis can have high time cost, and there are generally +# diminishing returns as the number of passes increases. +# - Only one pass is required if the program does not use function +# pointers: this single pass is sufficient for taint analysis. +# - Two or three passes will be sufficient for most programs that +# use function pointers. +# - Very few programs will require more than 10 passes. + +#MAX_POINTER_ANALYSIS_PASSES = 2 + + +# Parameter TAINTED_BUF_TRIGGER_ON_UNKNOWN_BUFFERS +# +# Purpose +# Specifies whether CodeSonar will issue Tainted Buffer Access +# warnings when the accessed buffer cannot be identified (and so +# its size cannot be determined). +# +# Tags +# - ANALYSIS_BOUND: Analysis resource/effort limit +# - WC_LANG.MEM.TBA: Used by Tainted Buffer Access +# +# Type +# { Yes, No } +# +# Behavior +# - Yes : CodeSonar will issue Tainted Buffer Access warnings if +# the size of the accessed buffer cannot be determined and the +# access location is tainted, or if the size of the accessed +# buffer can be determined and the access location is tainted and +# may lie outside the buffer. +# - No : CodeSonar will only issue Tainted Buffer Access warnings +# if the size of the accessed buffer can be determined and the +# tainted access location may lie outside the buffer. +# +# Notes +# For example, CodeSonar will only issue a Tainted Buffer Access +# warning for the following code fragment if +# TAINTED_BUF_TRIGGER_ON_UNKNOWN_BUFFERS=Yes. +# p = undefined_function(); +# p[getchar()] = 42; +# Setting TAINTED_BUF_TRIGGER_ON_UNKNOWN_BUFFERS=Yes will +# potentially generate a large number of false positive Tainted +# Buffer Access warnings. + +#TAINTED_BUF_TRIGGER_ON_UNKNOWN_BUFFERS = No + +# Parameter GLOBAL_TAINT_MODE +# +# Purpose +# Specifies how taint propagates through global variables. +# +# Tags +# - ANALYSIS_PROPERTY: Analysis Properties +# +# Type +# {None, Context_Insensitive, Context_Sensitive} +# +# Behavior +# - None : the analysis will not propagate taint through globals +# from callers to callees. +# - Context_Sensitive : the analysis will propagate taint through +# globals from callers to callees, but will likely drop taint if +# is propagated down too many calls. +# - Context_Insensitive : the analysis will propagate more taint +# through globals from callers to callees than it will for the +# Context_Sensitive setting, but the propagation may be +# imprecise. This setting tends to produce many false positives +# in programs with tainted globals. +# +# Notes +# None and Context_Sensitive are essentially equivalent for the +# purposes of reporting taint warnings. The primary advantage of +# Context_Sensitive over None will be more taint marking +# [doc/html/GUI/SourceHyperlinking.html#tainted] in the GUI. +# +# Setting TAINT_TRIGGER_ON_GLOBALS to Yes will cause more taint +# warnings to be emitted against global variables when +# GLOBAL_TAINT_MODE=None or GLOBAL_TAINT_MODE=Context_Sensitive. + +#GLOBAL_TAINT_MODE = None + + +# Parameter GLOBAL_FUNCTION_POINTER_MODE +# +# Purpose +# Specifies whether and how the CodeSonar analysis will propagate +# function pointers through global variables. +# +# Tags +# - ANALYSIS_PROPERTY: Analysis Properties +# +# Type +# {None, Context_Insensitive, Context_Sensitive} +# +# Behavior +# - None : the analysis will not propagate function pointers +# through globals from callers to callees. +# - Context_Sensitive : the analysis will propagate function +# pointers through globals from callers to callees, but will +# likely drop points-to facts if they are propagated down too +# many calls. +# - Context_Insensitive : the analysis will propagate more function +# pointers through globals from callers to callees than it will +# for the Context_Sensitive setting, but the propagation may be +# imprecise. + +#GLOBAL_FUNCTION_POINTER_MODE = Context_Insensitive + + +# Parameter TAINT_RANK_BONUS +# +# Purpose +# Specifies whether to adjust the rank +# [doc/html/Elements/PROPERTIES_Warning.html#rank] of a warning if +# values relevant to the warning are tainted. +# +# Tags +# - ANALYSIS_BOUND: Analysis resource/effort limit +# +# Type +# { Yes, No } +# +# Behavior +# - Yes : if one or more values relevant to a warning are tainted, +# the warning rank computation will be adjusted to a smaller +# value (that is, one that indicates that the warning should be +# reviewed earlier). The magnitude of the adjustment is +# proportional to the number of relevant values that are tainted. +# - No : The warning rank will not be affected by the presence or +# absence of taint. +# +# Notes +# This parameter has no effect unless the taint propagation +# analysis is enabled with TAINT_HIGHLIGHTING=Yes. The cost can be +# as much as 20 percent of overall analysis time. + +#TAINT_RANK_BONUS = No + + +# Parameter TAINT_SEARCH_BOUND +# +# Purpose +# Bound for searching paths during taint refinement. +# +# Tags +# - ANALYSIS_BOUND: Analysis resource/effort limit +# +# Type +# integer +# +# Behavior +# When the number is larger, more paths are searched, but more time +# is used. +# +# Notes +# This preference represents a trade-off between time and +# thoroughness. + +#TAINT_SEARCH_BOUND = 100 + + +# Parameter TAINT_CALLSITE_EXPANSION_EFFORT +# +# Purpose +# Bound effort for expanding callsites during taint refinement. +# +# Tags +# - ANALYSIS_BOUND: Analysis resource/effort limit +# +# Type +# integer +# +# Behavior +# When the number is larger, more paths are searched, but more time +# is used. +# +# Notes +# This preference represents a trade-off between time and +# thoroughness. + +#TAINT_CALLSITE_EXPANSION_EFFORT = 1000 + + +# Parameter BOOL_TYPES +# +# Purpose +# Specifies a set of types and values that are to be considered as +# Boolean for the purpose of the Misra C checks. +# +# Tags +# +# Type +# A whitespace separated list of triples of the form +# ,, +# where: +# - is the name of the Boolean type +# - is the name of the true value for type +# - is the name of the false value for type +# +# Notes +# For example, if your program has the following: +# typedef unsigned char bool; +# const bool true = 1; +# const bool false = 0; +# you would use +# BOOL_TYPES += bool,true,false +# +# The += operator can be used to specify multiple triples. +# +## BOOL_TYPES += bool,true,false +## BOOL_TYPES += bool_t,true,false + +#BOOL_TYPES = + + +# Parameter UNINITIALIZED_GLOBALS +# +# Purpose +# Specifies whether global variables without explicit +# initialization should be treated as uninitialized and therefore +# subject to Uninitialized Variable warnings. +# +# Tags +# - WC_LANG.MEM.UVAR: Used by Uninitialized Variable +# - ANALYSIS_PROPERTY: Analysis Properties +# +# Type +# { Yes, No } +# +# Behavior +# - Yes : Uninitialized Variable warnings can be issued on global +# variables that are used before being explicitly initialized. +# - No : Global and static variables without explicit +# initialization are assumed to be implicitly zero-initialized. +# +# Notes +# All C and C++ language standards stipulate that global and static +# variables without explicit initialization should be implicitly +# zero initialized. However, if your codebase strives to never rely +# on this, or you are in an environment that does not initialize +# such variables, then setting UNINITIALIZED_GLOBALS=Yes might be +# useful. +# +# If this parameter is set to Yes, you will need to adjust several +# other parameters to accommodate the additional checking. This +# will incur significant cost. On large programs, the analysis +# might not run in a reasonable amount of time anymore, depending +# on how high these settings are raised. +# - Increase MAX_MODIFIED_VALUES so that it is more than double the +# number of global variables in your program. +# - Increase MAX_CHECKED_INPUTS_PER_PROCEDURE so that it is more +# than double the number of global variables in your program. +# - You may also wish to increase MAX_GLOBAL_CHECK_AGE: uses of +# uninitialized variables at call stack depths deeper than +# MAX_GLOBAL_CHECK_AGE will not be detected. + +#UNINITIALIZED_GLOBALS = No + + +# Parameter ASSIGN_COND_MODE +# +# Purpose +# Determines the scenarios under which Assignment in Conditional +# warnings are generated. +# +# Tags +# - WC_LANG.STRUCT.CONDASSIG: Used by Assignment in Conditional +# - ANALYSIS_PROPERTY: Analysis Properties +# +# Type +# {All, Var_and_const, Const_only} +# +# Behavior +# - All : Assignment in Conditional warnings are reported for any +# assignment inside a conditional statement, including assigning +# the result of a function call. +# - Var_and_const : Warnings are reported only for assignments +# where the right hand side is either a variable or a constant +# value. +# - Const_only : Warnings are reported only for assignments where +# the right hand side is a constant value. +# + +#ASSIGN_COND_MODE = Const_only + + +# Parameter MAX_PERCENT_F_CHARACTERS +# +# Purpose +# Maximum number of characters that %f in printf-family functions +# will expand to, not including the decimal point or the minus +# sign. +# +# Tags +# - LANGUAGE_TREATMENT: Treatment of Language Constructs +# +# Type +# integer +# +# Behavior +# When the number is larger, it will be assumed that uses of %f in +# sprintf-like functions might print up to this many characters. +# +# Notes +# The default setting has been experimentally verified as the +# largest number of digits common printf implementations will +# render for a 64-bit double. +# +# Some potential Buffer Overrun warnings can depend on this +# setting. + +#MAX_PERCENT_F_CHARACTERS = 309 + + +# Parameter MAX_PERCENT_LF_CHARACTERS +# +# Purpose +# Maximum number of characters that %lf in printf-family functions +# will expand to, not including the decimal point or the minus +# sign. +# +# Tags +# - LANGUAGE_TREATMENT: Treatment of Language Constructs +# +# Type +# integer +# +# Behavior +# When the number is larger, it will be assumed that uses of %lf in +# sprintf-like functions might print up to this many characters. +# +# Notes +# The default setting has been experimentally verified as the +# largest number of digits common printf implementations will +# render for an 80-bit double. +# +# Some potential Buffer Overrun warnings can depend on this +# setting. + +#MAX_PERCENT_LF_CHARACTERS = 4933 + + +# Parameter SIGNIFICANCE_LEN_EXTERN +# +# Purpose +# Specifies the number of characters in which global identifiers +# should be considered to be significant. +# +# Tags +# - WC_LANG.ID.ND.EXT: Used by Non-distinct Identifiers: External +# Names +# +# Type +# integer +# +# Behavior +# - 0 : All characters must differ for the identifiers to be +# considered distinct. +# - N (for N>0) : Identifiers must differ in the first N characters +# to be considered distinct. +# - -1 : The value is determined based on which version of the C or +# C++ standard is being used to parse the file. +# +# Notes +# If unspecified, or if the value is -1, the analysis will attempt +# to determine which version of the C or C++ standard is explicitly +# used, and the values are set based on that: +# - C90 or C94: 6 +# - C99: 31 +# - C++: 2047 +# - all other cases: 31 +# +# See also SIGNIFICANCE_LEN_MACRO, SIGNIFICANCE_LEN_OTHER. + +## SIGNIFICANCE_LEN_EXTERN = -1 + + +# Parameter SIGNIFICANCE_LEN_MACRO +# +# Purpose +# Specifies the number of characters in which macros should be +# considered to be significant. +# +# Tags +# - WC_LANG.ID.ND.MM: Used by Non-distinct Identifiers: Macro/Macro +# - WC_LANG.ID.ND.MO: Used by Non-distinct Identifiers: Macro/Other +# +# Type +# integer +# +# Behavior +# - 0 : All characters must differ for the identifiers to be +# considered distinct. +# - N (for N>0) : Identifiers must differ in the first N characters +# to be considered distinct. +# - -1 : The value is determined based on which version of the C or +# C++ standard is being used to parse the file. +# +# Notes +# If unspecified, or if the value is -1, the analysis will attempt +# to determine which version of the C or C++ standard is explicitly +# used, and the values are set based on that: +# - C90 or C94: 31 +# - C99: 63 +# - C++: 2047 +# - all other cases: 31 +# +# See also SIGNIFICANCE_LEN_EXTERN, SIGNIFICANCE_LEN_OTHER. + +## SIGNIFICANCE_LEN_MACRO = -1 + + +# Parameter SIGNIFICANCE_LEN_OTHER +# +# Purpose +# Specifies the number of characters in which identifiers other +# than globals or macros should be considered to be significant. +# +# Tags +# - WC_LANG.ID.ND.NEST: Used by Non-distinct Identifiers: Nested +# Scope +# - WC_LANG.ID.ND.SS: Used by Non-distinct Identifiers: Same Scope +# +# Type +# integer +# +# Behavior +# - 0 : All characters must differ for the identifiers to be +# considered distinct. +# - N (for N>0) : Identifiers must differ in the first N characters +# to be considered distinct. +# - -1 : The value is determined based on which version of the C or +# C++ standard is being used to parse the file. +# +# Notes +# If unspecified, or if the value is -1, the analysis will attempt +# to determine which version of the C or C++ standard is explicitly +# used, and the values are set based on that: +# - C90 or C94: 31 +# - C99: 63 +# - C++: 2047 +# - all other cases: 31 +# +# See also SIGNIFICANCE_LEN_EXTERN, SIGNIFICANCE_LEN_MACRO. +## SIGNIFICANCE_LEN_OTHER = -1