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

Fuzzer details

Fuzzer: fuzz_tokencache

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 38.4%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 8 61.5%
All colors 13 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 4 ...fuzz_tokencache.TestInput call site: 00004 .dict
1 0 EP call site: 00000 .len
1 9 ...fuzz_tokencache.TestInput call site: 00009 cache.add

Runtime coverage analysis

Covered functions
151
Functions that are reachable but not covered
10
Reachable functions
11
Percentage of reachable functions covered
9.09%
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_tokencache 10

Fuzzer: fuzz_auth

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 450 96.5%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 16 3.43%
All colors 466 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
304 154 requests.structures.CaseInsensitiveDict.__init__ call site: 00154 requests.sessions.Session.send
138 15 ...fuzz_auth.TestInput call site: 00015 msal.application.ClientApplication._get_authority_aliases
4 8 ...fuzz_auth.TestInput call site: 00008 kwargs.pop
2 5 ...fuzz_auth.TestInput call site: 00005 instance.rstrip
1 13 ...fuzz_auth.TestInput call site: 00013 ...fuzz_auth.FuzzHttpClient.__init__
1 464 msal.application.extract_certs call site: 00464 public_cert_content.strip

Runtime coverage analysis

Covered functions
154
Functions that are reachable but not covered
243
Reachable functions
259
Percentage of reachable functions covered
6.18%
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_auth 10
msal.authority 2
msal.application 21
msal.cloudshell 1
requests.sessions 80
requests.models 76
requests.cookies 27
requests.utils 75
requests._internal_utils 6
requests.structures 4
requests.hooks 2
requests.auth 8

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
msal.application.ClientApplication._acquire_token_silent_with_error msal.application 8 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 9 0 2 6 5 366 3 1193 445
requests.adapters.HTTPAdapter.send requests.adapters 7 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 5 0 3 10 7 80 0 264 117
requests.auth.HTTPDigestAuth.handle_401 requests.auth 3 ['N/A', 'N/A', 'N/A'] 3 0 7 3 4 38 0 126 105
msal.application.ClientApplication.acquire_token_by_username_password msal.application 7 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 7 0 2 6 5 304 0 982 78
msal.managed_identity.ManagedIdentityClient.acquire_token_for_client msal.managed_identity 3 ['N/A', 'N/A', 'N/A'] 3 0 3 9 7 35 0 118 76
msal.oauth2cli.oauth2.Client.obtain_token_by_browser msal.oauth2cli.oauth2 4 ['N/A', 'N/A', 'N/A', 'N/A'] 5 0 2 2 4 45 0 139 76
msal.application.ClientApplication.__init__ msal.application 21 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 5 0 5 5 5 306 0 992 63
msal.oauth2cli.authcode._AuthCodeHandler.do_GET msal.oauth2cli.authcode 1 ['N/A'] 2 0 4 3 4 24 0 76 58
msal.__main__._acquire_token_interactive msal.__main__ 3 ['N/A', 'N/A', 'N/A'] 3 0 3 3 4 21 2 69 54
requests.utils.extract_zipped_paths requests.utils 1 ['N/A'] 2 0 2 5 5 16 1 53 47

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

Functions statically reachable by fuzzers
42.0%
200 / 472
Cyclomatic complexity statically reachable by fuzzers
46.0%
749 / 1642

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

Runtime coverage analysis

This section shows analysis of runtime coverage data.

For futher technical details on how this section is generated, please see the Glossary .

Complex functions with low coverage

