Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues
Report generation date: 2023-06-07

Project overview: redis-py

High level conclusions

Reachability and coverage overview

Functions statically reachable by fuzzers
2.0%
37 / 1540
Cyclomatic complexity statically reachable by fuzzers
2.0%
124 / 5153
Runtime code coverage of functions
7.00%
105 / 1540

Warning: The number of runtime covered functions are larger than the number of reachable functions. This means that Fuzz Introspector found there are more functions covered at runtime than what is considered reachable based on the static analysis. This is a limitation in the analysis as anything covered at runtime is by definition reachable by the fuzzers.
This is likely due to a limitation in the static analysis. In this case, the count of functions covered at runtime is the true value, which means this is what should be considered "achieved" by the fuzzer.

Use the project functions table below to query all functions that were not covered at runtime.

Fuzzer details

Fuzzer: fuzz_helper

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 38 38.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 62 62.0%
All colors 100 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
14 63 redis.commands.helpers.decode_dict_keys call site: 00063 redis.commands.helpers.quote_string
11 26 redis.commands.helpers.list_or_args call site: 00026 redis.commands.helpers.list_or_args
6 93 redis.commands.helpers.stringify_param_value call site: 00093 redis.commands.helpers.stringify_param_value
2 47 redis.commands.helpers.parse_to_list call site: 00047 redis.commands.helpers.parse_to_dict
2 83 redis.commands.helpers.quote_string call site: 00083 redis.commands.helpers.stringify_param_value
1 40 redis.commands.helpers.nativestr call site: 00040 redis.commands.helpers.parse_to_list
1 59 redis.commands.helpers.parse_to_dict call site: 00059 redis.commands.helpers.decode_dict_keys
1 78 redis.commands.helpers.quote_string call site: 00078 v.decode

Runtime coverage analysis

Covered functions
127
Functions that are reachable but not covered
28
Reachable functions
38
Percentage of reachable functions covered
26.32%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...fuzz_helper 16
redis.commands.helpers 24

Fuzzer: fuzz_encoder

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 5 12.5%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 35 87.5%
All colors 40 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
3 34 redis.connection.BaseParser.parse_error call site: 00034 .len
1 10 redis.connection.Encoder.encode call site: 00010 .type
1 22 redis.connection.Encoder.decode call site: 00022 value.tobytes

Runtime coverage analysis

Covered functions
128
Functions that are reachable but not covered
16
Reachable functions
20
Percentage of reachable functions covered
20.0%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...fuzz_encoder 10
redis.connection 9

Fuzzer: fuzz_util

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 2 6.06%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 31 93.9%
All colors 33 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
2 4 redis.utils.safe_str call site: 00004 .isinstance

Runtime coverage analysis

Covered functions
128
Functions that are reachable but not covered
16
Reachable functions
19
Percentage of reachable functions covered
15.79%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...fuzz_util 10
redis.utils 8

Fuzzer: fuzz_backoff

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 12 24.4%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 37 75.5%
All colors 49 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
3 39 ...fuzz_backoff.TestInput call site: 00039 fdp.ConsumeInt
3 44 ...fuzz_backoff.TestInput call site: 00044 .max
2 26 ...fuzz_backoff.TestInput call site: 00026 .min
2 35 ...fuzz_backoff.TestInput call site: 00035 .min
1 8 ...fuzz_backoff.TestInput call site: 00008 .super
1 18 ...fuzz_backoff.TestInput call site: 00018 .min

Runtime coverage analysis

Covered functions
128
Functions that are reachable but not covered
15
Reachable functions
20
Percentage of reachable functions covered
25.0%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...fuzz_backoff 15
redis.backoff 4

Fuzzer: fuzz_func

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 51 41.8%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 71 58.1%
All colors 122 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
14 53 ...fuzz_func.TestInput call site: 00053 redis.client.parse_info
14 90 redis.client.CaseInsensitiveDict.__init__ call site: 00090 redis.client.CaseInsensitiveDict.get
10 111 redis.client.CaseInsensitiveDict.update call site: 00111 fdp.ConsumeString
6 82 redis.client.parse_info call site: 00082 redis.client.parse_info
3 106 redis.client.CaseInsensitiveDict.get call site: 00106 redis.client.CaseInsensitiveDict.update
2 20 redis.client.parse_debug_object call site: 00020 .isinstance
1 25 redis.client.parse_debug_object call site: 00025 .int
1 50 ...fuzz_func.TestInput call site: 00050 .str

Runtime coverage analysis

Covered functions
127
Functions that are reachable but not covered
31
Reachable functions
42
Percentage of reachable functions covered
26.19%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...fuzz_func 17
redis.client 23
redis.utils 2

Analyses and suggestions

Optimal target analysis

Remaining optimal interesting functions

The following table shows a list of functions that are optimal targets. Optimal targets are identified by finding the functions that in combination, yield a high code coverage.

