--- template4.4p0.conf 2017-10-20 09:28:01.695702000 -0400 +++ template4.5p0.conf 2017-10-20 09:28:08.306363000 -0400 @@ -1,7 +1,7 @@ # For emacs: -*- Shell-script -*- # ###################################################################### -#################### CodeSonar Configuration File #################### +# CodeSonar 4.5p0 Configuration File ###################################################################### # # CodeSonar will use preferences defined in this file when running @@ -242,6 +242,7 @@ # COMPILER_MODELS += picc.exe -> picc # COMPILER_MODELS += shc.exe -> shc # COMPILER_MODELS += shcpp.exe -> shcpp +# COMPILER_MODELS += ccrx.exe -> ccrx # COMPILER_MODELS += ch38.exe -> ch38 # COMPILER_MODELS += dcc.exe -> dcc # COMPILER_MODELS += dplus.exe -> dcc @@ -251,6 +252,8 @@ # COMPILER_MODELS += ccts.exe -> visualdsp # COMPILER_MODELS += ccblkfn.exe -> visualdsp # COMPILER_MODELS += cvavr-null.exe -> cvavr +# COMPILER_MODELS += arm-none-eabi-gcc.exe -> gcc +# COMPILER_MODELS += arm-none-eabi-g++.exe -> gpp # # POSIX default models: # COMPILER_MODELS += gcc -> gcc @@ -280,6 +283,8 @@ # COMPILER_MODELS += tcpp -> armcpp # COMPILER_MODELS += qcc -> qcc # COMPILER_MODELS += QCC -> qcc +# COMPILER_MODELS += arm-none-eabi-gcc -> gcc +# COMPILER_MODELS += arm-none-eabi-g++ -> gpp # # On Solaris, in addition to POSIX default models: # COMPILER_MODELS += CC -> acpp @@ -358,8 +363,8 @@ # COMPILER_MODELS += bin\mycc.exe -> cl # # [Windows] Treat anything named mycc.exe like cl. Associate ABI -# key ABC with any translation units compiled by this compiler. \c -# ode COMPILER_MODELS += mycc.exe -> cl:ABC +# key ABC with any translation units compiled by this compiler. +# COMPILER_MODELS += mycc.exe -> cl:ABC # # [Windows] Handle all compilations with any cl.exe executable # using the cl compiler model, using ABI keys to distinguish @@ -500,6 +505,75 @@ # DISABLED_COMPILERS += tcpp # +# Parameter HOOK_BLACKLIST +# +# Tags +# - BUILD_BEHAVIOR: Governs the Build/Analysis +# +# Purpose +# Advises CodeSonar to not monitor certain executables or their +# subprocesses. +# +# Type +# Whitespace separated list of program names (basenames, path +# prefixes, or full paths). +# +# Behavior +# Some programs contain security measures that cause them to fail +# if they detect they are being monitored. It is beneficial to add +# such programs to this list. +# +# Notes +# This parameter has no effect on Windows systems. +# +# If programs listed here transitively invoke compilers, CodeSonar +# will not notice those invocations. +# +# Defaults: +# +# POSIX: +# HOOK_BLACKLIST += ibtoold +# HOOK_BLACKLIST += momc +# HOOK_BLACKLIST += ssh +# HOOK_BLACKLIST += rpm +# HOOK_BLACKLIST += chroot +HOOK_BLACKLIST += ibtoold +HOOK_BLACKLIST += momc +HOOK_BLACKLIST += mapc +HOOK_BLACKLIST += ssh +HOOK_BLACKLIST += rpm +HOOK_BLACKLIST += chroot + +# Some yocto projects (which uses the bitbake build system) fail a +# build if the output log contains the string ERR. It is observed +# that for some do_rootfs step which invokes QEMU (https://www +# .linux-mips.org/wiki/QEMU) ERROR: ld.so: object 'libhookcs.so' +# from LD_PRELOAD cannot be preloaded can show up in the log. This +# causes the build to fail. +HOOK_BLACKLIST += qemu-aarch64 +HOOK_BLACKLIST += qemu-arm +# The QEMU Guest Agent is a daemon intended to be run within +# virtual machines. HOOK_BLACKLIST += qemu-ga +HOOK_BLACKLIST += qemu-i386 +# qemu-img allows you to create, convert and modify images offline +# HOOK_BLACKLIST += qemu-img QEMU Disk exerciser HOOK_BLACKLIST += +# qemu-io +HOOK_BLACKLIST += qemu-mips +HOOK_BLACKLIST += qemu-mips64 +HOOK_BLACKLIST += qemu-mipsel +HOOK_BLACKLIST += qemu-mips.real +# Export a QEMU disk image using the NBD protocol. HOOK_BLACKLIST +# += qemu-nbd +HOOK_BLACKLIST += qemu-ppc +HOOK_BLACKLIST += qemu-system-aarch64 +HOOK_BLACKLIST += qemu-system-arm +HOOK_BLACKLIST += qemu-system-i386 +HOOK_BLACKLIST += qemu-system-mips +HOOK_BLACKLIST += qemu-system-mips64 +HOOK_BLACKLIST += qemu-system-mipsel +HOOK_BLACKLIST += qemu-system-ppc +HOOK_BLACKLIST += qemu-system-x86_64 +HOOK_BLACKLIST += qemu-x86_64 # Parameter FORCE_ENVIRONMENT # @@ -670,10 +744,6 @@ # Notes # This setting has no effect on non-Windows operating systems. # -# The only observed case where this option helps is when doing a -# GUI build under Microsoft Visual Studio 10 where the compiler has -# been passed the /MP flag. -# ## CREATE_CONSOLE = No @@ -762,8 +832,8 @@ # - BUILD_BEHAVIOR: Governs the Build/Analysis # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # If a file in a compilation command has a path that matches the @@ -1431,8 +1501,8 @@ # # - The delimiter '/' can be replaced by any character (except # null). -# - is a Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# - is a Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # describing a pattern that could occur in the source code. The # pattern can match multiple-line substrings in the source file. # Double-quote if you want it to include leading or @@ -1445,7 +1515,7 @@ # expression syntax option or flag as shown below. # # Boost regular expression syntax_option_type -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/ref/syntax_option_type.html] +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/ref/syntax_option_type.html] # correspondences: # # -M no_mod_m @@ -1468,7 +1538,7 @@ # X mod_x # # Boost regular expression match_flag_type -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/ref/match_flag_type.html] +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/ref/match_flag_type.html] # correspondences: # # a match_not_bob @@ -1549,8 +1619,8 @@ # - PRE_PREPROC: Operations on Un-Preprocessed Files # # Type -# SOURCE_PATTERN : Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# SOURCE_PATTERN : Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # SOURCE_REPLACEMENT : string # @@ -1747,7 +1817,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) = 2048 +# - getrlimit(RLIMIT_NOFILE) = 8192 # - GrammaTech-Internal Limit = 4096 # # Increasing this value may cause the product to exhaust available @@ -1780,20 +1850,21 @@ # PROCEDURE_METRIC_TIMEOUT = 60 + # Parameter COMPILER_MODEL_PLUGINS # # Purpose # Provide paths to additional compiler model plugins. # # Type -# file path +# string (representing a 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 +# CodeSonar will search in csurf/lib directory for user compiler +# models, then examine each compiler model specified in +# COMPILER_MODEL_PLUGINS. Compiler model plug-in names are prefixed # with "lib". User compiler models override builtin compiler models -# that ship with CodeSonar/Surfer. +# that ship with CodeSonar. # # For example: # COMPILER_MODEL_PLUGINS += /PATH/TO/libsamplecm.so @@ -1899,7 +1970,7 @@ # - If any part of a patch file fails, no part of that file is # applied. # - If there are multiple SOURCE_PATCH_DIRECTORIES rules, the -# directories are processed in reverse order:patches from the +# directories are processed in reverse order: patches from the # directory specified by the last SOURCE_PATCH_DIRECTORIES rule # are applied first. # @@ -1907,6 +1978,9 @@ # attempts to subsequently apply additional patches: Every matching # patch is attempted. # +# CodeSonar will instantiate variable $GTHOME with the path to the +# CodeSonar installation. +# # Notes # This process is independent of the names of the patch files # themselves - only the subdirectory name matters. Similarly, any @@ -2018,6 +2092,9 @@ # Notes # For example: # HUB_ADDRESS = 127.0.0.1:7340 +# HUB_ADDRESS = 0.0.0.0:7340 +# HUB_ADDRESS = [::1]:7340 +# HUB_ADDRESS = [::]:7340 # # This parameter is ignored by the CodeSonar Windows build wizard. # @@ -2108,9 +2185,9 @@ # # The "CodeSonar Analysis Log" in the web GUI will not be populated # when this is set to "Yes". Instead, the log will show up on the -# analyze command's stdout and stderr. By default, analysis -# processes run in the background and can continue running after -# the user has logged out. +# analyze command's stdout and stderr. With factory settings, +# analysis processes run in the background and can continue running +# after the user has logged out. ## FOREGROUND = No @@ -2120,32 +2197,33 @@ # Purpose # 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. +# (REQUEST_REMOTE_ANALYSIS_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 +# - Serial with REQUEST_REMOTE_ANALYSIS_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_ANALYSIS_SLAVES=No : CodeSonar will +# determine the appropriate maximum number of analysis 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, max(0, floor(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_ANALYSIS_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_ANALYSIS_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 @@ -2160,8 +2238,8 @@ # 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. +# Use ANALYSIS_MASTER_LISTEN_INTERFACE to specify the address on +# which the master process will listen. # # Use DAEMON_SLAVES to specify how many slave processes CodeSonar # may start to service web requests. @@ -2172,7 +2250,7 @@ ANALYSIS_SLAVES = Auto -# Parameter REQUEST_REMOTE_SLAVES +# Parameter REQUEST_REMOTE_ANALYSIS_SLAVES # # Purpose # Specifies whether or not automatically-started analysis slaves @@ -2182,6 +2260,8 @@ # {Yes, No} # # Behavior +# Determines how the analysis master will obtain additional slaves +# while it is running in analysis mode (to analyze the project). # - 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 @@ -2197,16 +2277,54 @@ # 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. +# ANALYSIS_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 +REQUEST_REMOTE_ANALYSIS_SLAVES = No -# Parameter REMOTE_SLAVES_LAUNCHDS +# Parameter REQUEST_REMOTE_DAEMON_SLAVES +# +# Purpose +# Specifies whether or not automatically-started analysis slaves +# can be distributed through the hub's analysis cloud while the +# analysis is running in daemon mode. +# +# Type +# {Yes, No} +# +# Behavior +# Determines how the analysis master will obtain additional slaves +# while it is running in daemon mode (to service requests from the +# hub, after the project has been built and analyzed). +# - 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 +# DAEMON_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_DAEMON_SLAVES = No + + +# Parameter REMOTE_ANALYSIS_SLAVES_LAUNCHDS # # Purpose # Specifies the launch daemon or daemons from which analysis slaves @@ -2253,13 +2371,72 @@ # # By default, all launch daemons on the hub will be used. # -# This setting has no effect if REQUEST_REMOTE_SLAVES=No. +# This setting has no effect if REQUEST_REMOTE_ANALYSIS_SLAVES=No. # # Examples: -# REMOTE_SLAVES_LAUNCHDS += /siteA/* -# REMOTE_SLAVES_LAUNCHDS += /siteA/alex@sparky -# REMOTE_SLAVES_LAUNCHDS += 123 -# REMOTE_SLAVES_LAUNCHDS += -123 +# REMOTE_ANALYSIS_SLAVES_LAUNCHDS += /siteA/* +# REMOTE_ANALYSIS_SLAVES_LAUNCHDS += /siteA/alex@sparky +# REMOTE_ANALYSIS_SLAVES_LAUNCHDS += 123 +# REMOTE_ANALYSIS_SLAVES_LAUNCHDS += -123 +# +# For more information, see the manual section on Distributed +# Analysis [doc/html/Workings/DistributedAnalysis.html]. + + +# Parameter REMOTE_DAEMON_SLAVES_LAUNCHDS +# +# Purpose +# Specifies the launch daemon or daemons from which analysis slaves +# may be requested while the analysis is running in daemon mode. +# +# Type +# string or integer +# +# Behavior +# Analysis slaves for remote-requesting analyses will only be +# requested from launch daemons that match the specified value, +# which can take any of the following forms. +# - Positive Integer N : Matches all launch daemons that are +# transitive descendants of the launchd group whose LDGroup ID +# [doc/html/Elements/PROPERTIES_Launchd_Group.html#ldgroup_id] is +# N. +# - Negative Integer -M : Matches the single launch daemon whose +# Launch Daemon ID +# [doc/html/Workings/LaunchDaemon.html#launchd_id] is M. +# - (Integer 0 is not a valid setting.) +# - /Foo/Bar/* : Matches all launch daemons that are transitive +# descendants of the launch daemon group(s) whose LDGroup Path +# [doc/html/Elements/PROPERTIES_Launchd_Group.html#ldgroup_path] +# is /Foo/Bar. Case sensitive. +# - /Foo/Bar/user@machine : Matches all launch laemon(s) whose +# Parent LDGroup +# [doc/html/Workings/LaunchDaemon.html#parent_ldgroup] is +# /Foo/Bar, System User +# [doc/html/Workings/LaunchDaemon.html#pretty_username] is user, +# and Machine [doc/html/Workings/LaunchDaemon.html#machine] is +# machine. Case sensitive. +# +# Notes +# If security is a concern, then it is safer to use the positive +# integer and negative integer forms, since IDs are never reused, +# whereas multiple launch daemon groups can have the same path, and +# the truthfulness of the human readable launch daemon names +# (user@machine) cannot be verified by the hub. +# +# It is advisable to only use trusted launch daemons. For best +# performance, it is advisable to only use launch daemons with +# reasonable performance and an ethernet quality network connection +# to the analysis master. +# +# By default, all launch daemons on the hub will be used. +# +# This setting has no effect if REQUEST_REMOTE_DAEMON_SLAVES=No. +# +# Examples: +# REMOTE_DAEMON_SLAVES_LAUNCHDS += /siteA/* +# REMOTE_DAEMON_SLAVES_LAUNCHDS += /siteA/alex@sparky +# REMOTE_DAEMON_SLAVES_LAUNCHDS += 123 +# REMOTE_DAEMON_SLAVES_LAUNCHDS += -123 # # For more information, see the manual section on Distributed # Analysis [doc/html/Workings/DistributedAnalysis.html]. @@ -2364,22 +2541,24 @@ # 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 +# For local-requesting analyses +# (REQUEST_REMOTE_ANALYSIS_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_ANALYSIS_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 -# REQUEST_REMOTE_SLAVES=No and CodeSonar determined that it should -# run serially), MAX_ANALYSIS_SLAVES has no effect. +# REQUEST_REMOTE_ANALYSIS_SLAVES=No and CodeSonar determined that +# it should run serially), MAX_ANALYSIS_SLAVES has no effect. MAX_ANALYSIS_SLAVES = 256 @@ -2389,34 +2568,35 @@ # Purpose # 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. +# (REQUEST_REMOTE_DAEMON_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 with REQUEST_REMOTE_SLAVES=No : web requests are +# - Serial with REQUEST_REMOTE_DAEMON_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 +# - Auto with REQUEST_REMOTE_DAEMON_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, max(0, floor(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_DAEMON_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_DAEMON_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. @@ -2433,8 +2613,8 @@ # ANALYSIS_SLAVES determines the degree of parallelism for the # analysis. # -# Use MASTER_LISTEN_INTERFACE to specify the address on which the -# master process will listen. +# Use DAEMON_MASTER_LISTEN_INTERFACE to specify the address on +# which the master process will listen. # # For more information, see the manual sections on Parallelism in # CodeSonar [doc/html/Workings/Parallelism.html] and Distributed @@ -2461,22 +2641,23 @@ # 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 +# For local-requesting analyses (REQUEST_REMOTE_DAEMON_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 +# For remote-requesting analyses +# (REQUEST_REMOTE_DAEMON_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 -# REQUEST_REMOTE_SLAVES=No and CodeSonar determined that it should -# run serially), MAX_DAEMON_SLAVES has no effect. +# REQUEST_REMOTE_DAEMON_SLAVES=No and CodeSonar determined that it +# should run serially), MAX_DAEMON_SLAVES has no effect. MAX_DAEMON_SLAVES = 256 @@ -2485,22 +2666,58 @@ # Parameter MEMORY_PER_ANALYSIS_PROCESS # # Purpose -# Used to compute slave limits for ANALYSIS_SLAVES=Auto, -# DAEMON_SLAVES=Auto, and REQUEST_REMOTE_SLAVES=Yes. +# Used to compute analysis slave and daemon slave limits when other +# settings specify that these computations should be made +# automatically. # # Type # integer # # Behavior -# 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. +# When set to integer N, on a system with R megabytes (MB) +# available memory and C logical cores, CodeSonar will set the +# maximum number of slaves to min(C, max(0, floor(R/N) - 1)) in +# cases where an automatically-computed analysis slave or daemon +# slave limit is required. +# +# For analysis slaves +# [doc/html/Workings/Parallelism.html#analysis_slave], an +# automatically-computed limit is required if: +# - REQUEST_REMOTE_ANALYSIS_SLAVES=No and ANALYSIS_SLAVES=Auto, or +# - REQUEST_REMOTE_ANALYSIS_SLAVES=Yes and the analysis cloud +# register indicates the process count should be automatically +# computed. +# +# For daemon slaves +# [doc/html/Workings/Parallelism.html#daemon_slave], an +# automatically-computed limit is required if: +# - REQUEST_REMOTE_DAEMON_SLAVES=No and DAEMON_SLAVES=Auto, or +# - REQUEST_REMOTE_DAEMON_SLAVES=Yes and the analysis cloud +# register indicates the process count should be automatically +# computed. +# +# In all other cases, this parameter has no effect. +# +# Notes +# This parameter is used for automatically computing limits on the +# number of analysis and daemon slaves. It does not affect the +# memory consumption of individual CodeSonar processes. Rather, it +# represents an estimate of that consumption. +# +# As the setting of this parameter decreases, the slave limit +# increases in a stepped manner up to the upper bound provided by +# the C (number of logical cores) term in the computation formula. +# Note that the stepping imposed by the rounding down of the R/N +# term means that small adjustments in this setting may not result +# in a change to the computed limit. +# +# Depending on the relationship between R and C, too low a setting +# - and thus too high a slave limit - may result in the system +# runing out of memory. +# +# Conversely, too high a setting will result in a slave limit that +# is lower than necessary, which could cause the analysis to run +# more slowly than it would with more slaves. MEMORY_PER_ANALYSIS_PROCESS = 512 @@ -2549,10 +2766,10 @@ # attempts on that unit of work will likely result in repeating # crashes. # -# By default, CodeSonar retries a failing unit of work up to three -# times before giving up on that unit of work and moving on. This -# strikes a balance between retrying forever and giving up -# immediately. +# With factory settings, CodeSonar retries a failing unit of work +# up to three times before giving up on that unit of work and +# moving on. This strikes a balance between retrying forever and +# giving up immediately. # # For more information, see the manual sections on Parallelism in # CodeSonar [doc/html/Workings/Parallelism.html] and the CodeSonar @@ -2561,11 +2778,11 @@ UNIT_OF_WORK_RETRIES = 3 -# Parameter MASTER_LISTEN_INTERFACE +# Parameter ANALYSIS_MASTER_LISTEN_INTERFACE # # Purpose -# Specifies the address on which the master process will listen, -# both in analysis mode and in daemon mode. +# Specifies the address on which the analysis master process will +# listen while it is in analysis mode (to analyze the project). # # Type # String of the form or : @@ -2573,12 +2790,9 @@ # Behavior # - If is specified and available, the analysis master will # listen on :. -# - If is specified but unavailable, the master will not -# run. If this occurs in analysis mode, the analysis will crash. -# If it occurs in daemon mode, the daemon will not start and -# 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 specified but unavailable, the master will not run +# and the analysis will crash. 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 @@ -2586,25 +2800,29 @@ # # Notes # Examples: -# MASTER_LISTEN_INTERFACE=0.0.0.0 -# MASTER_LISTEN_INTERFACE=0.0.0.0:1234 -# MASTER_LISTEN_INTERFACE=127.0.0.1 -# MASTER_LISTEN_INTERFACE=127.0.0.1:1234 -# MASTER_LISTEN_INTERFACE=mymachine -# MASTER_LISTEN_INTERFACE=mymachine:1234 +# ANALYSIS_MASTER_LISTEN_INTERFACE=0.0.0.0 +# ANALYSIS_MASTER_LISTEN_INTERFACE=0.0.0.0:1234 +# ANALYSIS_MASTER_LISTEN_INTERFACE=127.0.0.1 +# ANALYSIS_MASTER_LISTEN_INTERFACE=127.0.0.1:1234 +# ANALYSIS_MASTER_LISTEN_INTERFACE=[::] +# ANALYSIS_MASTER_LISTEN_INTERFACE=[::]:1234 +# ANALYSIS_MASTER_LISTEN_INTERFACE=[::1] +# ANALYSIS_MASTER_LISTEN_INTERFACE=[::1]:1234 +# ANALYSIS_MASTER_LISTEN_INTERFACE=mymachine +# ANALYSIS_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 +# With factory settings, ANALYSIS_MASTER_LISTEN_INTERFACE is not +# specified. In this case, it is determined based on the value of +# REQUEST_REMOTE_ANALYSIS_SLAVES. +# - 0.0.0.0 or [::] if REQUEST_REMOTE_ANALYSIS_SLAVES=Yes +# - 127.0.0.1 or [::1] if REQUEST_REMOTE_ANALYSIS_SLAVES=No -# Parameter MASTER_USE_TLS +# Parameter ANALYSIS_MASTER_USE_TLS # # Purpose # Specifies whether analysis master<->slave sockets should use TLS. @@ -2619,8 +2837,8 @@ # - No : Plain TCP sockets will be used for communications between # analysis masters and slaves. # - unspecified : TLS sockets will be used if and only if HTTPS is -# enabled on the hub and MASTER_LISTEN_INTERFACE is not -# 127.0.0.1. (Visit the hub's Configure HTTPS +# enabled on the hub and ANALYSIS_MASTER_LISTEN_INTERFACE is not +# 127.0.0.1 ([::1] for IPv6). (Visit the hub's Configure HTTPS # [doc/html/GUI/GUI_Configure_HTTPS.html] page to view or modify # its HTTPS enabling status.) # @@ -2628,15 +2846,15 @@ # Set this to Yes if secrecy is desired. # # Two way authentication takes place regardless of the -# MASTER_USE_TLS setting, but is vulnerable to snooping when TLS is -# not used. +# ANALYSIS_MASTER_USE_TLS setting, but is vulnerable to snooping +# when TLS is not used. # # The master will generate a fresh 2048 bit RSA private key for # each master analysis process. The corresponding certificate is # provided to all slaves on startup. -# Parameter SLAVE_TIMEOUT +# Parameter ANALYSIS_SLAVE_TIMEOUT # # Purpose # The number of seconds a slave will wait for network operations @@ -2685,10 +2903,10 @@ # For more information, see the manual section on Parallelism in # CodeSonar [doc/html/Workings/Parallelism.html]. -SLAVE_TIMEOUT = 1800 +ANALYSIS_SLAVE_TIMEOUT = 1800 -# Parameter MASTER_KEEPALIVE_PERIOD +# Parameter ANALYSIS_MASTER_KEEPALIVE_PERIOD # # Purpose # Specifies how often the master will broadcast keepalive requests @@ -2722,7 +2940,173 @@ # For more information, see the manual section on Parallelism in # CodeSonar [doc/html/Workings/Parallelism.html]. -MASTER_KEEPALIVE_PERIOD = 3000 +ANALYSIS_MASTER_KEEPALIVE_PERIOD = 3000 + + +# Parameter DAEMON_MASTER_LISTEN_INTERFACE +# +# Purpose +# Specifies the address on which the daemon master process will +# listen. +# +# Type +# String of the form or : +# +# Behavior +# - If is specified and available, the daemon master will +# listen on :. +# - If is specified but unavailable, the daemon master will +# not run: the daemon will not start and requests will not be +# serviced. There will be an error message in the Analysis Log +# [doc/html/GUI/GUI_Log_Analysis.html]. +# - If is not specified, the daemon 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: +# DAEMON_MASTER_LISTEN_INTERFACE=0.0.0.0 +# DAEMON_MASTER_LISTEN_INTERFACE=0.0.0.0:1234 +# DAEMON_MASTER_LISTEN_INTERFACE=127.0.0.1 +# DAEMON_MASTER_LISTEN_INTERFACE=127.0.0.1:1234 +# DAEMON_MASTER_LISTEN_INTERFACE=[::] +# DAEMON_MASTER_LISTEN_INTERFACE=[::]:1234 +# DAEMON_MASTER_LISTEN_INTERFACE=[::1] +# DAEMON_MASTER_LISTEN_INTERFACE=[::1]:1234 +# DAEMON_MASTER_LISTEN_INTERFACE=mymachine +# DAEMON_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. +# +# With factory settings, DAEMON_MASTER_LISTEN_INTERFACE is not +# specified. In this case, it is determined based on the value of +# REQUEST_REMOTE_DAEMON_SLAVES. +# - 0.0.0.0 or [::] if REQUEST_REMOTE_DAEMON_SLAVES=Yes +# - 127.0.0.1 or [::] if REQUEST_REMOTE_DAEMON_SLAVES=No + + +# Parameter DAEMON_MASTER_USE_TLS +# +# Purpose +# Specifies whether daemon master<->slave sockets should use TLS. +# +# Type +# {Yes, No} +# +# Behavior +# - Yes : TLS sockets will be used for communications between +# analysis masters and slaves. This imposes some additional +# computational cost. +# - No : Plain TCP sockets will be used for communications between +# analysis masters and slaves. +# - unspecified : TLS sockets will be used if and only if HTTPS is +# enabled on the hub and DAEMON_MASTER_LISTEN_INTERFACE is not +# 127.0.0.1 ([::1] for IPv6). (Visit the hub's Configure HTTPS +# [doc/html/GUI/GUI_Configure_HTTPS.html] page to view or modify +# its HTTPS enabling status.) +# +# Notes +# Set this to Yes if secrecy is desired. +# +# Two way authentication takes place regardless of the +# DAEMON_MASTER_USE_TLS setting, but is vulnerable to snooping when +# TLS is not used. +# +# The master will generate a fresh 2048 bit RSA private key for +# each master analysis process. The corresponding certificate is +# provided to all slaves on startup. + + +# Parameter DAEMON_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 slave is idle for a long time). +# - 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 factory +# setting. +# +# Timing out slaves that have been idle for a long time allows +# wasted system resources to be relinquished and put to better use. +# New slaves will be started if more slaves are desired. +# +# When certain types of network errors occur, this setting can be +# important for preventing orphaned slaves from waiting +# indefinitely on a master that no longer exists. +# +# Slaves obtain this timeout setting from the analysis master. +# However, slaves use the very connection that the timeout affects +# to download the timeout setting from the master. Before the +# timeout setting has been downloaded from the master, the +# effective timeout is the one in the template.conf file in the +# slave's installation. The startup window that uses the slave's +# template.conf setting is typically short. +# +# For more information, see the manual section on Parallelism in +# CodeSonar [doc/html/Workings/Parallelism.html]. + +DAEMON_SLAVE_TIMEOUT = 1800 + + +# Parameter DAEMON_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 factory +# setting. +# +# 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]. + +DAEMON_MASTER_KEEPALIVE_PERIOD = 3000 # Parameter WARNING_FILTER @@ -2764,8 +3148,9 @@ # and is one of: # - : (substring match, case-insensitive) # - = (exact match, case-insensitive) -# - =~ (regular expression match against a Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html]) +# - =~ (regular expression match against a Boost 'POSIX Extended +# Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html]) # # Behavior # Depends on the and the s. @@ -2825,8 +3210,8 @@ # applies to warnings for which the first function is NOT in this # set. 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. +# WARNING_FILTER reachable rules but set REACHABLE_FROM_ROOTS +# [#reachable_from_roots] is empty. # - starts_in_source_libraries : whether or not the first function # in Listing XML belongs to set # CONSERVATIVELY_REACHABLE_FROM_SOURCE_LIBRARIES @@ -2965,6 +3350,7 @@ # # The following checks are enabled by default. To discard warnings # of a particular class, use the corresponding "discard" rule. +# (C and C++ warning classes) # WARNING_FILTER += discard class="Blocking in Critical Section" # WARNING_FILTER += discard class="Buffer Overrun" # WARNING_FILTER += discard class="Buffer Underrun" @@ -2986,6 +3372,7 @@ # 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="Float Division By Zero" # WARNING_FILTER += discard class="Format String Injection" # WARNING_FILTER += discard class="Format String" # WARNING_FILTER += discard class="Free Non-Heap Variable" @@ -3048,12 +3435,290 @@ # WARNING_FILTER += discard class="Use of tmpnam" # WARNING_FILTER += discard class="Useless Assignment" # WARNING_FILTER += discard class="Varargs Function Cast" +# WARNING_FILTER += discard class="sqrt on Negative Value" +# +# (Java warning classes) +# WARNING_FILTER += discard class="32 bit int shifted by an amount not in the range -31..31" +# WARNING_FILTER += discard class="A collection is added to itself" +# WARNING_FILTER += discard class="A known null value is checked to see if it is an instance of a type" +# WARNING_FILTER += discard class="A parameter is dead upon entry to a method but overwritten" +# WARNING_FILTER += discard class="A prepared statement is generated from a nonconstant String" +# WARNING_FILTER += discard class="A thread was created using the default empty run method" +# WARNING_FILTER += discard class="A volatile reference to an array doesn't treat the array elements as volatile" +# WARNING_FILTER += discard class="Absolute path traversal in servlet" +# WARNING_FILTER += discard class="An apparent infinite loop" +# WARNING_FILTER += discard class="An apparent infinite recursive loop" +# WARNING_FILTER += discard class="An increment to a volatile field isn't atomic" +# WARNING_FILTER += discard class="Apparent method/constructor confusion" +# WARNING_FILTER += discard class="Array formatted in useless way using format string" +# WARNING_FILTER += discard class="Array index is out of bounds" +# WARNING_FILTER += discard class="Array length is out of bounds" +# WARNING_FILTER += discard class="Array offset is out of bounds" +# WARNING_FILTER += discard class="Avoid Decimal Literals In Big Decimal Constructor" +# WARNING_FILTER += discard class="Avoid Thread Group" +# WARNING_FILTER += discard class="Bad attempt to compute absolute value of signed 32-bit hashcode" +# WARNING_FILTER += discard class="Bad attempt to compute absolute value of signed random integer" +# WARNING_FILTER += discard class="Bad comparison of int value with long constant" +# WARNING_FILTER += discard class="Bad comparison of nonnegative value with negative constant or zero" +# WARNING_FILTER += discard class="Bad comparison of signed byte" +# WARNING_FILTER += discard class="Bad constant value for month" +# WARNING_FILTER += discard class="Big Integer Instantiation" +# WARNING_FILTER += discard class="BigDecimal constructed from double that isn't represented precisely" +# WARNING_FILTER += discard class="Bitwise OR of signed byte value" +# WARNING_FILTER += discard class="Bitwise add of signed byte value" +# WARNING_FILTER += discard class="Boolean Instantiation" +# WARNING_FILTER += discard class="Broken Null Check" +# WARNING_FILTER += discard class="Call Super First" +# WARNING_FILTER += discard class="Call Super Last" +# WARNING_FILTER += discard class="Call to blocking method whilst holding lock" +# WARNING_FILTER += discard class="Call to equals() comparing different interface types" +# WARNING_FILTER += discard class="Call to equals() comparing different types" +# WARNING_FILTER += discard class="Call to equals() comparing unrelated class and interface" +# WARNING_FILTER += discard class="Call to equals(null)" +# WARNING_FILTER += discard class="Call to static Calendar" +# WARNING_FILTER += discard class="Call to static DateFormat" +# WARNING_FILTER += discard class="Can't use reflection to check for presence of annotation without runtime retention" +# WARNING_FILTER += discard class="Check Result Set" +# WARNING_FILTER += discard class="Check Skip Result" +# WARNING_FILTER += discard class="Check for sign of bitwise operation (high bit)" +# WARNING_FILTER += discard class="Check to see if ((...) & 0) == 0" +# WARNING_FILTER += discard class="Class Cast Exception With To Array" +# WARNING_FILTER += discard class="Class defines equal(Object), should it be equals(Object)?" +# WARNING_FILTER += discard class="Class defines field that masks a superclass field" +# WARNING_FILTER += discard class="Class defines hashcode(), should it be hashCode()?" +# WARNING_FILTER += discard class="Class defines tostring(), should it be toString()?" +# WARNING_FILTER += discard class="Class overrides a method implemented in super class Adapter wrongly" +# WARNING_FILTER += discard class="Class's readObject() method is synchronized" +# WARNING_FILTER += discard class="Class's writeObject() method is synchronized but nothing else is" +# WARNING_FILTER += discard class="Classloaders should only be created inside doPrivileged block" +# WARNING_FILTER += discard class="Clone Method Must Be Public" +# WARNING_FILTER += discard class="Clone Method Must Implement Cloneable (Clone-Implementation)" +# WARNING_FILTER += discard class="Clone Method Return Type Must Match Class Name" +# WARNING_FILTER += discard class="Clone Throws Clone Not Supported Exception" +# WARNING_FILTER += discard class="Code checks for specific values returned by compareTo" +# WARNING_FILTER += discard class="Collections should not contain themselves" +# WARNING_FILTER += discard class="Comparing values with incompatible type qualifiers" +# WARNING_FILTER += discard class="ConcurrentModificationException caught" +# WARNING_FILTER += discard class="Condition.await() not in loop" +# WARNING_FILTER += discard class="Constructor invokes Thread.start()" +# WARNING_FILTER += discard class="Covariant equals() method defined for enum" +# WARNING_FILTER += discard class="Covariant equals() method defined, Object.equals(Object) inherited" +# WARNING_FILTER += discard class="Creation of ScheduledThreadPoolExecutor with zero core threads" +# WARNING_FILTER += discard class="D'oh! A nonsensical method invocation" +# WARNING_FILTER += discard class="Dead store due to switch statement fall through to throw" +# WARNING_FILTER += discard class="Dead store due to switch statement fall through" +# WARNING_FILTER += discard class="Dead store of class literal" +# WARNING_FILTER += discard class="Deadly embrace of non-static inner class and thread local" +# WARNING_FILTER += discard class="Do Not Hard Code SD Card" +# WARNING_FILTER += discard class="Don't Call Thread Run" +# WARNING_FILTER += discard class="Don't Use Float Type For Loop Indices" +# WARNING_FILTER += discard class="Doomed attempt to append to an object output stream" +# WARNING_FILTER += discard class="Doomed test for equality to NaN" +# WARNING_FILTER += discard class="Double Checked Locking" +# WARNING_FILTER += discard class="Double.longBitsToDouble invoked on an int" +# WARNING_FILTER += discard class="Empty database password" +# WARNING_FILTER += discard class="Empty synchronized block" +# WARNING_FILTER += discard class="Enum field is public and mutable" +# WARNING_FILTER += discard class="Exception created and dropped rather than thrown" +# WARNING_FILTER += discard class="Field is a mutable Hashtable" +# WARNING_FILTER += discard class="Field is a mutable array" +# WARNING_FILTER += discard class="Field is a mutable collection which should be package protected" +# WARNING_FILTER += discard class="Field is a mutable collection" +# WARNING_FILTER += discard class="Field isn't final and can't be protected from malicious code" +# WARNING_FILTER += discard class="Field isn't final but should be refactored to be so" +# WARNING_FILTER += discard class="Field isn't final but should be" +# WARNING_FILTER += discard class="Field not guarded against concurrent access" +# WARNING_FILTER += discard class="Field only ever set to null" +# WARNING_FILTER += discard class="Field reassigned while holding a lock on its value" +# WARNING_FILTER += discard class="Field should be both final and package protected" +# WARNING_FILTER += discard class="Field should be moved out of an interface and made package protected" +# WARNING_FILTER += discard class="Field should be package protected" +# WARNING_FILTER += discard class="File.separator used for regular expression" +# WARNING_FILTER += discard class="Finalizer should be protected, not public" +# WARNING_FILTER += discard class="Format string placeholder incompatible with passed argument" +# WARNING_FILTER += discard class="Format string references missing argument" +# WARNING_FILTER += discard class="Futile attempt to change max pool size of ScheduledThreadPoolExecutor" +# WARNING_FILTER += discard class="Get/check/put used rather than putIfAbsent" +# WARNING_FILTER += discard class="HTTP Response splitting vulnerability" +# WARNING_FILTER += discard class="HTTP cookie formed from untrusted input" +# WARNING_FILTER += discard class="Hardcoded constant database password" +# WARNING_FILTER += discard class="Illegal format string" +# WARNING_FILTER += discard class="Impossible cast" +# WARNING_FILTER += discard class="Impossible downcast of toArray() result" +# WARNING_FILTER += discard class="Impossible downcast" +# WARNING_FILTER += discard class="Incompatible bitwise-and masks" +# WARNING_FILTER += discard class="Incompatible bitwise-or masks" +# WARNING_FILTER += discard class="Inconsistent collection synchronisation" +# WARNING_FILTER += discard class="Inconsistent synchronisation" +# WARNING_FILTER += discard class="Inconsistent synchronization" +# WARNING_FILTER += discard class="Incorrect combination of Math.max and Math.min" +# WARNING_FILTER += discard class="Incorrect lazy initialization and update of static field" +# WARNING_FILTER += discard class="Incorrect lazy initialization of static field" +# WARNING_FILTER += discard class="Integer multiply of result of integer remainder" +# WARNING_FILTER += discard class="Integral value cast to double and then passed to Math.ceil" +# WARNING_FILTER += discard class="Invalid syntax for regular expression" +# WARNING_FILTER += discard class="Invocation of equals() on an array, which is equivalent to ==" +# WARNING_FILTER += discard class="Invocation of hashCode on an array" +# WARNING_FILTER += discard class="Invocation of toString on an array" +# WARNING_FILTER += discard class="Invocation of toString on an unnamed array" +# WARNING_FILTER += discard class="Invokes run on a thread (did you mean to start it instead?)" +# WARNING_FILTER += discard class="JSP reflected cross site scripting vulnerability" +# WARNING_FILTER += discard class="JUnit assertion in run method will not be noticed by JUnit" +# WARNING_FILTER += discard class="Jumbled Incrementer" +# WARNING_FILTER += discard class="May expose internal representation by incorporating reference to mutable object" +# WARNING_FILTER += discard class="May expose internal representation by returning reference to mutable object" +# WARNING_FILTER += discard class="May expose internal static state by storing a mutable object into a static field" +# WARNING_FILTER += discard class="MessageFormat supplied where printf style format expected" +# WARNING_FILTER += discard class="Method assigns boolean literal in boolean expression" +# WARNING_FILTER += discard class="Method attempts to access a prepared statement parameter with index 0" +# WARNING_FILTER += discard class="Method attempts to access a result set field with index 0" +# WARNING_FILTER += discard class="Method call passes null for non-null parameter (deref all)" +# WARNING_FILTER += discard class="Method call passes null for non-null parameter" +# WARNING_FILTER += discard class="Method call passes null to a non-null parameter" +# WARNING_FILTER += discard class="Method calls Thread.sleep() with a lock held" +# WARNING_FILTER += discard class="Method defines a variable that obscures a field" +# WARNING_FILTER += discard class="Method does not check for null argument" +# WARNING_FILTER += discard class="Method does not release lock on all exception paths" +# WARNING_FILTER += discard class="Method does not release lock on all paths" +# WARNING_FILTER += discard class="Method doesn't override method in superclass due to wrong package for parameter" +# WARNING_FILTER += discard class="Method ignores return value" +# WARNING_FILTER += discard class="Method invoked that should be only be invoked inside a doPrivileged block" +# WARNING_FILTER += discard class="Method may return null, but is declared @Nonnull" +# WARNING_FILTER += discard class="Method must be private in order for serialization to work" +# WARNING_FILTER += discard class="Method relaxes nullness annotation on return value" +# WARNING_FILTER += discard class="Method spins on field" +# WARNING_FILTER += discard class="Method synchronizes on an updated field" +# WARNING_FILTER += discard class="Method tightens nullness annotation on parameter" +# WARNING_FILTER += discard class="Method with Optional return type returns explicit null" +# WARNING_FILTER += discard class="Mismatched notify()" +# WARNING_FILTER += discard class="Mismatched wait()" +# WARNING_FILTER += discard class="Misplaced Null Check" +# WARNING_FILTER += discard class="Mixed collection synchronisation" +# WARNING_FILTER += discard class="Mixed synchronisation" +# WARNING_FILTER += discard class="Monitor wait() called on Condition" +# WARNING_FILTER += discard class="More arguments are passed than are actually used in the format string" +# WARNING_FILTER += discard class="Mutable servlet field" +# WARNING_FILTER += discard class="Naked notify" +# WARNING_FILTER += discard class="No previous argument for format string" +# WARNING_FILTER += discard class="No relationship between generic parameter and method argument" +# WARNING_FILTER += discard class="Non atomic Check/Put on thread-safe collection" +# WARNING_FILTER += discard class="Non atomic use of Get/Check/Put" +# WARNING_FILTER += discard class="Non-null field is not initialized" +# WARNING_FILTER += discard class="Non-virtual method call passes null for non-null parameter" +# WARNING_FILTER += discard class="Nonconstant string passed to execute or addBatch method on an SQL statement" +# WARNING_FILTER += discard class="Nonsensical self computation involving a field (e.g., x & x)" +# WARNING_FILTER += discard class="Nonsensical self computation involving a variable (e.g., x & x)" +# WARNING_FILTER += discard class="Null pointer dereference in method on exception path" +# WARNING_FILTER += discard class="Null pointer dereference" +# WARNING_FILTER += discard class="Null value is guaranteed to be dereferenced" +# WARNING_FILTER += discard class="Nullcheck of value previously dereferenced" +# WARNING_FILTER += discard class="Override Both Equals And Hashcode" +# WARNING_FILTER += discard class="Overwritten increment" +# WARNING_FILTER += discard class="Possible bad parsing of shift operation" +# WARNING_FILTER += discard class="Possible double check of field" +# WARNING_FILTER += discard class="Possible exposure of partially initialized object" +# WARNING_FILTER += discard class="Possible null pointer dereference in method on exception path" +# WARNING_FILTER += discard class="Possible null pointer dereference" +# WARNING_FILTER += discard class="Possibly incompatible element is stored in covariant array" +# WARNING_FILTER += discard class="Primitive array passed to function expecting a variable number of object arguments" +# WARNING_FILTER += discard class="Proper Clone Implementation" +# WARNING_FILTER += discard class="Public enum method unconditionally sets its field" +# WARNING_FILTER += discard class="Public static method may expose internal representation by returning array" +# WARNING_FILTER += discard class="Random value from 0 to 1 is coerced to the integer 0" +# WARNING_FILTER += discard class="Read of unwritten field" +# WARNING_FILTER += discard class="Relative path traversal in servlet" +# WARNING_FILTER += discard class="Repeated conditional tests" +# WARNING_FILTER += discard class="Return From Finally Block" +# WARNING_FILTER += discard class="Return value of putIfAbsent ignored, value passed to putIfAbsent reused" +# WARNING_FILTER += discard class="Reversed method arguments" +# WARNING_FILTER += discard class="Self assignment of field" +# WARNING_FILTER += discard class="Self assignment of local rather than assignment to field" +# WARNING_FILTER += discard class="Self comparison of field with itself" +# WARNING_FILTER += discard class="Self comparison of value with itself" +# WARNING_FILTER += discard class="Sequence of calls to concurrent abstraction may not be atomic" +# WARNING_FILTER += discard class="Servlet reflected cross site scripting vulnerability in error page" +# WARNING_FILTER += discard class="Servlet reflected cross site scripting vulnerability" +# WARNING_FILTER += discard class="Shared non-thread-safe content" +# WARNING_FILTER += discard class="Signature declares use of unhashable class in hashed construct" +# WARNING_FILTER += discard class="Static Calendar field" +# WARNING_FILTER += discard class="Static DateFormat" +# WARNING_FILTER += discard class="Static Thread.interrupted() method invoked on thread instance" +# WARNING_FILTER += discard class="Store of null value into field annotated @Nonnull" +# WARNING_FILTER += discard class="String index is out of bounds" +# WARNING_FILTER += discard class="Suspicious reference comparison" +# WARNING_FILTER += discard class="Synchronization on Boolean" +# WARNING_FILTER += discard class="Synchronization on boxed primitive values" +# WARNING_FILTER += discard class="Synchronization on boxed primitive" +# WARNING_FILTER += discard class="Synchronization on field in futile attempt to guard that field" +# WARNING_FILTER += discard class="Synchronization on getClass rather than class literal" +# WARNING_FILTER += discard class="Synchronization on interned String" +# WARNING_FILTER += discard class="Synchronization performed on Lock" +# WARNING_FILTER += discard class="Synchronization performed on util.concurrent instance" +# WARNING_FILTER += discard class="Synchronize and null check on the same field." +# WARNING_FILTER += discard class="Synchronizing on reusable objects" +# WARNING_FILTER += discard class="TestCase declares a bad suite method" +# WARNING_FILTER += discard class="TestCase defines setUp that doesn't call super.setUp()" +# WARNING_FILTER += discard class="TestCase defines tearDown that doesn't call super.tearDown()" +# WARNING_FILTER += discard class="TestCase has no tests" +# WARNING_FILTER += discard class="TestCase implements a non-static suite method" +# WARNING_FILTER += discard class="The readResolve method must not be declared as a static method." +# WARNING_FILTER += discard class="The type of a supplied argument doesn't match format specifier" +# WARNING_FILTER += discard class="Thread-safe collection consistently guarded" +# WARNING_FILTER += discard class="Thread-safe collection replaced by potentially unsafe collection" +# WARNING_FILTER += discard class="Uncallable method defined in anonymous class" +# WARNING_FILTER += discard class="Unconditional If Statement" +# WARNING_FILTER += discard class="Unconditional wait" +# WARNING_FILTER += discard class="Uninitialized read of field in constructor" +# WARNING_FILTER += discard class="Uninitialized read of field method called from constructor of superclass" +# WARNING_FILTER += discard class="Unnecessary type check done using instanceof operator" +# WARNING_FILTER += discard class="Unneeded use of currentThread() call, to call interrupted()" +# WARNING_FILTER += discard class="Unsafe iteration over synchronised collection" +# WARNING_FILTER += discard class="Unsynchronised write to field from asynchronous callback" +# WARNING_FILTER += discard class="Unsynchronized get method, synchronized set method" +# WARNING_FILTER += discard class="Unwritten field" +# WARNING_FILTER += discard class="Use of class without a hashCode() method in a hashed data structure" +# WARNING_FILTER += discard class="Use of isLocked() and lock() rather tryLock()" +# WARNING_FILTER += discard class="Useless increment in return statement" +# WARNING_FILTER += discard class="Useless non-empty void method" +# WARNING_FILTER += discard class="Useless object created on stack" +# WARNING_FILTER += discard class="Useless object created" +# WARNING_FILTER += discard class="Useless/vacuous call to EasyMock method" +# WARNING_FILTER += discard class="Using monitor style wait methods on util.concurrent abstraction" +# WARNING_FILTER += discard class="Using notify() rather than notifyAll()" +# WARNING_FILTER += discard class="Using pointer equality to compare different types" +# WARNING_FILTER += discard class="Vacuous call to collections" +# WARNING_FILTER += discard class="Value annotated as carrying a type qualifier used where a value that must not carry that qualifier is required" +# WARNING_FILTER += discard class="Value annotated as never carrying a type qualifier used where value carrying that qualifier is required" +# WARNING_FILTER += discard class="Value is null and guaranteed to be dereferenced on exception path" +# WARNING_FILTER += discard class="Value that might carry a type qualifier is always used in a way prohibits it from having that type qualifier" +# WARNING_FILTER += discard class="Value that might not carry a type qualifier is always used in a way requires that type qualifier" +# WARNING_FILTER += discard class="Value without a type qualifier used where a value is required to have that qualifier" +# WARNING_FILTER += discard class="Very confusing method names" +# WARNING_FILTER += discard class="Volatile field could be made final" +# WARNING_FILTER += discard class="Wait not in loop" +# WARNING_FILTER += discard class="Wait with two locks held" +# WARNING_FILTER += discard class="\".\" or \"|\" used for regular expression" +# WARNING_FILTER += discard class="close() invoked on a value that is always null" +# WARNING_FILTER += discard class="compareTo()/compare() incorrectly handles float or double value" +# WARNING_FILTER += discard class="equals method always returns false" +# WARNING_FILTER += discard class="equals method always returns true" +# WARNING_FILTER += discard class="equals method compares class names rather than class objects" +# WARNING_FILTER += discard class="equals method overrides equals in superclass and may not be symmetric" +# WARNING_FILTER += discard class="equals() method defined that doesn't override Object.equals(Object)" +# WARNING_FILTER += discard class="equals() method defined that doesn't override equals(Object)" +# WARNING_FILTER += discard class="equals() used to compare array and nonarray" +# WARNING_FILTER += discard class="equals(...) used to compare incompatible arrays" +# WARNING_FILTER += discard class="hasNext method invokes next" +# WARNING_FILTER += discard class="instanceof will always return false" +# WARNING_FILTER += discard class="int value cast to float and then passed to Math.round" +# WARNING_FILTER += discard class="int value converted to long and used as absolute time" # # The following checks are disabled by default. To enable checks # for a particular class, use the corresponding "allow" rule. # (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.) +# (C and C++ warning classes) # WARNING_FILTER += allow class="## Follows # Operator" # WARNING_FILTER += allow class="/* in Comment" # WARNING_FILTER += allow class="// in Comment" @@ -3124,10 +3789,12 @@ # 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 Assembly Code" # WARNING_FILTER += allow class="Inline Function Not static" # WARNING_FILTER += allow class="Invalid Preprocessor Directive" # WARNING_FILTER += allow class="Label Not In Enclosing Block" # WARNING_FILTER += allow class="Leftover Debug Code" +# WARNING_FILTER += allow class="Library Function Override" # WARNING_FILTER += allow class="Line Splicing in Comment" # WARNING_FILTER += allow class="Lock/Unlock Mismatch" # WARNING_FILTER += allow class="Locked Twice" @@ -3204,6 +3871,8 @@ # 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="Possible Anti-Debugging" +# WARNING_FILTER += allow class="Potential Timebomb" # WARNING_FILTER += allow class="Potential Unbounded Loop" # WARNING_FILTER += allow class="Preprocessing Directives in Macro Argument" # WARNING_FILTER += allow class="Recursion" @@ -3250,6 +3919,10 @@ # WARNING_FILTER += allow class="Unreachable Control Flow" # WARNING_FILTER += allow class="Unspecified Array Size with Designator Initialization" # WARNING_FILTER += allow class="Unterminated Escape Sequence" +# WARNING_FILTER += allow class="Untrusted Library Load" +# WARNING_FILTER += allow class="Untrusted Network Host" +# WARNING_FILTER += allow class="Untrusted Network Port" +# WARNING_FILTER += allow class="Untrusted Process Creation" # WARNING_FILTER += allow class="Unused Label" # WARNING_FILTER += allow class="Unused Macro" # WARNING_FILTER += allow class="Unused Parameter" @@ -3331,7 +4004,479 @@ # WARNING_FILTER += allow class="Use of vfork" # WARNING_FILTER += allow class="Variadic Macro" # WARNING_FILTER += allow class="Warnings Not Treated As Errors" +# WARNING_FILTER += allow class="Weak Cryptography" # WARNING_FILTER += allow class="Write to Read Only File" +# WARNING_FILTER += allow class="chroot without chdir" +# +# (Java warning classes) +# WARNING_FILTER += allow class="Abstract Class Without Abstract Method" +# WARNING_FILTER += allow class="Abstract Class Without Any Method" +# WARNING_FILTER += allow class="Abstract Naming" +# WARNING_FILTER += allow class="Abstract class defines covariant compareTo() method" +# WARNING_FILTER += allow class="Abstract class defines covariant equals() method" +# WARNING_FILTER += allow class="Accessor Class Generation" +# WARNING_FILTER += allow class="Add Empty String" +# WARNING_FILTER += allow class="Adding elements of an entry set may fail due to reuse of Entry objects" +# WARNING_FILTER += allow class="Append Character With Char" +# WARNING_FILTER += allow class="Array Is Stored Directly" +# WARNING_FILTER += allow class="Assignment In Operand" +# WARNING_FILTER += allow class="Assignment To Non Final Static" +# WARNING_FILTER += allow class="At Least One Constructor" +# WARNING_FILTER += allow class="Avoid Accessibility Alteration" +# WARNING_FILTER += allow class="Avoid Array Loops" +# WARNING_FILTER += allow class="Avoid Assert As Identifier" +# WARNING_FILTER += allow class="Avoid Branching Statement As Last In Loop" +# WARNING_FILTER += allow class="Avoid Calling Finalize" +# WARNING_FILTER += allow class="Avoid Catching Generic Exception" +# WARNING_FILTER += allow class="Avoid Catching NPE" +# WARNING_FILTER += allow class="Avoid Catching Throwable" +# WARNING_FILTER += allow class="Avoid Constants Interface" +# WARNING_FILTER += allow class="Avoid Deeply Nested If Stmts" +# WARNING_FILTER += allow class="Avoid Dollar Signs" +# WARNING_FILTER += allow class="Avoid Duplicate Literals" +# WARNING_FILTER += allow class="Avoid Enum As Identifier" +# WARNING_FILTER += allow class="Avoid Field Name Matching Method Name" +# WARNING_FILTER += allow class="Avoid Field Name Matching Type Name" +# WARNING_FILTER += allow class="Avoid Final Local Variable" +# WARNING_FILTER += allow class="Avoid Instanceof Checks In Catch Clause" +# WARNING_FILTER += allow class="Avoid Instantiating Objects In Loops" +# WARNING_FILTER += allow class="Avoid Literals In If Condition" +# WARNING_FILTER += allow class="Avoid Losing Exception Information" +# WARNING_FILTER += allow class="Avoid Multiple Unary Operators" +# WARNING_FILTER += allow class="Avoid Prefixing Method Parameters" +# WARNING_FILTER += allow class="Avoid Protected Field In Final Class" +# WARNING_FILTER += allow class="Avoid Protected Method In Final Class Not Extending" +# WARNING_FILTER += allow class="Avoid Reassigning Parameters" +# WARNING_FILTER += allow class="Avoid Rethrowing Exception" +# WARNING_FILTER += allow class="Avoid String Buffer Field" +# WARNING_FILTER += allow class="Avoid Synchronized At Method Level" +# WARNING_FILTER += allow class="Avoid Throwing New Instance Of Same Exception" +# WARNING_FILTER += allow class="Avoid Throwing Null Pointer Exception" +# WARNING_FILTER += allow class="Avoid Throwing Raw Exception Types" +# WARNING_FILTER += allow class="Avoid Using Hard Coded IP" +# WARNING_FILTER += allow class="Avoid Using Native Code" +# WARNING_FILTER += allow class="Avoid Using Octal Values" +# WARNING_FILTER += allow class="Avoid Using Short Type" +# WARNING_FILTER += allow class="Avoid Using Volatile" +# WARNING_FILTER += allow class="Avoid printStackTrace" +# WARNING_FILTER += allow class="Bad Comparison" +# WARNING_FILTER += allow class="Bean Members Should Serialize" +# WARNING_FILTER += allow class="Boolean Get Method Name" +# WARNING_FILTER += allow class="Boolean Inversion" +# WARNING_FILTER += allow class="Boxed value is unboxed and then immediately reboxed" +# WARNING_FILTER += allow class="Boxing a primitive to compare" +# WARNING_FILTER += allow class="Boxing/unboxing to parse a primitive" +# WARNING_FILTER += allow class="Byte Instantiation" +# WARNING_FILTER += allow class="Call Super In Constructor" +# WARNING_FILTER += allow class="Certain swing methods needs to be invoked in Swing thread" +# WARNING_FILTER += allow class="Check for oddness that won't work for negative numbers" +# WARNING_FILTER += allow class="Check for sign of bitwise operation" +# WARNING_FILTER += allow class="Class Naming Conventions" +# WARNING_FILTER += allow class="Class With Only Private Constructors Should Be Final" +# WARNING_FILTER += allow class="Class defines clone() but doesn't implement Cloneable" +# WARNING_FILTER += allow class="Class defines compareTo(...) and uses Object.equals()" +# WARNING_FILTER += allow class="Class defines equals() and uses Object.hashCode()" +# WARNING_FILTER += allow class="Class defines equals() but not hashCode()" +# WARNING_FILTER += allow class="Class defines hashCode() and uses Object.equals()" +# WARNING_FILTER += allow class="Class defines hashCode() but not equals()" +# WARNING_FILTER += allow class="Class doesn't override equals in superclass" +# WARNING_FILTER += allow class="Class extends Servlet class and uses instance variables" +# WARNING_FILTER += allow class="Class extends Struts Action class and uses instance variables" +# WARNING_FILTER += allow class="Class implements Cloneable but does not define or use clone method" +# WARNING_FILTER += allow class="Class implements same interface as superclass" +# WARNING_FILTER += allow class="Class inherits equals() and uses Object.hashCode()" +# WARNING_FILTER += allow class="Class is Externalizable but doesn't define a void constructor" +# WARNING_FILTER += allow class="Class is Serializable but its superclass doesn't define a void constructor" +# WARNING_FILTER += allow class="Class is Serializable, but doesn't define serialVersionUID" +# WARNING_FILTER += allow class="Class is final but declares protected field" +# WARNING_FILTER += allow class="Class is not derived from an Exception, even though it is named as such" +# WARNING_FILTER += allow class="Class names should start with an upper case letter" +# WARNING_FILTER += allow class="Class names shouldn't shadow simple name of implemented interface" +# WARNING_FILTER += allow class="Class names shouldn't shadow simple name of superclass" +# WARNING_FILTER += allow class="Clone Method Must Implement Cloneable" +# WARNING_FILTER += allow class="Clone method may return null" +# WARNING_FILTER += allow class="Close Resource" +# WARNING_FILTER += allow class="Code contains a hard coded reference to an absolute pathname" +# WARNING_FILTER += allow class="Collapsible If Statements" +# WARNING_FILTER += allow class="Comment Content" +# WARNING_FILTER += allow class="Comment Default Access Modifier" +# WARNING_FILTER += allow class="Comment Required" +# WARNING_FILTER += allow class="Comment Size" +# WARNING_FILTER += allow class="Comparator doesn't implement Serializable" +# WARNING_FILTER += allow class="Compare Objects With Equals" +# WARNING_FILTER += allow class="Comparison of String objects using == or !=" +# WARNING_FILTER += allow class="Comparison of String parameter using == or !=" +# WARNING_FILTER += allow class="Complicated, subtle or wrong increment in for-loop" +# WARNING_FILTER += allow class="Computation of average could overflow" +# WARNING_FILTER += allow class="Condition has no effect due to the variable type" +# WARNING_FILTER += allow class="Condition has no effect" +# WARNING_FILTER += allow class="Confusing Ternary" +# WARNING_FILTER += allow class="Confusing method names" +# WARNING_FILTER += allow class="Consecutive Appends Should Reuse" +# WARNING_FILTER += allow class="Consecutive Literal Appends" +# WARNING_FILTER += allow class="Consider returning a zero length array rather than null" +# WARNING_FILTER += allow class="Consider using Locale parameterized version of invoked method" +# WARNING_FILTER += allow class="Constructor Calls Overridable Method" +# WARNING_FILTER += allow class="Could be refactored into a named static inner class" +# WARNING_FILTER += allow class="Could be refactored into a static inner class" +# WARNING_FILTER += allow class="Coupling Between Objects" +# WARNING_FILTER += allow class="Covariant array assignment to a field" +# WARNING_FILTER += allow class="Covariant array assignment to a local variable" +# WARNING_FILTER += allow class="Covariant array is returned from the method" +# WARNING_FILTER += allow class="Covariant compareTo() method defined" +# WARNING_FILTER += allow class="Covariant equals() method defined" +# WARNING_FILTER += allow class="Creates an empty jar file entry" +# WARNING_FILTER += allow class="Creates an empty zip file entry" +# WARNING_FILTER += allow class="Cyclomatic Complexity" +# WARNING_FILTER += allow class="Dataflow Anomaly Analysis" +# WARNING_FILTER += allow class="Dead store of null to local variable" +# WARNING_FILTER += allow class="Dead store to local variable that shadows field" +# WARNING_FILTER += allow class="Dead store to local variable" +# WARNING_FILTER += allow class="Default Label Not Last In Switch Stmt" +# WARNING_FILTER += allow class="Default Package" +# WARNING_FILTER += allow class="Dereference of the result of readLine() without nullcheck" +# WARNING_FILTER += allow class="Do Not Call Garbage Collection Explicitly" +# WARNING_FILTER += allow class="Do Not Call System Exit" +# WARNING_FILTER += allow class="Do Not Extend Java Lang Error" +# WARNING_FILTER += allow class="Do Not Throw Exception In Finally" +# WARNING_FILTER += allow class="Do Not Use Threads" +# WARNING_FILTER += allow class="Don't Import Java Lang" +# WARNING_FILTER += allow class="Don't Import Sun" +# WARNING_FILTER += allow class="Don't reuse entry objects in iterators" +# WARNING_FILTER += allow class="Don't use removeAll to clear a collection" +# WARNING_FILTER += allow class="Double assignment of field" +# WARNING_FILTER += allow class="Double assignment of local variable" +# WARNING_FILTER += allow class="Dubious catching of IllegalMonitorStateException" +# WARNING_FILTER += allow class="Duplicate Imports" +# WARNING_FILTER += allow class="Empty Catch Block" +# WARNING_FILTER += allow class="Empty Finalizer" +# WARNING_FILTER += allow class="Empty Finally Block" +# WARNING_FILTER += allow class="Empty If Stmt" +# WARNING_FILTER += allow class="Empty Initializer" +# WARNING_FILTER += allow class="Empty Method In Abstract Class Should Be Abstract" +# WARNING_FILTER += allow class="Empty Statement Block" +# WARNING_FILTER += allow class="Empty Statement Not In Loop" +# WARNING_FILTER += allow class="Empty Static Initializer" +# WARNING_FILTER += allow class="Empty Switch Statements" +# WARNING_FILTER += allow class="Empty Synchronized Block" +# WARNING_FILTER += allow class="Empty Try Block" +# WARNING_FILTER += allow class="Empty While Stmt" +# WARNING_FILTER += allow class="Empty finalizer should be deleted" +# WARNING_FILTER += allow class="Equals Null" +# WARNING_FILTER += allow class="Equals checks for incompatible operand" +# WARNING_FILTER += allow class="Equals method should not assume anything about the type of its argument" +# WARNING_FILTER += allow class="Exception As Flow Control" +# WARNING_FILTER += allow class="Exception is caught when Exception is not thrown" +# WARNING_FILTER += allow class="Excessive Class Length" +# WARNING_FILTER += allow class="Excessive Imports" +# WARNING_FILTER += allow class="Excessive Method Length" +# WARNING_FILTER += allow class="Excessive Parameter List" +# WARNING_FILTER += allow class="Excessive Public Count" +# WARNING_FILTER += allow class="Explicit garbage collection; extremely dubious except in benchmarking code" +# WARNING_FILTER += allow class="Explicit invocation of finalizer" +# WARNING_FILTER += allow class="Extends Object" +# WARNING_FILTER += allow class="Field Declarations Should Be At Start Of Class" +# WARNING_FILTER += allow class="Field names should start with a lower case letter" +# WARNING_FILTER += allow class="Field not initialized in constructor but dereferenced without null check" +# WARNING_FILTER += allow class="Fields of immutable classes should be final" +# WARNING_FILTER += allow class="Final Field Could Be Static" +# WARNING_FILTER += allow class="Finalize Does Not Call Super Finalize" +# WARNING_FILTER += allow class="Finalize Only Calls Super Finalize" +# WARNING_FILTER += allow class="Finalize Overloaded" +# WARNING_FILTER += allow class="Finalize Should Be Protected" +# WARNING_FILTER += allow class="Finalizer does not call superclass finalizer" +# WARNING_FILTER += allow class="Finalizer does nothing but call superclass finalizer" +# WARNING_FILTER += allow class="Finalizer nullifies superclass finalizer" +# WARNING_FILTER += allow class="Finalizer nulls fields" +# WARNING_FILTER += allow class="Finalizer only nulls fields" +# WARNING_FILTER += allow class="For Loop Should Be While Loop" +# WARNING_FILTER += allow class="For Loops Must Use Braces" +# WARNING_FILTER += allow class="Format string should use %n rather than \\n" +# WARNING_FILTER += allow class="Generics Naming" +# WARNING_FILTER += allow class="God Class" +# WARNING_FILTER += allow class="Guard Debug Logging" +# WARNING_FILTER += allow class="Guard Log Statement Java Util" +# WARNING_FILTER += allow class="Guard Log Statement" +# WARNING_FILTER += allow class="Huge string constants is duplicated across multiple class files" +# WARNING_FILTER += allow class="Idempotent Operations" +# WARNING_FILTER += allow class="If Else Stmts Must Use Braces" +# WARNING_FILTER += allow class="If Stmts Must Use Braces" +# WARNING_FILTER += allow class="Immediate dereference of the result of readLine()" +# WARNING_FILTER += allow class="Immutable Field" +# WARNING_FILTER += allow class="Import From Same Package" +# WARNING_FILTER += allow class="Inefficient Empty String Check" +# WARNING_FILTER += allow class="Inefficient String Buffering" +# WARNING_FILTER += allow class="Inefficient use of String.indexOf(String)" +# WARNING_FILTER += allow class="Inefficient use of String.lastIndexOf(String)" +# WARNING_FILTER += allow class="Inefficient use of keySet iterator instead of entrySet iterator" +# WARNING_FILTER += allow class="Initialization circularity" +# WARNING_FILTER += allow class="Instantiation To Get Class" +# WARNING_FILTER += allow class="Insufficient String Buffer Declaration" +# WARNING_FILTER += allow class="Integer Instantiation" +# WARNING_FILTER += allow class="Integer remainder modulo 1" +# WARNING_FILTER += allow class="Integral division result cast to double or float" +# WARNING_FILTER += allow class="Invocation of substring(0), which returns the original value" +# WARNING_FILTER += allow class="Iterator next() method can't throw NoSuchElementException" +# WARNING_FILTER += allow class="JUnit Assertions Should Include Message" +# WARNING_FILTER += allow class="JUnit Spelling" +# WARNING_FILTER += allow class="JUnit Static Suite" +# WARNING_FILTER += allow class="JUnit Test Contains Too Many Asserts" +# WARNING_FILTER += allow class="JUnit Tests Should Include Assert" +# WARNING_FILTER += allow class="JUnit Use Expected" +# WARNING_FILTER += allow class="JUnit4 Suites Should Use Suite Annotation" +# WARNING_FILTER += allow class="JUnit4 Test Should Use After Annotation" +# WARNING_FILTER += allow class="JUnit4 Test Should Use Before Annotation" +# WARNING_FILTER += allow class="JUnit4 Test Should Use Test Annotation" +# WARNING_FILTER += allow class="Law Of Demeter" +# WARNING_FILTER += allow class="Load of known null value" +# WARNING_FILTER += allow class="Local Home Naming Convention" +# WARNING_FILTER += allow class="Local Interface Session Naming Convention" +# WARNING_FILTER += allow class="Local Variable Could Be Final" +# WARNING_FILTER += allow class="Logger Is Not Static Final" +# WARNING_FILTER += allow class="Logic Inversion" +# WARNING_FILTER += allow class="Long Instantiation" +# WARNING_FILTER += allow class="Long Variable" +# WARNING_FILTER += allow class="Loose Coupling (Coupling)" +# WARNING_FILTER += allow class="Loose Coupling" +# WARNING_FILTER += allow class="Loose Package Coupling" +# WARNING_FILTER += allow class="MDB And Session Bean Naming Convention" +# WARNING_FILTER += allow class="Maps and sets of URLs can be performance hogs" +# WARNING_FILTER += allow class="Method Argument Could Be Final" +# WARNING_FILTER += allow class="Method Naming Conventions" +# WARNING_FILTER += allow class="Method Returns Internal Array" +# WARNING_FILTER += allow class="Method With Same Name As Enclosing Class" +# WARNING_FILTER += allow class="Method allocates a boxed primitive just to call toString" +# WARNING_FILTER += allow class="Method allocates an object, only to get the class object" +# WARNING_FILTER += allow class="Method calls Pattern.compile in a loop" +# WARNING_FILTER += allow class="Method calls prepareStatement in a loop" +# WARNING_FILTER += allow class="Method calls static Math class method on a constant value" +# WARNING_FILTER += allow class="Method checks to see if result of String.indexOf is positive" +# WARNING_FILTER += allow class="Method compiles the regular expression in a loop" +# WARNING_FILTER += allow class="Method concatenates strings using + in a loop" +# WARNING_FILTER += allow class="Method directly allocates a specific implementation of xml interfaces" +# WARNING_FILTER += allow class="Method discards result of readLine after checking if it is non-null" +# WARNING_FILTER += allow class="Method doesn't override method in superclass due to wrong package for parameter (intentional)" +# WARNING_FILTER += allow class="Method ignores exceptional return value" +# WARNING_FILTER += allow class="Method ignores results of InputStream.read()" +# WARNING_FILTER += allow class="Method ignores results of InputStream.skip()" +# WARNING_FILTER += allow class="Method ignores return value, is this OK?" +# WARNING_FILTER += allow class="Method invokes System.exit(...)" +# WARNING_FILTER += allow class="Method invokes dangerous method runFinalizersOnExit" +# WARNING_FILTER += allow class="Method invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead" +# WARNING_FILTER += allow class="Method invokes inefficient Number constructor; use static valueOf instead" +# WARNING_FILTER += allow class="Method invokes inefficient floating-point Number constructor; use static valueOf instead" +# WARNING_FILTER += allow class="Method invokes inefficient new String() constructor" +# WARNING_FILTER += allow class="Method invokes inefficient new String(String) constructor" +# WARNING_FILTER += allow class="Method invokes toString() method on a String" +# WARNING_FILTER += allow class="Method may fail to clean up stream or resource on checked exception" +# WARNING_FILTER += allow class="Method may fail to clean up stream or resource" +# WARNING_FILTER += allow class="Method may fail to close database resource on exception" +# WARNING_FILTER += allow class="Method may fail to close database resource" +# WARNING_FILTER += allow class="Method may fail to close stream on exception" +# WARNING_FILTER += allow class="Method may fail to close stream" +# WARNING_FILTER += allow class="Method might drop exception" +# WARNING_FILTER += allow class="Method might ignore exception" +# WARNING_FILTER += allow class="Method names should start with a lower case letter" +# WARNING_FILTER += allow class="Method uses the same code for two branches" +# WARNING_FILTER += allow class="Method uses the same code for two switch clauses" +# WARNING_FILTER += allow class="Method uses toArray() with zero-length array argument" +# WARNING_FILTER += allow class="Method with Boolean return type returns explicit null" +# WARNING_FILTER += allow class="Misleading Variable Name" +# WARNING_FILTER += allow class="Missing Break In Switch" +# WARNING_FILTER += allow class="Missing Static Method In Non Instantiatable Class" +# WARNING_FILTER += allow class="Missing serialVersionUID" +# WARNING_FILTER += allow class="Modified Cyclomatic Complexity" +# WARNING_FILTER += allow class="More Than One Logger" +# WARNING_FILTER += allow class="NPath Complexity" +# WARNING_FILTER += allow class="Ncss Constructor Count" +# WARNING_FILTER += allow class="Ncss Method Count" +# WARNING_FILTER += allow class="Ncss Type Count" +# WARNING_FILTER += allow class="Needless instantiation of class that only supplies static methods" +# WARNING_FILTER += allow class="Negating the result of compareTo()/compare()" +# WARNING_FILTER += allow class="No Package" +# WARNING_FILTER += allow class="NodeList.getLength() called in a loop" +# WARNING_FILTER += allow class="Non Case Label In Switch Statement" +# WARNING_FILTER += allow class="Non Static Initializer" +# WARNING_FILTER += allow class="Non Thread Safe Singleton" +# WARNING_FILTER += allow class="Non serializable object written to ObjectOutput" +# WARNING_FILTER += allow class="Non-Boolean argument formatted using %b format specifier" +# WARNING_FILTER += allow class="Non-serializable class has a serializable inner class" +# WARNING_FILTER += allow class="Non-serializable value stored into instance field of a serializable class" +# WARNING_FILTER += allow class="Non-transient non-serializable instance field in serializable class" +# WARNING_FILTER += allow class="Null Assignment" +# WARNING_FILTER += allow class="One Declaration Per Line" +# WARNING_FILTER += allow class="Only One Return" +# WARNING_FILTER += allow class="Optimizable To Array Call" +# WARNING_FILTER += allow class="Package Case" +# WARNING_FILTER += allow class="Parameter must be non-null but is marked as nullable" +# WARNING_FILTER += allow class="Position Literals First In Case Insensitive Comparisons" +# WARNING_FILTER += allow class="Position Literals First In Comparisons" +# WARNING_FILTER += allow class="Possible null pointer dereference due to return value of called method" +# WARNING_FILTER += allow class="Possible null pointer dereference on branch that might be infeasible" +# WARNING_FILTER += allow class="Potential lost logger changes due to weak reference in OpenJDK" +# WARNING_FILTER += allow class="Potentially ambiguous invocation of either an inherited or outer method" +# WARNING_FILTER += allow class="Potentially dangerous use of non-short-circuit logic" +# WARNING_FILTER += allow class="Premature Declaration" +# WARNING_FILTER += allow class="Preserve Stack Trace" +# WARNING_FILTER += allow class="Primitive value is boxed and then immediately unboxed" +# WARNING_FILTER += allow class="Primitive value is boxed then unboxed to perform primitive coercion" +# WARNING_FILTER += allow class="Primitive value is unboxed and coerced for ternary operator" +# WARNING_FILTER += allow class="Private method is never called" +# WARNING_FILTER += allow class="Private readResolve method not inherited by subclasses" +# WARNING_FILTER += allow class="Proper Logger" +# WARNING_FILTER += allow class="Questionable cast to abstract collection" +# WARNING_FILTER += allow class="Questionable cast to concrete collection" +# WARNING_FILTER += allow class="Questionable use of non-short-circuit logic" +# WARNING_FILTER += allow class="Random object created and used only once" +# WARNING_FILTER += allow class="Read of unwritten public or protected field" +# WARNING_FILTER += allow class="Redundant Field Initializer" +# WARNING_FILTER += allow class="Redundant comparison of non-null value to null" +# WARNING_FILTER += allow class="Redundant comparison of two null values" +# WARNING_FILTER += allow class="Redundant nullcheck of value known to be non-null" +# WARNING_FILTER += allow class="Redundant nullcheck of value known to be null" +# WARNING_FILTER += allow class="Reliance on default encoding" +# WARNING_FILTER += allow class="Remainder of 32-bit signed random integer" +# WARNING_FILTER += allow class="Remainder of hashCode could be negative" +# WARNING_FILTER += allow class="Remote Interface Naming Convention" +# WARNING_FILTER += allow class="Remote Session Interface Naming Convention" +# WARNING_FILTER += allow class="Replace Enumeration With Iterator" +# WARNING_FILTER += allow class="Replace Hashtable With Map" +# WARNING_FILTER += allow class="Replace Vector With List" +# WARNING_FILTER += allow class="Result of integer multiplication cast to long" +# WARNING_FILTER += allow class="Return Empty Array Rather Than Null" +# WARNING_FILTER += allow class="Return value of method without side effect is ignored" +# WARNING_FILTER += allow class="Rough value of known constant found" +# WARNING_FILTER += allow class="Self assignment of local variable" +# WARNING_FILTER += allow class="Serializable inner class" +# WARNING_FILTER += allow class="Short Class Name" +# WARNING_FILTER += allow class="Short Instantiation" +# WARNING_FILTER += allow class="Short Method Name" +# WARNING_FILTER += allow class="Short Variable" +# WARNING_FILTER += allow class="Should be a static inner class" +# WARNING_FILTER += allow class="Signature Declare Throws Exception (Strict-Exceptions)" +# WARNING_FILTER += allow class="Signature Declare Throws Exception" +# WARNING_FILTER += allow class="Simple Date Format Needs Locale" +# WARNING_FILTER += allow class="Simplified Ternary" +# WARNING_FILTER += allow class="Simplify Boolean Assertion" +# WARNING_FILTER += allow class="Simplify Boolean Expressions" +# WARNING_FILTER += allow class="Simplify Boolean Returns" +# WARNING_FILTER += allow class="Simplify Conditional" +# WARNING_FILTER += allow class="Simplify startsWith" +# WARNING_FILTER += allow class="Single Method Singleton" +# WARNING_FILTER += allow class="Singleton Class Returning New Instance" +# WARNING_FILTER += allow class="Singular Field" +# WARNING_FILTER += allow class="Static EJB Field Should Be Final" +# WARNING_FILTER += allow class="Static initializer creates instance before all static final fields assigned" +# WARNING_FILTER += allow class="Std Cyclomatic Complexity" +# WARNING_FILTER += allow class="Store of non serializable object into HttpSession" +# WARNING_FILTER += allow class="String Buffer Instantiation With Char" +# WARNING_FILTER += allow class="String Instantiation" +# WARNING_FILTER += allow class="String To String" +# WARNING_FILTER += allow class="Superclass uses subclass during initialization" +# WARNING_FILTER += allow class="Suspicious Constant Field Name" +# WARNING_FILTER += allow class="Suspicious Equals Method Name" +# WARNING_FILTER += allow class="Suspicious Hashcode Method Name" +# WARNING_FILTER += allow class="Suspicious Octal Escape" +# WARNING_FILTER += allow class="Suspicious reference comparison of Boolean values" +# WARNING_FILTER += allow class="Suspicious reference comparison to constant" +# WARNING_FILTER += allow class="Switch Density" +# WARNING_FILTER += allow class="Switch Stmts Should Have Default" +# WARNING_FILTER += allow class="Switch statement found where default case is missing" +# WARNING_FILTER += allow class="Switch statement found where one case falls through to the next case" +# WARNING_FILTER += allow class="System println" +# WARNING_FILTER += allow class="Test Class Without Test Cases" +# WARNING_FILTER += allow class="Test for floating point equality" +# WARNING_FILTER += allow class="The equals and hashCode methods of URL are blocking" +# WARNING_FILTER += allow class="The readResolve method must be declared with a return type of Object." +# WARNING_FILTER += allow class="Thread passed where Runnable expected" +# WARNING_FILTER += allow class="Too Few Branches For A Switch Statement" +# WARNING_FILTER += allow class="Too Many Fields" +# WARNING_FILTER += allow class="Too Many Methods" +# WARNING_FILTER += allow class="Too Many Static Imports" +# WARNING_FILTER += allow class="Transient field of class that isn't Serializable." +# WARNING_FILTER += allow class="Transient field that isn't set by deserialization." +# WARNING_FILTER += allow class="Unchecked type in generic call" +# WARNING_FILTER += allow class="Unchecked/unconfirmed cast of return value from method" +# WARNING_FILTER += allow class="Unchecked/unconfirmed cast" +# WARNING_FILTER += allow class="Uncommented Empty Constructor" +# WARNING_FILTER += allow class="Uncommented Empty Method Body" +# WARNING_FILTER += allow class="Uncommented Empty Method" +# WARNING_FILTER += allow class="Unnecessary Boolean Assertion" +# WARNING_FILTER += allow class="Unnecessary Case Change" +# WARNING_FILTER += allow class="Unnecessary Constructor" +# WARNING_FILTER += allow class="Unnecessary Conversion Temporary" +# WARNING_FILTER += allow class="Unnecessary Final Modifier" +# WARNING_FILTER += allow class="Unnecessary Fully Qualified Name" +# WARNING_FILTER += allow class="Unnecessary Local Before Return" +# WARNING_FILTER += allow class="Unnecessary Parentheses" +# WARNING_FILTER += allow class="Unnecessary Return" +# WARNING_FILTER += allow class="Unnecessary Wrapper Object Creation" +# WARNING_FILTER += allow class="Unread field" +# WARNING_FILTER += allow class="Unread field: should this field be static?" +# WARNING_FILTER += allow class="Unread public/protected field" +# WARNING_FILTER += allow class="Unsigned right shift cast to short/byte" +# WARNING_FILTER += allow class="Unsynchronized Static Date Formatter" +# WARNING_FILTER += allow class="Unused Formal Parameter" +# WARNING_FILTER += allow class="Unused Imports (type resolution)" +# WARNING_FILTER += allow class="Unused Imports" +# WARNING_FILTER += allow class="Unused Local Variable" +# WARNING_FILTER += allow class="Unused Modifier" +# WARNING_FILTER += allow class="Unused Null Check In Equals" +# WARNING_FILTER += allow class="Unused Private Field" +# WARNING_FILTER += allow class="Unused Private Method" +# WARNING_FILTER += allow class="Unused field" +# WARNING_FILTER += allow class="Unused public or protected field" +# WARNING_FILTER += allow class="Unusual equals method" +# WARNING_FILTER += allow class="Unwritten public or protected field" +# WARNING_FILTER += allow class="Usage of GetResource may be unsafe if class is extended" +# WARNING_FILTER += allow class="Use Array List Instead Of Vector" +# WARNING_FILTER += allow class="Use Arrays As List" +# WARNING_FILTER += allow class="Use Assert Equals Instead Of Assert True" +# WARNING_FILTER += allow class="Use Assert Null Instead Of Assert True" +# WARNING_FILTER += allow class="Use Assert Same Instead Of Assert True" +# WARNING_FILTER += allow class="Use Assert True Instead Of Assert Equals" +# WARNING_FILTER += allow class="Use Collection Is Empty" +# WARNING_FILTER += allow class="Use Concurrent Hash Map" +# WARNING_FILTER += allow class="Use Correct Exception Logging" +# WARNING_FILTER += allow class="Use Equals To Compare Strings" +# WARNING_FILTER += allow class="Use Index Of Char" +# WARNING_FILTER += allow class="Use Locale With Case Conversions" +# WARNING_FILTER += allow class="Use Notify All Instead Of Notify" +# WARNING_FILTER += allow class="Use Object For Clearer API" +# WARNING_FILTER += allow class="Use Proper Class Loader" +# WARNING_FILTER += allow class="Use Singleton" +# WARNING_FILTER += allow class="Use String Buffer For String Appends" +# WARNING_FILTER += allow class="Use String Buffer Length" +# WARNING_FILTER += allow class="Use Utility Class" +# WARNING_FILTER += allow class="Use Varargs" +# WARNING_FILTER += allow class="Use of identifier that is a keyword in later versions of Java" +# WARNING_FILTER += allow class="Use of member identifier that is a keyword in later versions of Java" +# WARNING_FILTER += allow class="Use the nextInt method of Random rather than nextDouble to generate a random integer" +# WARNING_FILTER += allow class="Useless Operation On Immutable" +# WARNING_FILTER += allow class="Useless Overriding Method" +# WARNING_FILTER += allow class="Useless Parentheses" +# WARNING_FILTER += allow class="Useless Qualified This" +# WARNING_FILTER += allow class="Useless String valueOf" +# WARNING_FILTER += allow class="Useless assignment in return statement" +# WARNING_FILTER += allow class="Useless control flow to next line" +# WARNING_FILTER += allow class="Useless control flow" +# WARNING_FILTER += allow class="Vacuous bit mask operation on integer value" +# WARNING_FILTER += allow class="Vacuous comparison of integer value" +# WARNING_FILTER += allow class="Value required to have type qualifier, but marked as unknown" +# WARNING_FILTER += allow class="Value required to not have type qualifier, but marked as unknown" +# WARNING_FILTER += allow class="Variable Naming Conventions" +# WARNING_FILTER += allow class="Very confusing method names (but perhaps intentional)" +# WARNING_FILTER += allow class="While Loops Must Use Braces" +# WARNING_FILTER += allow class="Write to static field from instance method" +# WARNING_FILTER += allow class="clone method does not call super.clone()" +# WARNING_FILTER += allow class="compareTo()/compare() returns Integer.MIN_VALUE" +# WARNING_FILTER += allow class="equals method fails for subtypes" +# WARNING_FILTER += allow class="equals() method does not check for null argument" +# WARNING_FILTER += allow class="instanceof will always return true" +# WARNING_FILTER += allow class="serialVersionUID isn't final" +# WARNING_FILTER += allow class="serialVersionUID isn't long" +# WARNING_FILTER += allow class="serialVersionUID isn't static" +# WARNING_FILTER += allow class="toString method may return null" # # To enable additional buffer overrun checking, which can best be # described as better at finding buffer overruns involving pointer @@ -3358,12 +4503,12 @@ # { UNREACHABLE_FUNCTIONS, SOURCE_LIBRARIES } # # Behavior -# - UNREACHABLE_FUNCTIONS : instructs CodeSonar to skips analysis -# of any procedure not included in set -# REACHABLE_FROM_ROOTS_EXTENDED [#reachable_from_roots_extended]. -# CodeSonar will issue an alert [doc/html/GUI/GUI_Alerts.html] if -# value UNREACHABLE_FUNCTIONS is set but no reachability roots -# are specified. +# - UNREACHABLE_FUNCTIONS : instructs CodeSonar to skip analysis of +# any procedure not included in set REACHABLE_FROM_ROOTS_EXTENDED +# [#reachable_from_roots_extended]. CodeSonar will issue an alert +# [doc/html/GUI/GUI_Alerts.html] if value UNREACHABLE_FUNCTIONS +# is specified but set REACHABLE_FROM_ROOTS +# [#reachable_from_roots] is empty. # - SOURCE_LIBRARIES : instructs CodeSonar to skip analysis of # procedures in set # CONSERVATIVELY_REACHABLE_FROM_SOURCE_LIBRARIES @@ -3425,8 +4570,8 @@ # follows. Let S be the set of all source procedures in the # analyzed project (for a source-only analysis, all procedures are # source procedures). -# - If |REACHABLE_FROM_SOURCE_LIBRARIES|/|S| is greater than the -# value of SOURCE_MAX_REACHABLE_FROM_LIBRARIES, +# - If |REACHABLE_FROM_SOURCE_LIBRARIES|/|S| is greater than +# SOURCE_MAX_REACHABLE_FROM_LIBRARIES/100, # CONSERVATIVELY_REACHABLE_FROM_SOURCE_LIBRARIES is the empty # set. # - Otherwise, CONSERVATIVELY_REACHABLE_FROM_SOURCE_LIBRARIES is @@ -3453,8 +4598,8 @@ # Functions # # Type -# - BAD_FUNCTION_REGEX: Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# - BAD_FUNCTION_REGEX: Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # - BAD_FUNCTION_MESSAGE: string # - BAD_FUNCTION_CATEGORIES: string # - BAD_FUNCTION_BASE_RANK: number @@ -4116,6 +5261,111 @@ BAD_FUNCTION_BASE_RANK = 10 BAD_FUNCTION_SIGNIFICANCE = STYLE +BAD_FUNCTION_REGEX = ^[dD][eE][sS]_ecb(2)?_encrypt$ +BAD_FUNCTION_MESSAGE = Weak Cryptography +BAD_FUNCTION_INFO = it is a cryptographically weak algorithm (one of the MD5 or DES family of algorithms). +BAD_FUNCTION_CATEGORIES = BADFUNC.WEAKCRYPTO;CWE:327 +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^[dD][eE][sS]_(x|n|p)cbc_encrypt$ +BAD_FUNCTION_MESSAGE = Weak Cryptography +BAD_FUNCTION_INFO = it is a cryptographically weak algorithm (one of the MD5 or DES family of algorithms). +BAD_FUNCTION_CATEGORIES = BADFUNC.WEAKCRYPTO;CWE:327 +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^[dD][eE][sS]_(c|o)fb(64)?_encrypt$ +BAD_FUNCTION_MESSAGE = Weak Cryptography +BAD_FUNCTION_INFO = it is a cryptographically weak algorithm (one of the MD5 or DES family of algorithms). +BAD_FUNCTION_CATEGORIES = BADFUNC.WEAKCRYPTO;CWE:327 +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^[dD][eE][sS]_ede2_(cbc|cfb64|ofb64)_encrypt$ +BAD_FUNCTION_MESSAGE = Weak Cryptography +BAD_FUNCTION_INFO = it is a cryptographically weak algorithm (one of the MD5 or DES family of algorithms). +BAD_FUNCTION_CATEGORIES = BADFUNC.WEAKCRYPTO;CWE:327 +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^[dD][eE][sS]_(f)?crypt$ +BAD_FUNCTION_MESSAGE = Weak Cryptography +BAD_FUNCTION_INFO = it is a cryptographically weak algorithm (one of the MD5 or DES family of algorithms). +BAD_FUNCTION_CATEGORIES = BADFUNC.WEAKCRYPTO;CWE:327 +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^MD(2|4|5)(_Init|_Update|_Final)?$ +BAD_FUNCTION_MESSAGE = Weak Cryptography +BAD_FUNCTION_INFO = it is a cryptographically weak algorithm (one of the MD5 or DES family of algorithms). +BAD_FUNCTION_CATEGORIES = BADFUNC.WEAKCRYPTO;CWE:327 +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^ptrace$ +BAD_FUNCTION_MESSAGE = Possible Anti-Debugging +BAD_FUNCTION_INFO = it can be used to detect a debugger. +BAD_FUNCTION_CATEGORIES = BADFUNC.ANTIDEBUG +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^IsDebuggerPresent$ +BAD_FUNCTION_MESSAGE = Possible Anti-Debugging +BAD_FUNCTION_INFO = it can be used to detect a debugger. +BAD_FUNCTION_CATEGORIES = BADFUNC.ANTIDEBUG +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^NtQueryInformationProcess$ +BAD_FUNCTION_MESSAGE = Possible Anti-Debugging +BAD_FUNCTION_INFO = it can be used to detect a debugger. +BAD_FUNCTION_CATEGORIES = BADFUNC.ANTIDEBUG +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^ProcessDebugObjectHandle$ +BAD_FUNCTION_MESSAGE = Possible Anti-Debugging +BAD_FUNCTION_INFO = it can be used to detect a debugger. +BAD_FUNCTION_CATEGORIES = BADFUNC.ANTIDEBUG +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^RtlQueryProcessHeapInformation$ +BAD_FUNCTION_MESSAGE = Possible Anti-Debugging +BAD_FUNCTION_INFO = it can be used to detect a debugger. +BAD_FUNCTION_CATEGORIES = BADFUNC.ANTIDEBUG +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^RtlQueryProcessDebugInformation$ +BAD_FUNCTION_MESSAGE = Possible Anti-Debugging +BAD_FUNCTION_INFO = it can be used to detect a debugger. +BAD_FUNCTION_CATEGORIES = BADFUNC.ANTIDEBUG +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^SetUnhandledExceptionFilter$ +BAD_FUNCTION_MESSAGE = Possible Anti-Debugging +BAD_FUNCTION_INFO = it can be used to detect a debugger. +BAD_FUNCTION_CATEGORIES = BADFUNC.ANTIDEBUG +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^NtCreateDebugObject$ +BAD_FUNCTION_MESSAGE = Possible Anti-Debugging +BAD_FUNCTION_INFO = it can be used to detect a debugger. +BAD_FUNCTION_CATEGORIES = BADFUNC.ANTIDEBUG +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + +BAD_FUNCTION_REGEX = ^NtQuerySystemInformation$ +BAD_FUNCTION_MESSAGE = Possible Anti-Debugging +BAD_FUNCTION_INFO = it can be used to detect a debugger. +BAD_FUNCTION_CATEGORIES = BADFUNC.ANTIDEBUG +BAD_FUNCTION_RANK = 1.0 +BAD_FUNCTION_SIGNIFICANCE = SECURITY + # Parameter PLUGINS # @@ -4152,10 +5402,6 @@ # 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. @@ -4190,7 +5436,7 @@ # 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]. +# [doc/html/API/CoreAPI.html#impls]. # # For example: # JAVA_PLUGIN_JVM = C:\Program Files\Java\jre6\bin\server\jvm.dll @@ -4218,7 +5464,7 @@ # 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]. +# [doc/html/API/CoreAPI.html#impls]. # # For example: # JAVA_PLUGIN_CLASSPATH += c:\pluginclasspath @@ -4245,7 +5491,7 @@ # 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]. +# [doc/html/API/CoreAPI.html#impls]. # # For example: # JAVA_PLUGIN_JVM_FLAGS += -Xmx2g @@ -4277,7 +5523,7 @@ # 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]. +# [doc/html/API/CoreAPI.html#impls]. # # Below is a small sample plug-in. # import com.grammatech.cs.*; @@ -4333,7 +5579,7 @@ # Notes # The C# API for CodeSonar currently has beta-level support. For # more information, see the notes on API Languages -# [doc/html/API/Api.html#languages]. +# [doc/html/API/CoreAPI.html#impls]. # ## CSHARP_PLUGIN_DOTNET_VERSION = v4.0.30319 @@ -4364,7 +5610,7 @@ # Notes # The C# API for CodeSonar currently has beta-level support. For # more information, see the notes on API Languages -# [doc/html/API/Api.html#languages]. +# [doc/html/API/CoreAPI.html#impls]. # # Below is a small sample plug-in. # using System; @@ -4446,8 +5692,8 @@ # never called when this is set to "No", since the values of the # procedure inputs are never assigned. # -# This is set to "Yes" by default because most programmers will not -# test for equality unless they believe it can happen. +# The factory setting is Yes because most programmers will not test +# for equality unless they believe it can happen. # # The warning classes affected by this parameter are the same as # those for TIME_LIMIT_INTRA_CLASSIFY. @@ -4495,8 +5741,8 @@ # never called when this is set to "No", since the values of the # procedure inputs are never assigned. # -# This is set to "No" by default because loops often have -# conditions that are always satisfied on the first iteration. +# The factory setting is No because loops often have conditions +# that are always satisfied on the first iteration. # # The warning classes affected by this parameter are the same as # those for TIME_LIMIT_INTRA_CLASSIFY. @@ -4903,9 +6149,9 @@ # time spent on the refinement step. # # Notes -# This specifies elapsed time. The default limit is extremely -# unlikely to be exceeded and exists to guard against pathological -# behavior. +# This specifies elapsed time. The factory setting limit is +# extremely unlikely to be exceeded and exists to guard against +# pathological behavior. # # The warning classes affected by this parameter are the same as # those for TIME_LIMIT_INTRA_CLASSIFY. @@ -4960,8 +6206,8 @@ # and heavy use of the preprocessor. # # Notes -# The default limit is rarely exceeded and exists to guard against -# pathological constructs. +# The factory setting limit is rarely exceeded and exists to guard +# against pathological constructs. # # All warning classes can be affected by this limit. # @@ -4986,8 +6232,9 @@ # preferential treatment. # # Notes -# This specifies elapsed time. The default limit is not likely to -# be exceeded when the default value for SEARCH_BOUND is used. +# This specifies elapsed time. The factory setting limit is not +# likely to be exceeded when the factory setting for SEARCH_BOUND +# is used. # TIME_LIMIT_LEAK_CLASSIFY = 20 @@ -5038,8 +6285,9 @@ # generated code). # # Notes -# This specifies elapsed time. The default limit is not likely to -# be exceeded: it exists to guard against pathological behavior. +# This specifies elapsed time. The factory setting limit is not +# likely to be exceeded: it exists to guard against pathological +# behavior. # # The warning classes affected by this parameter are the same as # those for TIME_LIMIT_INTRA_CLASSIFY. @@ -5088,6 +6336,7 @@ # # Tags # - TIME_LIMIT: Analysis Time Limits +# - WC_CONCURRENCY.DATARACE: Used by Data Race # # Type # integer @@ -5152,6 +6401,10 @@ # - Tainted Filename # - Tainted Allocation Size # - Tainted Write +# - Untrusted Network Host +# - Untrusted Library Load +# - Untrusted Network Port +# - Untrusted Process Creation # - Tainted Buffer Access # - Multiplication Overflow of Allocation Size # - Multiplication Overflow of Size @@ -5392,7 +6645,7 @@ # budget consumption rate. -REFINEMENT_BARRIER_PERIOD = 1000 +REFINEMENT_BARRIER_PERIOD = 10000 # Parameter ROLLBACK_SUMMARIES_ON_ABORT @@ -6472,8 +7725,8 @@ # - WC_LANG.FUNCS.IRV: Used by Ignored Return Value # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # If the name of a called function matches a @@ -6641,8 +7894,8 @@ # - WC_LANG.FUNCS.IRV: Used by Ignored Return Value # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # If the name of a called function matches a @@ -6734,8 +7987,8 @@ # , # where: # - is an argument position (counting from 1) -# - is a Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# - is a Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # Calling a function whose name matches without a format @@ -6799,8 +8052,8 @@ # , # where: # - is an argument position (counting from 1) -# - is a Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# - is a Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # Calling a function whose name matches without a format @@ -6861,8 +8114,8 @@ # - WC_CONCURRENCY.DATARACE: Used by Data Race # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # The data race analysis checks all global variables and procedure @@ -6893,8 +8146,8 @@ # - WC_CONCURRENCY.DATARACE: Used by Data Race # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # The analysis engine checks all procedures and methods to see if @@ -6928,8 +8181,8 @@ # - WC_CONCURRENCY.DATARACE: Used by Data Race # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # If an object (or object reference) is used in a location where a @@ -6978,8 +8231,8 @@ # Functions # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # The analysis will treat all functions whose names match patterns @@ -7018,8 +8271,8 @@ # - WC_CONCURRENCY.LOCK.NOUNLOCK: Used by Missing Lock Release # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # The analysis will treat all functions whose names match patterns @@ -7078,8 +8331,8 @@ # - WC_CONCURRENCY.LOCK.NOUNLOCK: Used by Missing Lock Release # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # The analysis will treat all functions whose names match patterns @@ -7429,8 +8682,8 @@ # - WC_LANG.STRUCT.PIT: Used by Pointer Type Inside Typedef # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # Pointer Type Inside Typedef warnings will not be issued for @@ -7732,8 +8985,8 @@ # , # where: # - is the maximum allowable depth, in bytes. -# - is a Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# - is a Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # If the stack depth of the module entry point exceeds the module's @@ -7893,8 +9146,21 @@ # For multiple mappings, use a separate FUNCTION_MAP += statement # for each mapping. # -# This feature cannot be used with C++ identifiers containing -# spaces. +# C++ identifiers containing spaces must be quoted and contain the +# full name of the function as used by the linker. For example: +# // This maps the foo method to the bar method. +# // FUNCTION_MAP += "ns::x::foo(unsigned int)" -> "ns::x::bar(unsigned int)" +# namespace ns{ +# typedef unsigned U; +# template +# struct x{ +# void foo(U i){} +# void bar(unsigned i){1/i;} +# void baz(void){foo(0);} +# }; +# void f(x *p) +# { p->baz(); } +# }; # # Behavior is undefined if csonar_replace_A is defined and # FUNCTION_MAP += A -> B @@ -8039,28 +9305,6 @@ FLOAT_IS_ADVERSARIAL = No -# Parameter PRETEND_FLOAT_IS_INT -# -# Purpose -# Specifies whether the analysis should treat floating point typed -# values as integral typed values. -# -# Type -# { Yes, No } -# -# Behavior -# The analysis normally ignores floating point values in order to -# avoid producing false positives. This setting will cause the -# analysis to treat floating point values as if they are signed -# integers of equivalent size. -# -# 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 - - # Parameter INFER_CONST # # Purpose @@ -8237,8 +9481,9 @@ # and is one of: # - : (substring match, case-insensitive) # - = (exact match, case-insensitive) -# - =~ (regular expression match against a Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html]) +# - =~ (regular expression match against a Boost 'POSIX Extended +# Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html]) # # Behavior @@ -8334,6 +9579,7 @@ # is the quoted description for the new # metric, and must: # - only contain characters matching: [a-zA-Z][0-9] _- +# - have string length <= 35 characters # # is the granularity of the new metric, and is one of # {ANALYSIS, COMPUNIT, DIRECTORY, FILE, PROCEDURE} @@ -8617,11 +9863,12 @@ # -# Parameter SCHEME_WEB_CONSOLE +# Parameter WEB_CONSOLE # # Purpose -# Specifies whether the Scheme Console will be made available with -# the analysis. +# Specifies whether the Python Console and Scheme Console will be +# made available for the analysis (provided the hub is running with +# debug features enabled). # # Tags # - HUB_BEHAVIOR: Hub and Web GUI @@ -8630,23 +9877,31 @@ # { Yes, No } # # Behavior -# - Yes : the Scheme Console will be available and functional for -# this analysis. Warning: this poses a grave security risk. -# Anyone with access to the hub can execute arbitrary code in the -# analysis process. -# - No : the Scheme Console will not be available for this -# analysis. -# -# Notes -# This feature can be useful for experimenting with the Scheme API. -# It can also be useful for debugging analysis plug-ins. +# - Yes : the Python Console [doc/html/GUI/GUI_Python_Console.html] +# and Scheme Console [doc/html/GUI/GUI_Scheme_Console.html] will +# be available and functional for this analysis, provided the hub +# is running with debug features enabled. Warning: this poses a +# grave security risk. Anyone with access to the console can +# execute arbitrary code in the analysis process. +# - No : the API Consoles will not be available for this analysis. +# +# Notes +# To enable debug features: +# - Shut down the hub [doc/html/Workings/Hub_Shutting_Down.html]. +# - Edit $CSONAR/codesonar/py/hub/build_options.py to set +# debug=True. +# - Restart the hub [doc/html/Workings/Hub_Starting.html]. +# +# The Python and Scheme consoles can be useful for experimenting +# with the analysis APIs. They can also be useful for debugging +# analysis plug-ins. # # Code will have full access to the program representations # generated by CodeSonar and will run with the credentials of # whoever started the analysis process. There is no sandboxing of # any kind. -SCHEME_WEB_CONSOLE = No +WEB_CONSOLE = No # Parameter COLLAPSE_PROCEDURES @@ -8812,8 +10067,8 @@ # - WC_LANG.STRUCT.LOOP.UB: Used by Potential Unbounded Loop # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # If the line containing the loop condition matches this regular @@ -8856,8 +10111,8 @@ # Initialization # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # The Dynamic Allocation After Initialization check will trigger a @@ -8893,8 +10148,8 @@ # Initialization # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # For the Dynamic Allocation After Initialization check, calls to @@ -8932,8 +10187,8 @@ # Initialization # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # No Dynamic Allocation After Initialization warnings are issued @@ -8966,8 +10221,8 @@ # - WC_LANG.FUNCS.ASSERTS: Used by Not Enough Assertions # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # Calls to functions matching this regular expression are counted @@ -9084,35 +10339,6 @@ SYSTEM_INCLUDE_PATHS += /qnx650/host/ -# Parameter VISUALIZATION -# -# Purpose -# Specifies whether to generate a call graph for visualization. -# -# Type -# { Yes, No } -# -# Behavior -# - Yes : the CodeSonar analysis generates additional data in -# support of visualization and sends it to the hub. Visualization -# functionality for this analysis of the project is enabled on -# the hub. -# - No : additional data is not generated, and visualization is not -# enabled for this analysis of the project. -# -# Notes -# Changing from No to Yes between incremental analyses will have no -# effect: visualization will remain unavailable. Run a new base -# analysis to enable visualization. -# -# Changing from Yes to No between incremental analyses will disable -# the collection of visualization information. The visualization -# tool will remain available, using information from the last -# analysis for which VISUALIZATION was set to Yes. - -VISUALIZATION = Yes - - # Parameter ASSUME_UNDEFINED_PARAMETERS_MAYBE_FREED # Parameter ASSUME_UNDEFINED_PARAMETERS_MAYBE_INITIALIZED # Parameter ASSUME_UNDEFINED_PARAMETERS_MAYBE_MODIFIED @@ -9256,8 +10482,11 @@ # [doc/html/API/CAPI/cs__pdg_8h.html#func_cs_pdg_friendly_name] # is exactly XXXX. # -# If no reachability roots are specified, CodeSonar treats all -# procedures as reachable. +# If no REACHABILITY_ROOTS rules are specified (or some are +# specified but the last one is "REACHABILITY_ROOTS= "), CodeSonar +# treats all procedures as reachable. +# +# Notes # # Reachability analysis results are used in the following contexts. # - WARNING_FILTER reachable rules @@ -9268,10 +10497,8 @@ # - C and C++ source coloring # [doc/html/GUI/SourceHyperlinking.html#c_col] in the CodeSonar # GUI -# -# -# Notes -# By default, the set of reachability roots is empty. +# - [Binary analyses only] the SKIP_ANALYSIS_OF +# UNREACHABLE_BINARY_FUNCTIONS setting. # # CodeSonar will generate # - an alert [doc/html/GUI/GUI_Alerts.html] for each @@ -9279,14 +10506,17 @@ # one procedure in the project. # - an alert [doc/html/GUI/GUI_Alerts.html] if there are one or # 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 fname:XXXX rule that matches more than -# one procedure (these are permitted, but are logged in case they -# were not intentional). +# UNREACHABLE_FUNCTIONS (or UNREACHABLE_BINARY_FUNCTIONS, for +# binary analyses) is specified, but set REACHABLE_FROM_ROOTS +# [#reachable_from_roots] is empty. +# - an alert [doc/html/GUI/GUI_Alerts.html] if there are one or +# more WARNING_FILTER reachable rules, or SKIP_ANALYSIS_OF += +# UNREACHABLE_FUNCTIONS is specified, but no procedures match the +# specified REACHABILITY_ROOTS. +# - an Analysis Log [doc/html/GUI/GUI_Log_Analysis.html] message +# for each REACHABILITY_ROOTS fname:XXXX rule that matches more +# than one procedure (these are permitted, but are logged in case +# they were not intentional). # # For a typical simple C program, we might be only interested in # reachability from main(), and consider any procedure that is not @@ -9313,6 +10543,10 @@ # - P is called (directly or transitively) by a procedure that # matches a REACHABILITY_ROOTS rule. # +# If no REACHABILITY_ROOTS rules are specified (or some are +# specified but the last one is "REACHABILITY_ROOTS= "), set +# REACHABLE_FROM_ROOTS contains all procedures in the project. +# # In some cases, such as calls through function pointer variables, # CodeSonar may not correctly resolve all callees for a procedure. # This can result in procedures incorrectly being identified as @@ -9332,6 +10566,20 @@ # that it has made this determination. # - Otherwise, REACHABLE_FROM_ROOTS_EXTENDED is equal to # REACHABLE_FROM_ROOTS. +# +# If one or more REACHABILITY_ROOTS rules are specified (and the +# last one is NOT "REACHABILITY_ROOTS= "), and no procedure in the +# project matches any REACHABILITY_ROOTS rule, set +# REACHABLE_FROM_ROOTS will be empty and CodeSonar will issue +# alerts as noted above. +# +# If this occurs, you have several options. +# - Adjust your REACHABILITY_ROOTS rules so that they match at +# least one procedure in the project. +# - Add a final rule "REACHABILITY_ROOTS= " so that all procedures +# are treated as reachable. +# - Remove any WARNING_FILTER reachable rules and SKIP_ANALYSIS_OF +# UNREACHABLE_FUNCTIONS rules, if you no longer need them. # Parameter HARDCODED_ARGS_REGEX @@ -9347,8 +10595,8 @@ # whose arguments should not be hardcoded. # # Type -# - HARDCODED_ARGS_REGEX: Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# - HARDCODED_ARGS_REGEX: Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # - HARDCODED_ARGS_LIST: comma-separated list of numbers # - HARDCODED_ARGS_CLASS_NAME: string # - HARDCODED_ARGS_CATEGORIES: string @@ -9495,19 +10743,19 @@ HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 HARDCODED_ARGS_SIGNIFICANCE = SECURITY -HARDCODED_ARGS_REGEX = ^DES_set_key(_unchecked|_checked)?$ +HARDCODED_ARGS_REGEX = ^[dD][eE][sS]_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_REGEX = ^[dD][eE][sS]_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_REGEX = ^[dD][eE][sS]_string_to_2keys$ HARDCODED_ARGS_LIST = 1 HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Key HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 @@ -9519,7 +10767,7 @@ HARDCODED_ARGS_CATEGORIES = HARDCODED.KEY;CWE:547 HARDCODED_ARGS_SIGNIFICANCE = SECURITY -HARDCODED_ARGS_REGEX = ^DES_(f)?crypt$ +HARDCODED_ARGS_REGEX = ^[dD][eE][sS]_(f)?crypt$ HARDCODED_ARGS_LIST = 2 HARDCODED_ARGS_CLASS_NAME = Hardcoded Crypto Salt HARDCODED_ARGS_CATEGORIES = HARDCODED.SALT;CWE:547 @@ -9752,8 +11000,8 @@ # integer # # Behavior -# A negative value indicates no limit. Lower (positive) values will -# conserve disk space and time, but can cause false negatives. +# Lower values will conserve disk space and time, but can cause +# false negatives. # # Notes # This bound may be useful for projects containing millions of @@ -9885,9 +11133,28 @@ # - WARNING_TUNING: Fine Tuning for Warnings # # Behavior -# A whitespace separated list of taint kinds that should be -# ignored. This setting might be used to disable taint kinds that -# are trusted in the context of the subject software. For example, +# If the specified string matches the name of built in +# [doc/html/C_Module/LibraryModels/TaintKinds.html] or user-defined +# [doc/html/Extensions/Prototypes.html#CSONAR_DEFINE_TAINT_SOURCE] +# taint kind, taint of that kind will be ignored by the analysis. +# +# Certain warning classes rely on exactly one taint kind. For these +# classes, CodeSonar enables or disables the relevant taint kind +# automatically depending on whether or not the warning class is +# enabled. Do not specify these taint kinds in DISABLED_TAINT_KINDS +# rules: add_overflow, mult_overflow, sub_underflow, +# truncation_overflow, lib_blacklist, proc_blacklist, +# net_blacklist. +# +# Notes +# Taint sinks can be enabled and disabled by using a WARNING_FILTER +# rule, for example, to disable specific warning classes or +# warnings reported at certain locations. DISABLED_TAINT_KINDS can +# be used to control which taint sources are enabled, at a coarse +# granularity. +# +# This setting might be used to disable taint kinds that are +# trusted in the context of the subject software. For example, # suppose we have this code: # system(getenv("FOO")); # @@ -9897,28 +11164,18 @@ # taint to suppress this and other similar warnings: # DISABLED_TAINT_KINDS += environment # -# Notes -# Taint sinks can be enabled and disabled by using a WARNING_FILTER -# rule, for example, to disable specific warning classes or -# warnings reported at certain locations. DISABLED_TAINT_KINDS can -# be used to control which taint sources are enabled, at a coarse -# granularity. # -## Below is a menu of built-in taint kinds that might be disabled. -## They are disabled because many users do not consider these sorts of -## taint dangerous. +# The following taint kinds are enabled by default. +# DISABLED_TAINT_KINDS += dns +# DISABLED_TAINT_KINDS += environment +# DISABLED_TAINT_KINDS += fd +# DISABLED_TAINT_KINDS += file +# DISABLED_TAINT_KINDS += file_metadata +# DISABLED_TAINT_KINDS += network +# DISABLED_TAINT_KINDS += registry + DISABLED_TAINT_KINDS += time -## DISABLED_TAINT_KINDS += add_overflow -## DISABLED_TAINT_KINDS += mult_overflow -## DISABLED_TAINT_KINDS += sub_underflow -## DISABLED_TAINT_KINDS += truncation_overflow -## DISABLED_TAINT_KINDS += dns -## DISABLED_TAINT_KINDS += environment -## DISABLED_TAINT_KINDS += fd -## DISABLED_TAINT_KINDS += file -## DISABLED_TAINT_KINDS += file_metadata -## DISABLED_TAINT_KINDS += network -## DISABLED_TAINT_KINDS += registry + # Parameter MAX_ALLOCATION_SIZE @@ -10074,7 +11331,7 @@ # Notes # Some embedded environments may allow dereferencing of NULL. # -# We do not recomment setting this to No as it may produce +# We do not recommend setting this to No as it may produce # confusing results or false positives, such as the following # division by zero: # @@ -10187,7 +11444,7 @@ # Purpose # Specifies whether or not Contemplate ThreadSafe will be run by # default during Java analyses. - +# # # Tags # - BUILD_BEHAVIOR: Governs the Build/Analysis @@ -10351,6 +11608,41 @@ GLOBAL_FUNCTION_POINTER_MODE = Context_Insensitive +# Parameter RELAXED_TOPDOWN_FUNCPTR_RESOLUTION +# +# Purpose +# Specifies whether or not CodeSonar can immediately exploit +# knowledge of function pointer resolvents that might not be known +# when using other possible parallel analysis schedules. +# +# +# Tags +# - ANALYSIS_PROPERTY: Analysis Properties +# +# Type +# { Yes, No } +# +# Behavior +# - Yes : CodeSonar will take advantage of function pointer +# resolvents as soon as they are discovered. +# - No : CodeSonar will ignore this information until the next +# pointer analysis pass. +# +# Notes +# This setting is a trade off between determinism and analysis +# accuracy. A setting of Yes will produce fewer false negatives but +# can introduce nondeterminism into parallel analyses. +# +# A setting of Yes allows CodeSonar to learn more about the program +# in fewer pointer analysis passes. However, a setting of Yes may +# also cause non-deterministic behavior for parallel analyses. A +# higher setting for MAX_POINTER_ANALYSIS_PASSES may be required to +# get equivalent results when +# RELAXED_TOPDOWN_FUNCPTR_RESOLUTION=No. + +RELAXED_TOPDOWN_FUNCPTR_RESOLUTION = Yes + + # Parameter TAINT_RANK_BONUS # # Purpose @@ -10700,8 +11992,8 @@ # incomplete. # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # If any line of a comment contains text that matches any of these @@ -10745,10 +12037,10 @@ # # Type # - BAD_MACRO_CLASS: string -# - BAD_MACRO_NAME: Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] -# - BAD_MACRO_FILENAME: Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# - BAD_MACRO_NAME: Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] +# - BAD_MACRO_FILENAME: Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # - BAD_MACRO_CATEGORIES: string # - BAD_MACRO_BASE_RANK: number # - BAD_MACRO_INFO: string @@ -10880,8 +12172,8 @@ # - WC_LANG.STRUCT.SE.SIZEOF: Used by Side Effects in sizeof # # Type -# Boost regular expression -# [http://www.boost.org/doc/libs/1_51_0/libs/regex/doc/html/boost_regex/syntax.html] +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] # # Behavior # In checks for the following warning classes,CodeSonar treats all @@ -10901,3 +12193,677 @@ SIDE_EFFECT_FREE_FUNCTIONS += ^(strlen|strnlen_s|strcmp|strncmp|strcoll|strchr|strrchr|strspn|strcspn|memchr)$ SIDE_EFFECT_FREE_FUNCTIONS += ^(isalnum|isalpha|islower|isupper|isdigit|isxdigit|iscntrl|isgraph|isspace|isblank|isprint|ispunct|tolower|toupper)$ SIDE_EFFECT_FREE_FUNCTIONS += ^(iswalnum|iswalpha|iswlower|iswdigit|iswxdigit|iswcntrl|iswgraph|iswspace|iswblank|iswprint|iswpunct|wctype|towlower|towupper|towctrans|wctrans)$ + + +# Parameter UNTRUSTED_PROC_BLACKLIST +# +# Purpose +# Specify process names that will trigger Untrusted Process +# Creation warnings. +# +# Type +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] +# +# Tags +# - WC_IO.UT.PROC: Used by Untrusted Process Creation +# +# Behavior +# An UNTRUSTED_PROC_BLACKLIST rule is "applicable" if and only if +# - there is no subsequent UNTRUSTED_PROC_WHITELIST rule (which +# would take precedence), AND +# - there is no subsequent UNTRUSTED_PROC_BLACKLIST= rule (which +# would reset the blacklist). All other UNTRUSTED_PROC_BLACKLIST +# rules are ignored. +# +# If there are one or more applicable UNTRUSTED_PROC_BLACKLIST +# rules, calls to triggering functions for Untrusted Process +# Creation are handled as follows. +# - If the process name argument matches the regular expression in +# one or more of the applicable UNTRUSTED_PROC_BLACKLIST rules, a +# warning is issued. +# - Otherwise, a warning is issued if and only if CodeSonar +# determines that the process name argument may have been +# obfuscated (where obfuscation thresholds are specified by +# MIN_B64_SCORE and MIN_ENC_SCORE). +# +# If there are no applicable UNTRUSTED_PROC_BLACKLIST rules, calls +# to triggering functions for Untrusted Process Creation are +# handled as follows +# - If any UNTRUSTED_PROC_WHITELIST rules are applicable, they are +# applied as described in the documentation for +# UNTRUSTED_PROC_WHITELIST. +# - Otherwise, a warning is issued if and only if CodeSonar +# determines that the process name argument may have been +# obfuscated. +# +# Notes +# With factory settings, all Linux and Windows shells are +# blacklisted. +# +# The applicability rules for UNTRUSTED_PROC_BLACKLIST and +# UNTRUSTED_PROC_WHITELIST are such that process name whitelists +# and blacklists cannot be used in combination: rules of at most +# one of the two types will be applicable. If both +# UNTRUSTED_PROC_BLACKLIST and UNTRUSTED_PROC_WHITELIST rules are +# specified, an alert will be generated in the hub. + + +## Linux/Unix command shells: sh, bash, csh, scsh, tcsh, ksh, pdksh, zsh, ash +UNTRUSTED_PROC_BLACKLIST += ^\s*(.*[/\\])?(a|ba|c|k|pdk|sc|tc|z)?sh(\s+.*)*$ +## Windows command shells: cmd.exe, command.com +UNTRUSTED_PROC_BLACKLIST += ^\s*(.*[/\\])?cmd(.exe)?(\s+.*)*$ +UNTRUSTED_PROC_BLACKLIST += ^\s*(.*[/\\])?command(.com)?(\s+.*)*$ +## Interpreters: python, ruby, perl, java +## (these are more generic - anything starting with python, e.g. python-2.4, +## will match) +UNTRUSTED_PROC_BLACKLIST += ^\s*(.*[/\\])?(java|perl|python|ruby) + + +# Parameter UNTRUSTED_PROC_WHITELIST +# +# Purpose +# Specify process names that will not trigger a Untrusted Process +# Creation warning. +# +# Type +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] +# +# Tags +# - WC_IO.UT.PROC: Used by Untrusted Process Creation +# +# Behavior +# An UNTRUSTED_PROC_WHITELIST rule is "applicable" if and only if +# - there is no subsequent UNTRUSTED_PROC_BLACKLIST rule (which +# would take precedence), AND +# - there is no subsequent UNTRUSTED_PROC_WHITELIST= rule (which +# would reset the whitelist). All other UNTRUSTED_PROC_WHITELIST +# rules are ignored. +# +# If there are one or more applicable UNTRUSTED_PROC_WHITELIST +# rules, calls to triggering functions for Untrusted Process +# Creation are handled as follows. +# - If the process name argument matches the regular expression in +# one or more of the applicable UNTRUSTED_PROC_WHITELIST rules, a +# warning is NOT issued. +# - Otherwise, a warning is issued. This includes the case where +# CodeSonar cannot determine the value of the process name +# argument. +# +# If there are no applicable UNTRUSTED_PROC_WHITELIST rules, calls +# to triggering functions for Untrusted Process Creation are +# handled as follows +# - If any UNTRUSTED_PROC_BLACKLIST rules are applicable, they are +# applied as described in the documentation for +# UNTRUSTED_PROC_BLACKLIST. +# - Otherwise, a warning is issued if and only if CodeSonar +# determines that the process name argument may have been +# obfuscated (where obfuscation thresholds are specified by +# MIN_B64_SCORE and MIN_ENC_SCORE). +# +# Notes +# The applicability rules for UNTRUSTED_PROC_WHITELIST and +# UNTRUSTED_PROC_BLACKLIST are such that process name whitelists +# and blacklists cannot be used in combination: rules of at most +# one of the two types will be applicable. If both +# UNTRUSTED_PROC_WHITELIST and UNTRUSTED_PROC_BLACKLIST rules are +# specified, an alert will be generated in the hub. +# +# The whitelist represents a much more aggressive approach than the +# blacklist, and will result in more false positives. For example, +# if CodeSonar cannot determine the name of the process being +# created, a warning will be generated for whitelists but not +# blacklists. +# + + +# Parameter UNTRUSTED_LIB_BLACKLIST +# +# Purpose +# Specify dynamic library names that will trigger Untrusted Library +# Load warnings. +# +# Type +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] +# +# Tags +# - WC_IO.UT.LIB: Used by Untrusted Library Load +# +# Behavior +# An UNTRUSTED_LIB_BLACKLIST rule is "applicable" if and only if +# - there is no subsequent UNTRUSTED_LIB_WHITELIST rule (which +# would take precedence), AND +# - there is no subsequent UNTRUSTED_LIB_BLACKLIST= rule (which +# would reset the blacklist). All other UNTRUSTED_LIB_BLACKLIST +# rules are ignored. +# +# If there are one or more applicable UNTRUSTED_LIB_BLACKLIST +# rules, calls to triggering functions for Untrusted Library Load +# are handled as follows. +# - If the library name argument matches the regular expression in +# one or more of the applicable UNTRUSTED_LIB_BLACKLIST rules, a +# warning is issued. +# - Otherwise, a warning is issued if and only if CodeSonar +# determines that the library name argument may have been +# obfuscated (where obfuscation thresholds are specified by +# MIN_B64_SCORE and MIN_ENC_SCORE). +# +# If there are no applicable UNTRUSTED_LIB_BLACKLIST rules, calls +# to triggering functions for Untrusted Library Load are handled as +# follows +# - If any UNTRUSTED_LIB_WHITELIST rules are applicable, they are +# applied as described in the documentation for +# UNTRUSTED_LIB_WHITELIST. +# - Otherwise, a warning is issued if and only if CodeSonar +# determines that the library name argument may have been +# obfuscated. +# +# Notes +# With factory settings, no dynamic libraries are blacklisted. +# +# The applicability rules for UNTRUSTED_LIB_BLACKLIST and +# UNTRUSTED_LIB_WHITELIST are such that library name whitelists and +# blacklists cannot be used in combination: rules of at most one of +# the two types will be applicable. If both UNTRUSTED_LIB_WHITELIST +# and UNTRUSTED_LIB_BLACKLIST rules are specified, an alert will be +# generated in the hub. + + +# Parameter UNTRUSTED_LIB_WHITELIST +# +# Purpose +# Specify dynamic library names that will not trigger a Untrusted +# Library Load warning. +# +# Type +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] +# +# Tags +# - WC_IO.UT.LIB: Used by Untrusted Library Load +# +# Behavior +# An UNTRUSTED_LIB_WHITELIST rule is "applicable" if and only if +# - there is no subsequent UNTRUSTED_LIB_BLACKLIST rule (which +# would take precedence), AND +# - there is no subsequent UNTRUSTED_LIB_WHITELIST= rule (which +# would reset the whitelist). All other UNTRUSTED_LIB_WHITELIST +# rules are ignored. +# +# If there are one or more applicable UNTRUSTED_LIB_WHITELIST +# rules, calls to triggering functions for Untrusted Library Load +# are handled as follows. +# - If the library name argument matches the regular expression in +# one or more of the applicable UNTRUSTED_LIB_WHITELIST rules, a +# warning is NOT issued. +# - Otherwise, a warning is issued. This includes the case where +# CodeSonar cannot determine the value of the library name +# argument. +# +# If there are no applicable UNTRUSTED_LIB_WHITELIST rules, calls +# to triggering functions for Untrusted Library Load are handled as +# follows +# - If any UNTRUSTED_LIB_BLACKLIST rules are applicable, they are +# applied as described in the documentation for +# UNTRUSTED_LIB_BLACKLIST. +# - Otherwise, a warning is issued if and only if CodeSonar +# determines that the library name argument may have been +# obfuscated (where obfuscation thresholds are specified by +# MIN_B64_SCORE and MIN_ENC_SCORE). +# +# Notes +# The applicability rules for UNTRUSTED_LIB_WHITELIST and +# UNTRUSTED_LIB_BLACKLIST are such that library name whitelists and +# blacklists cannot be used in combination: rules of at most one of +# the two types will be applicable. If both UNTRUSTED_LIB_WHITELIST +# and UNTRUSTED_LIB_BLACKLIST rules are specified, an alert will be +# generated in the hub. +# +# The whitelist represents a much more aggressive approach than the +# blacklist, and will result in more false positives. For example, +# if CodeSonar cannot determine the name of the dynamic library +# being loaded, a warning will be generated for whitelists but not +# blacklists. +# + + +# Parameter NETWORK_HOST_BLACKLIST +# +# Purpose +# Specifies network hosts that will trigger a Untrusted Network +# Host warning. +# +# Type +# - +# - allow +# +# where is a Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] +# +# Tags +# - WC_IO.UT.HOST: Used by Untrusted Network Host +# +# Behavior +# A NETWORK_HOST_BLACKLIST rule is "applicable" if and only if +# - there is no subsequent NETWORK_HOST_WHITELIST rule (which would +# take precedence), AND +# - there is no subsequent NETWORK_HOST_BLACKLIST= rule (which +# would reset the blacklist). All other NETWORK_HOST_BLACKLIST +# rules are ignored. +# +# If there are one or more applicable NETWORK_HOST_BLACKLIST rules, +# calls to triggering functions for Untrusted Network Host are +# handled as follows. +# - If the network host argument matches an 'allow' regular +# expression in one or more of the applicable +# NETWORK_HOST_BLACKLIST rules, a warning is not issued. +# - Otherwise, if the network host argument matches the regular +# expression in one or more of the applicable (non-'allow') +# NETWORK_HOST_BLACKLIST rules, a warning is issued. +# - Otherwise, a warning is issued if and only if CodeSonar +# determines that the network host argument may have been +# obfuscated (where obfuscation thresholds are specified by +# MIN_B64_SCORE and MIN_ENC_SCORE). +# +# If there are no applicable NETWORK_HOST_BLACKLIST rules, calls to +# triggering functions for Untrusted Network Host are handled as +# follows +# - If any NETWORK_HOST_WHITELIST rules are applicable, they are +# applied as described in the documentation for +# NETWORK_HOST_WHITELIST. +# - Otherwise, a warning is issued if and only if CodeSonar +# determines that the network host argument may have been +# obfuscated. +# +# Notes +# With factory settings, all hardcoded IPv4, IPv6, and DNS +# addresses are blacklisted. +# +# The applicability rules for NETWORK_HOST_BLACKLIST and +# NETWORK_HOST_WHITELIST are such that network host whitelists and +# blacklists cannot be used in combination: rules of at most one of +# the two types will be applicable. If both NETWORK_HOST_WHITELIST +# and NETWORK_HOST_BLACKLIST rules are specified, an alert will be +# generated in the hub. +# +# The 'allow' rules are provided so that blacklist exceptions can +# be specified without resorting to overcomplicated blacklist +# regular expressions. + +## IPv4 +NETWORK_HOST_BLACKLIST += allow ^127.0.0.1$ +NETWORK_HOST_BLACKLIST += allow ^0.[0-9]+\.[0-9]+\.[0-9]+$ +NETWORK_HOST_BLACKLIST += [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+ + +## IPv6 +NETWORK_HOST_BLACKLIST += allow ^0:0:0:0:0:0:0:1$ +NETWORK_HOST_BLACKLIST += allow ^::1$ +NETWORK_HOST_BLACKLIST += allow ^0:0:0:0:0:0:0:0$ +NETWORK_HOST_BLACKLIST += allow ^::$ +NETWORK_HOST_BLACKLIST += ([a-zA-Z0-9])+:([a-zA-Z0-9])+:([a-zA-Z0-9])+:([a-zA-Z0-9]) + + +## There is a full list of possible domain name suffixes, but we just +## assume that any alphabetic between 2 and 6 characters could be a +## domain +NETWORK_HOST_BLACKLIST += .+\.[a-zA-Z]{2,6}($|\s+|\\|/|:) + + +# Parameter NETWORK_HOST_WHITELIST +# +# Purpose +# Specifies network hosts that will not trigger a Untrusted Network +# Host warning. +# +# Type +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] +# +# Tags +# - WC_IO.UT.HOST: Used by Untrusted Network Host +# +# Behavior +# A NETWORK_HOST_WHITELIST rule is "applicable" if and only if +# - there is no subsequent NETWORK_HOST_BLACKLIST rule (which would +# take precedence), AND +# - there is no subsequent NETWORK_HOST_WHITELIST= rule (which +# would reset the whitelist). All other NETWORK_HOST_WHITELIST +# rules are ignored. +# +# If there are one or more applicable NETWORK_HOST_WHITELIST rules, +# calls to triggering functions for Untrusted Network Host are +# handled as follows. +# - If the network host argument matches the regular expression in +# one or more of the applicable NETWORK_HOST_WHITELIST rules, a +# warning is NOT issued. +# - Otherwise, a warning is issued. This includes the case where +# CodeSonar cannot determine the value of the library name +# argument. +# +# If there are no applicable NETWORK_HOST_WHITELIST rules, calls to +# triggering functions for Untrusted Network Host are handled as +# follows +# - If any NETWORK_HOST_BLACKLIST rules are applicable, they are +# applied as described in the documentation for +# NETWORK_HOST_BLACKLIST. +# - Otherwise, a warning is issued if and only if CodeSonar +# determines that the network host argument may have been +# obfuscated (where obfuscation thresholds are specified by +# MIN_B64_SCORE and MIN_ENC_SCORE). +# +# Notes +# The applicability rules for NETWORK_HOST_WHITELIST and +# NETWORK_HOST_BLACKLIST are such that network host whitelists and +# blacklists cannot be used in combination: rules of at most one of +# the two types will be applicable. If both NETWORK_HOST_WHITELIST +# and NETWORK_HOST_BLACKLIST rules are specified, an alert will be +# generated in the hub. +# +# Using the whitelist is a much more aggressive approach than using +# the blacklist, and will result in more false positives. For +# example, if CodeSonar cannot determine the target host name, a +# warning will be generated for whitelists but not blacklists. + + +# Parameter NETWORK_PORT_BLACKLIST +# +# Purpose +# Specifies network ports that will trigger a Untrusted Network +# Port warning. +# +# Type +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] +# +# Tags +# - WC_IO.UT.PORT: Used by Untrusted Network Port +# +# Behavior +# A NETWORK_PORT_BLACKLIST rule is "applicable" if and only if +# - there is no subsequent NETWORK_PORT_WHITELIST rule (which would +# take precedence), AND +# - there is no subsequent NETWORK_PORT_BLACKLIST= rule (which +# would reset the blacklist). All other NETWORK_PORT_BLACKLIST +# rules are ignored. +# +# If there are one or more applicable NETWORK_PORT_BLACKLIST rules, +# calls to triggering functions for Untrusted Network Port are +# handled as follows. +# - If the network port argument matches the regular expression in +# one or more of the applicable NETWORK_PORT_BLACKLIST rules, a +# warning is issued. +# - Otherwise, no warning is issued. +# +# If there are no applicable NETWORK_PORT_BLACKLIST rules, calls to +# triggering functions for Untrusted Network Port are handled as +# follows +# - If any NETWORK_PORT_WHITELIST rules are applicable, they are +# applied as described in the documentation for +# NETWORK_HOST_WHITELIST. +# - Otherwise, no warning is issued. +# +# Notes +# The applicability rules for NETWORK_PORT_BLACKLIST and +# NETWORK_PORT_WHITELIST are such that network port whitelists and +# blacklists cannot be used in combination: rules of at most one of +# the two types will be applicable. If both NETWORK_PORT_WHITELIST +# and NETWORK_PORT_BLACKLIST rules are specified, an alert will be +# generated in the hub. +# +# For example, to warn about any hardcoded port, put the following +# after all other NETWORK_PORT_BLACKLIST and NETWORK_PORT_WHITELIST +# rules. +# NETWORK_PORT_BLACKLIST = .* + + + +# Parameter NETWORK_PORT_WHITELIST +# +# Purpose +# Specifies network ports that will not trigger a Untrusted Network +# Port warning. +# +# Type +# Boost 'POSIX Extended Regular Expression' +# [http://www.boost.org/doc/libs/1_63_0/libs/regex/doc/html/boost_regex/syntax/basic_extended.html] +# +# Tags +# - WC_IO.UT.PORT: Used by Untrusted Network Port +# +# Behavior +# A NETWORK_PORT_WHITELIST rule is "applicable" if and only if +# - there is no subsequent NETWORK_PORT_BLACKLIST rule (which would +# take precedence), AND +# - there is no subsequent NETWORK_PORT_WHITELIST= rule (which +# would reset the whitelist). All other _WHITELIST rules are +# ignored. +# +# If there are one or more applicable NETWORK_PORT_WHITELIST rules, +# calls to triggering functions for Untrusted Network Port are +# handled as follows. +# - If the network host argument matches the regular expression in +# one or more of the applicable NETWORK_PORT_WHITELIST rules, a +# warning is NOT issued. +# - Otherwise, a warning is issued. This includes the case where +# CodeSonar cannot determine the value of the library name +# argument. +# +# If there are no applicable NETWORK_PORT_WHITELIST rules, calls to +# triggering functions for Untrusted Network Port are handled as +# follows +# - If any NETWORK_PORT_BLACKLIST rules are applicable, they are +# applied as described in the documentation for +# NETWORK_PORT_BLACKLIST. +# - Otherwise, a warning not is issued. +# +# Notes +# With factory settings, the following are allowed: Email, SSH, +# SMTP, HTTP, FTP, SSH. +# +# The applicability rules for NETWORK_PORT_WHITELIST and +# NETWORK_PORT_BLACKLIST are such that network port whitelists and +# blacklists cannot be used in combination: rules of at most one of +# the two types will be applicable. If both NETWORK_PORT_WHITELIST +# and NETWORK_PORT_BLACKLIST rules are specified, an alert will be +# generated in the hub. +# +# Using the whitelist is a much more aggressive approach than using +# the blacklist, and will result in more false positives. For +# example, if CodeSonar cannot determine the value of the network +# port argument, a warning will be generated for whitelists but not +# blacklists. + +## FTP +NETWORK_PORT_WHITELIST += ^20$ +## FTP +NETWORK_PORT_WHITELIST += ^21$ +## SSH +NETWORK_PORT_WHITELIST += ^22$ +## SMTP +NETWORK_PORT_WHITELIST += ^25$ +## HTTP +NETWORK_PORT_WHITELIST += ^80$ +## NTP +NETWORK_PORT_WHITELIST += ^123$ +## IMAP +NETWORK_PORT_WHITELIST += ^143$ + + +# Parameter TIMEBOMB_IGNORE_ZERO +# +# Purpose +# Specify whether the Potential Timebomb check should ignore +# comparisons against zero. +# +# Type +# { Yes, No } +# +# Tags +# - WC_MISC.TIMEBOMB: Used by Potential Timebomb +# +# Behavior +# - Yes : Potential Timebomb checks will ignore comparisons against +# zero, which is a common error return value for time functions. +# - No : Potential Timebomb checks will not ignore comparisons +# against zero. This is likely to result in more false positive +# warnings. +# +TIMEBOMB_IGNORE_ZERO = Yes + + +# Parameter MAX_CHROOT_CHDIR_DIST +# +# Purpose +# Specifies the number of lines of code after a call to chroot() +# within which a subsequent call to chdir() must occur to avoid +# issuing a chroot without chdir warning. +# +# Type +# integer +# +# Tags +# - WC_MISC.CHROOT.NOCHDIR: Used by chroot without chdir +# +# Behavior +# Sets a bound N. A chroot without chdir warning is issued at a +# call to chroot() if either of the following are true. +# - N lines of code can be executed after the call to chroot() +# without encountering a call to chdir(). +# - The function in which chroot() was called returns before +# reaching a call to chdir(). + +MAX_CHROOT_CHDIR_DIST = 20 + + +# Parameter MIN_B64_SCORE +# +# Purpose +# Specifies a threshold beyond which constant strings are +# identified as Base64-encoded for warning classes Untrusted +# Network Host, Untrusted Library Load, and Untrusted Process +# Creation. +# +# Type +# integer +# +# Tags +# - WC_IO.UT.HOST: Used by Untrusted Network Host +# - WC_IO.UT.LIB: Used by Untrusted Library Load +# - WC_IO.UT.PROC: Used by Untrusted Process Creation +# +# Behavior +# When a constant string argument is passed to a triggering +# function for any of these warning classes, CodeSonar computes a +# metric from that string to determine heuristically whether it +# represents Base64-encoded content. If the value of the computed +# metric is above MIN_B64_SCORE, a warning of the corresponding +# class is issued. +# +# Note The factors considered by the metric include the following. +# - Does the string consist entirely of alphanumeric characters and +# '+', '/', or '='? +# - Is the length of the string an integer multiple of 4? +# - Does the string end with '=' characters? +# - Are the alphabetic characters in the string consistently upper +# or consistently lower case? +# - Does the string include many of the available Base64 encoding +# characters? + +MIN_B64_SCORE = 50 + + +# Parameter MIN_ENC_SCORE +# +# Purpose +# Specifies a threshold beyond which constant strings are +# identified as encrypted for warning classes Untrusted Network +# Host, Untrusted Library Load, and Untrusted Process Creation. +# +# Type +# integer +# +# Tags +# - WC_IO.UT.HOST: Used by Untrusted Network Host +# - WC_IO.UT.LIB: Used by Untrusted Library Load +# - WC_IO.UT.PORT: Used by Untrusted Network Port +# +# Behavior +# When a constant string argument is passed to a triggering +# function for any of these warning classes, CodeSonar computes a +# metric from that string to determine heuristically whether it +# represents encrypted content. If the value of the computed metric +# is above MIN_ENC_SCORE, a warning of the corresponding class is +# issued. +# +# Note Factors considered include: +# - Does the string consist entirely of alphanumeric characters or +# other common text characters? (If so, it is unlikely to be +# encrypted.) +# - Does the string exhibit high entropy? + +MIN_ENC_SCORE = 90 + + +# Parameter POINTED_TO_CAPACITY_DEFAULTS_TO_TYPE_BOUNDARY +# +# Purpose +# When the address of a portion of an aggregate is taken, and +# CodeSonar is not intraprocedurally aware of the size of the +# underlying allocation, should the "2$Buffer Overrun" warning +# class checker treat the pointer's capacity as the capacity of the +# portion (as opposed to the capacity of the underlying +# allocation)? +# +# Tags +# - WC_LANG.MEM.BO: Used by Buffer Overrun +# - WARNING_TUNING: Fine Tuning for Warnings +# +# Type +# { Yes, No } +# +# Behavior +# - Yes : CodeSonar will determine the pointer capacity using the +# type boundary of the entity whose address was taken. +# - No : CodeSonar will determine the pointer capacity using the +# capacity of the underlying allocation. +# +# Notes +# When the address of some sub-object like a field in a structure +# or a row of a multi-dimensional array is taken, CodeSonar will +# record how far the resulting address is from the end of the +# allocation, for the purpose of detecting buffer overruns. +# +# For statements such as: +# q = &p->f; +# +# CodeSonar will generally pick the minimum of the distance between +# the size of f and the distance to the end of the underlying +# allocation from the beginning of f. However, there will be times +# when CodeSonar must make this decision without knowing these two +# values. This preference determines which of the two behaviors is +# used in this case. +# +# Setting POINTED_TO_CAPACITY_DEFAULTS_TO_TYPE_BOUNDARY=Yes permits +# CodeSonar to detect the buffer overrun in the following code. +# struct { int f; } *p = unknown_value(); +# int *q = &p->f; +# q[5] = 42; +# +# Setting POINTED_TO_CAPACITY_DEFAULTS_TO_TYPE_BOUNDARY=No permits +# CodeSonar to detect the buffer overrun in the following code. + +# void f(int x){ +# int A[10][10]; +# int *q = &A[x][0]; +# q[5] = 42; +# } +# +# void g(){ f(11); } +# +# Note that the "2$Buffer Overrun" warning class is one of several +# detectors for buffer overruns, and unlike the others is disabled +# by default. You can enable it with a WARNING_FILTER rule. +# +POINTED_TO_CAPACITY_DEFAULTS_TO_TYPE_BOUNDARY = Yes