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

Project overview: smart_open

High level conclusions

Reachability and coverage overview

Functions statically reachable by fuzzers
10.0%
26 / 249
Cyclomatic complexity statically reachable by fuzzers
12.0%
96 / 830
Runtime code coverage of functions
13.0%
33 / 249

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_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 3 18.7%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 13 81.2%
All colors 16 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 1 ...fuzz_func.TestInput call site: 00001 smart_open.smart_open_lib.parse_uri
1 6 smart_open.smart_open_lib.parse_uri call site: 00006 .locals

Runtime coverage analysis

Covered functions
41
Functions that are reachable but not covered
11
Reachable functions
15
Percentage of reachable functions covered
26.67%
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 4
smart_open.smart_open_lib 7
smart_open.transport 1
smart_open.compression 2

Fuzzer: fuzz_bytebuffer

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 1 3.03%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 32 96.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
1 15 smart_open.bytebuffer.ByteBuffer.fill call site: 00015 source.read

Runtime coverage analysis

Covered functions
42
Functions that are reachable but not covered
13
Reachable functions
19
Percentage of reachable functions covered
31.58%
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_bytebuffer 12
smart_open.bytebuffer 9

Fuzzer: fuzz_zip

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 53 69.7%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 23 30.2%
All colors 76 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
42 22 smart_open.local_file.extract_local_path call site: 00022 smart_open.smart_open_lib.open
5 7 ...fuzz_zip.TestInput call site: 00007 smart_open.compression.get_supported_compression_types
3 14 smart_open.compression.get_supported_extensions call site: 00014 smart_open.smart_open_lib._shortcut_open
1 5 ...fuzz_zip.TestInput call site: 00005 fdp.ConsumeString
1 18 smart_open.smart_open_lib._sniff_scheme call site: 00018 smart_open.local_file.extract_local_path
1 20 smart_open.local_file.extract_local_path call site: 00020 uri_as_string.replace

Runtime coverage analysis

Covered functions
42
Functions that are reachable but not covered
42
Reachable functions
48
Percentage of reachable functions covered
12.5%
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.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...fuzz_zip 11
smart_open.smart_open_lib 30
smart_open.compression 6
smart_open.local_file 3
smart_open.transport 1

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 39 69.6%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 17 30.3%
All colors 56 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
20 35 ...fuzz_util.TestInput call site: 00035 smart_open.utils.safe_urlsplit
11 15 ...fuzz_util.TestInput call site: 00015 smart_open.utils.inspect_kwargs
3 3 ...fuzz_util.TestInput call site: 00003 .min
2 7 ...fuzz_util.TestInput call site: 00007 fdp.ConsumeBool
2 28 ...fuzz_util.TestInput call site: 00028 .str
1 0 EP call site: 00000 .len

Runtime coverage analysis

Covered functions
41
Functions that are reachable but not covered
33
Reachable functions
33
Percentage of reachable functions covered
0.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_util 13
smart_open.utils 21

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
smart_open.doctools.tweak_open_docstring smart_open.doctools 1 ['N/A'] 1 0 18 3 4 31 1 98 83
smart_open.s3.open smart_open.s3 11 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 3 0 2 5 5 34 1 113 77
smart_open.s3.iter_bucket smart_open.s3 7 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 2 0 4 4 5 19 1 64 55
smart_open.ftp.open smart_open.ftp 8 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 2 0 1 3 4 17 1 56 53
smart_open.gcs.open smart_open.gcs 8 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 1 0 2 4 5 13 1 48 45
smart_open.ssh.open smart_open.ssh 7 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 1 0 1 4 5 13 1 44 41

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

Functions statically reachable by fuzzers
24.0%
59 / 249
Cyclomatic complexity statically reachable by fuzzers
26.0%
219 / 830

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
[] []
smart_open.compression ['fuzz_func', 'fuzz_zip'] []
locale [] []
smart_open.concurrency [] []
smart_open.gcs [] []
smart_open.utils ['fuzz_util'] []
smart_open.transport ['fuzz_func', 'fuzz_zip'] []
...fuzz_func ['fuzz_func'] []
gzip [] []
...fuzz_util ['fuzz_util'] []
warnings [] []
types [] []
tempfile [] []
smart_open.hdfs [] []
io [] []
smart_open [] []
smart_open.smart_open_lib ['fuzz_func', 'fuzz_zip'] []
smart_open.version [] []
...fuzz_zip ['fuzz_zip'] []
getpass [] []
smart_open.http [] []
smart_open.local_file ['fuzz_zip'] []
os [] []
ftplib [] []
smart_open.ssh [] []
requests_kerberos [] []
smart_open.s3 [] []
inspect [] []
collections [] []
logging [] []
boto3 [] []
smart_open.constants [] []
re [] []
importlib [] []
smart_open.azure [] []
subprocess [] []
smart_open.webhdfs [] []
time [] []
functools [] []
paramiko [] []
atheris [] []
zipfile [] []
base64 [] []
[] []
bz2 [] []
contextlib [] []
...fuzz_bytebuffer ['fuzz_bytebuffer'] []
requests [] []
smart_open.ftp [] []
smart_open.bytebuffer ['fuzz_bytebuffer'] []
smart_open.doctools [] []

Directories in report

Directory