Func name Functions filename Arg count Args Function depth hitcount instr count bb count cyclomatic complexity Reachable functions Incoming references total cyclomatic complexity Unreached complexity
redis.cluster.ClusterPipeline.send_cluster_commands redis.cluster 4 ['N/A', 'N/A', 'N/A', 'N/A'] 9 0 1 2 4 137 1 459 400
redis.asyncio.cluster.ClusterPipeline.execute redis.asyncio.cluster 3 ['N/A', 'N/A', 'N/A'] 12 0 4 3 4 129 0 447 283
redis.connection.SSLConnection._connect redis.connection 1 ['N/A'] 3 0 10 8 6 57 0 184 178
redis.commands.graph.commands.GraphCommands.query redis.commands.graph.commands 6 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 17 0 3 4 5 104 34 344 134
redis.commands.search.commands.SearchCommands.sugadd redis.commands.search.commands 4 ['N/A', 'N/A', 'N/A', 'N/A'] 12 0 5 2 4 126 0 422 101
redis.client.PubSub.on_connect redis.client 2 ['N/A', 'N/A'] 9 0 5 2 4 107 0 359 54
redis.commands.search.commands.SearchCommands.profile redis.commands.search.commands 4 ['N/A', 'N/A', 'N/A', 'N/A'] 9 0 3 4 5 79 0 264 52

Implementing fuzzers that target the above functions will improve reachability such that it becomes:

Functions statically reachable by fuzzers
15.0%
224 / 1540
Cyclomatic complexity statically reachable by fuzzers
16.0%
826 / 5153

All functions overview

If you implement fuzzers for these functions, the status of all functions in the project will be:

Func name Functions filename Args Function call depth Reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Files and Directories in report

This section shows which files and directories are considered in this report. The main reason for showing this is fuzz introspector may include more code in the reasoning than is desired. This section helps identify if too many files/directories are included, e.g. third party code, which may be irrelevant for the threat model. In the event too much is included, fuzz introspector supports a configuration file that can exclude data from the report. See the following link for more information on how to create a config file: link

Files in report

Source file Reached by Covered by
[] []
redis.asyncio.cluster [] []
io [] []
redis.retry [] []
redis.backoff ['fuzz_backoff'] []
redis.commands.search._util [] []
redis.asyncio.lock [] []
redis.commands.graph [] []
typing_extensions [] []
redis.commands.redismodules [] []
redis.commands.search.result [] []
redis.commands.json.commands [] []
json [] []
redis.commands.graph.exceptions [] []
datetime [] []
threading [] []
redis.typing [] []
redis.asyncio.sentinel [] []
functools [] []
redis.asyncio.retry [] []
importlib [] []
atheris [] []
random [] []
redis.cluster [] []
importlib_metadata [] []
redis.sentinel [] []
...fuzz_util ['fuzz_util'] []
redis.commands.timeseries [] []
redis.commands.bf [] []
queue [] []
sys [] []
redis.compat [] []
redis.asyncio [] []
async_timeout [] []
redis [] []
typing [] []
socket [] []
redis.commands.search.document [] []
redis.commands.search.querystring [] []
warnings [] []
itertools [] []
redis.asyncio.parser [] []
types [] []
...fuzz_func ['fuzz_func'] []
redis.commands.graph.commands [] []
redis.commands.graph.execution_plan [] []
redis.commands.json._util [] []
redis.lock [] []
redis.commands.search.commands [] []
redis.commands.graph.node [] []
copy [] []
...fuzz_helper ['fuzz_helper'] []
time [] []
redis.commands.graph.query_result [] []
redis.commands.search.reducers [] []
asyncio [] []
[] []
redis.commands.search [] []
os [] []
redis.commands.graph.path [] []
redis.commands.json.path [] []
distutils [] []
redis.ocsp [] []
redis.connection ['fuzz_encoder'] []
redis.commands.graph.edge [] []
hiredis [] []
binascii [] []
redis.commands [] []
redis.commands.search.suggestion [] []
hashlib [] []
requests [] []
redis.asyncio.client [] []
...fuzz_encoder ['fuzz_encoder'] []
redis.commands.json [] []
redis.commands.timeseries.commands [] []
base64 [] []
urllib [] []
redis.commands.bf.info [] []
redis.commands.search.field [] []
redis.client ['fuzz_func'] []
collections [] []
weakref [] []
redis.commands.search.query [] []
re [] []
redis.commands.parser [] []
redis.asyncio.connection [] []
redis.commands.helpers ['fuzz_helper'] []
uuid [] []
redis.crc [] []
redis.commands.search.indexDefinition [] []
...fuzz_backoff ['fuzz_backoff'] []
redis.commands.sentinel [] []
redis.asyncio.utils [] []
redis.commands.cluster [] []
redis.commands.search.aggregation [] []
redis.commands.timeseries.info [] []
redis.credentials [] []
redis.commands.core [] []
ssl [] []
OpenSSL [] []
redis.exceptions [] []
redis.commands.bf.commands [] []
redis.commands.json.decoders [] []
cryptography [] []
inspect [] []
redis.commands.timeseries.utils [] []
redis.utils ['fuzz_util', 'fuzz_func'] []

Directories in report

Directory