Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Fuzzer details

Fuzzer: fuzz_multipart

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 3.33%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 58 96.6%
All colors 60 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 42 requests_toolbelt.multipart.decoder._header_parser call site: 00042 requests_toolbelt.multipart.encoder.encode_with

Runtime coverage analysis

Covered functions
163
Functions that are reachable but not covered
35
Reachable functions
50
Percentage of reachable functions covered
30.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_multipart 4
mock.mock 8
requests_toolbelt.multipart.decoder 28
requests_toolbelt.multipart.encoder 2
requests.structures 7

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
requests.sessions.SessionRedirectMixin.resolve_redirects requests.sessions 10 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 3 0 16 8 6 235 10 736 682
requests.models.PreparedRequest.prepare_body requests.models 4 ['N/A', 'N/A', 'N/A', 'N/A'] 1 0 2 10 7 75 0 235 202
mock.mock._patch.__enter__ mock.mock 1 ['N/A'] 4 0 5 38 18 60 1 222 179
requests.adapters.HTTPAdapter.send requests.adapters 7 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 3 0 3 10 7 138 0 439 163
requests_toolbelt.auth.guess.GuessProxyAuth.handle_407 requests_toolbelt.auth.guess 3 ['N/A', 'N/A', 'N/A'] 3 0 0 2 4 49 0 162 120
requests.models.RequestEncodingMixin._encode_files requests.models 2 ['N/A', 'N/A'] 1 0 4 11 7 29 0 95 62
requests_toolbelt.multipart.encoder.MultipartEncoder.read requests_toolbelt.multipart.encoder 2 ['N/A', 'N/A'] 2 0 2 2 4 25 3 82 58
mock.mock._patch_dict.__call__ mock.mock 2 ['N/A', 'N/A'] 2 0 0 2 4 22 0 71 53
requests.models.PreparedRequest.prepare_url requests.models 3 ['N/A', 'N/A', 'N/A'] 2 0 1 12 8 63 0 198 53
requests_toolbelt.adapters.x509.X509Adapter.__init__ requests_toolbelt.adapters.x509 3 ['N/A', 'N/A', 'N/A'] 1 0 3 4 5 18 0 60 48

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

Functions statically reachable by fuzzers
22.0%
129 / 589
Cyclomatic complexity statically reachable by fuzzers
25.0%
509 / 2022

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
[] []
zipfile [] []
charset_normalizer [] []
json [] []
pprint [] []
requests_toolbelt.utils.formdata [] []
dummy_threading [] []
base64 [] []
requests.hooks [] []
unittest [] []
requests_toolbelt.threaded [] []
requests_toolbelt.threaded.pool [] []
contextlib [] []
requests.__version__ [] []
urllib3 [] []
requests_toolbelt.adapters.ssl [] []
tempfile [] []
requests_toolbelt.streaming_iterator [] []
requests_toolbelt.utils.user_agent [] []
codecs [] []
requests.cookies [] []
requests_toolbelt.auth [] []
requests.utils [] []
simplejson [] []
requests_toolbelt.adapters.source [] []
certifi [] []
requests_toolbelt.utils.dump [] []
http [] []
mock.mock ['fuzz_multipart'] []
chardet [] []
netrc [] []
collections [] []
requests_toolbelt.utils.deprecated [] []
sys [] []
requests_toolbelt._compat [] []
hashlib [] []
os [] []
requests_toolbelt [] []
requests_toolbelt.threaded.thread [] []
requests_toolbelt.adapters.x509 [] []
mock [] []
socket [] []
requests.structures ['fuzz_multipart'] []
io [] []
[] []
requests_toolbelt.utils [] []
inspect [] []
queue [] []
asyncio [] []
requests_toolbelt.cookies [] []
requests.auth [] []
urllib [] []
requests_toolbelt.adapters.fingerprint [] []
requests.compat [] []
requests_toolbelt.auth._digest_auth_compat [] []
requests_toolbelt.adapters [] []
requests_toolbelt.auth.handler [] []
...fuzz_multipart ['fuzz_multipart'] []
threading [] []
requests.models [] []
requests_toolbelt.auth.http_proxy_digest [] []
urlparse [] []
requests_toolbelt.multipart.encoder ['fuzz_multipart'] []
copy [] []
calendar [] []
requests_toolbelt.downloadutils.stream [] []
re [] []
requests.adapters [] []
requests._internal_utils [] []
cryptography [] []
requests.help [] []
requests_toolbelt.downloadutils [] []
requests_toolbelt.auth.guess [] []
logging [] []
platform [] []
requests_toolbelt.downloadutils.tee [] []
requests_toolbelt.exceptions [] []
OpenSSL [] []
datetime [] []
requests_toolbelt.adapters.socket_options [] []
requests.status_codes [] []
mock.backports [] []
requests_toolbelt.sessions [] []
requests_toolbelt.adapters.host_header_ssl [] []
requests_toolbelt.cookies.forgetful [] []
requests_toolbelt.multipart.decoder ['fuzz_multipart'] []
requests.api [] []
requests.certs [] []
requests.packages [] []
uuid [] []
struct [] []
multiprocessing [] []
functools [] []
winreg [] []
requests.exceptions [] []
requests.sessions [] []
requests_toolbelt.multipart [] []
idna [] []
requests [] []
atheris [] []
warnings [] []
time [] []

Directories in report

Directory