Func name Function total lines Lines covered at runtime percentage covered Reached by fuzzers
msal.managed_identity.ManagedIdentityClient.acquire_token_for_client 32 1 3.125% []
msal.application.ClientApplication.__init__ 44 1 2.272% []
msal.application.ClientApplication._build_client 44 0 0.0% []
msal.application.ClientApplication._acquire_token_silent_from_cache_and_possibly_refresh_it 54 0 0.0% []
re.match 42 16 38.09% []
requests.adapters.HTTPAdapter.send 45 0 0.0% []
requests.sessions.SessionRedirectMixin.resolve_redirects 50 0 0.0% ['fuzz_auth']
requests.sessions.Session.send 36 0 0.0% ['fuzz_auth']
rt.get 158 47 29.74% []
requests.utils.super_len 32 0 0.0% ['fuzz_auth']
requests.utils.get_netrc_auth 32 0 0.0% ['fuzz_auth']
collections.abc.MutableMapping.update 238 76 31.93% []
requests.models.RequestEncodingMixin._encode_files 38 0 0.0% ['fuzz_auth']
requests.models.PreparedRequest.prepare_url 39 0 0.0% ['fuzz_auth']
requests.models.PreparedRequest.prepare_body 38 0 0.0% ['fuzz_auth']
requests.auth.HTTPDigestAuth.build_digest_header.sha512_utf8 44 0 0.0% []
urllib3.util.ssl_.create_urllib3_context.load_verify_locations 175 78 44.57% []
urllib3.util.retry.Retry.from_int 175 61 34.85% []
r.register_hook 237 87 36.70% []
urllib3.contrib.socks.SOCKSProxyManager 83 9 10.84% []
url.strip 206 60 29.12% []
x.encode 69 20 28.98% []
urllib3.fields.RequestField.make_multipart 93 20 21.50% ['fuzz_auth']
urllib3.filepost.encode_multipart_formdata 37 13 35.13% ['fuzz_auth']
d.items 188 24 12.76% []

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
[] []
msal.__main__ [] []
warnings [] []
dotenv [] []
requests.packages [] []
html [] []
requests.help [] []
atexit [] []
time [] []
jwt [] []
string [] []
tempfile [] []
cryptography [] []
winreg [] []
urllib [] []
urllib3 [] []
os [] []
requests.api [] []
msal.oauth2cli.http [] []
functools [] []
msal.oauth2cli.oauth2 [] []
netrc [] []
msal_extensions [] []
msal.broker [] []
msal.telemetry [] []
importlib [] []
msal.oauth2cli.authcode [] []
json [] []
requests.cookies ['fuzz_auth'] []
zipfile [] []
requests.utils ['fuzz_auth'] []
requests.status_codes [] []
msal.region [] []
requests.exceptions [] []
struct [] []
requests.certs [] []
webbrowser [] []
requests.adapters [] []
msal.throttled_http_client [] []
logging [] []
certifi [] []
datetime [] []
requests.structures ['fuzz_auth'] []
chardet [] []
uuid [] []
socket [] []
msal.authority ['fuzz_auth'] []
msal.auth_scheme [] []
requests.auth ['fuzz_auth'] []
argparse [] []
urlparse [] []
requests._internal_utils ['fuzz_auth'] []
msal.managed_identity [] []
sys [] []
simplejson [] []
copy [] []
dummy_threading [] []
msal.wstrust_request [] []
xml [] []
codecs [] []
getpass [] []
requests.hooks ['fuzz_auth'] []
...fuzz_tokencache ['fuzz_tokencache'] []
platform [] []
collections [] []
msal.individual_cache [] []
random [] []
requests.compat [] []
charset_normalizer [] []
msal.oauth2cli.oidc [] []
msal [] []
msal.application ['fuzz_auth'] []
hashlib [] []
requests.sessions ['fuzz_auth'] []
base64 [] []
idna [] []
threading [] []
requests [] []
calendar [] []
requests.models ['fuzz_auth'] []
msal.cloudshell ['fuzz_auth'] []
...fuzz_auth ['fuzz_auth'] []
[] []
atheris [] []
msal.oauth2cli.assertion [] []
pymsalruntime [] []
heapq [] []
binascii [] []
re [] []
msal.oauth2cli [] []
msal.wstrust_response [] []
requests.__version__ [] []
http [] []
cgi [] []
subprocess [] []

Directories in report

Directory