1.5.10. Migration to 7.11.6

1.5.10.1. Stylechecks

Default behavior of rules utilizing taint analysis

Taint analysis identifies data flows originating from specific code locations (sources) that reach other code locations (sinks). Such flows should not reach sinks without being sanitized – that is, checked for validity or modified so that the flow is no longer sensitive. For example, a routine that returns a password typed at a prompt may be considered a source, writing to a database may be considered a sink, and proper password hashing may be considered a sanitizer.

Prior to this release, the logic for determining sources and sinks was imprecise, causing too many locations to be identified as either. The following rules were affected:

To address this issue, we introduced new options all_external_functions_as_sources and all_external_functions_as_sinks to all of these rules and provided sensible defaults. When enabled, non-excluded external functions are considered sources (or sinks), where “external” means “declaration-only within the IR or declared in a system header”. Reasonable default exclusions have been implemented, but further exclusions may be configured in the external_source and sinks options of these rules.

Due to these changes, you may initially encounter more false-positive findings with the aforementioned rules, as more locations may be spuriously identified as default sources or sinks. In such cases, you should add these locations/routines as exclusions. If you believe an exclusion should be universal (such as a library function that never produces tainted data), please contact our support team so we can assess and implement your proposal internally.