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

Fuzzer details

Fuzzer: fuzz_packaging

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 76 76.7%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 23 23.2%
All colors 99 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
40 3 ...fuzz_packaging.fuzz_utils call site: 00003 packaging.version.Version.__init__
19 57 ...fuzz_packaging.fuzz_utils call site: 00057 packaging.version.Version.__init__
6 44 ...fuzz_packaging.fuzz_utils call site: 00044 packaging.utils.canonicalize_name
3 53 packaging.utils.canonicalize_name call site: 00053 packaging.version.Version.__init__
3 78 packaging.tags.Tag.__init__ call site: 00078 .hash
2 86 ...fuzz_packaging.fuzz_specifier call site: 00086 match.group
2 91 ...fuzz_packaging.fuzz_specifier call site: 00091 fdp.ConsumeIntInRange
1 95 ...fuzz_packaging.fuzz_specifier call site: 00095 packaging.specifiers._coerce_version

Runtime coverage analysis

Covered functions
8
Functions that are reachable but not covered
54
Reachable functions
55
Percentage of reachable functions covered
1.82%
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_packaging 10
packaging.utils 16
packaging.version 15
packaging.tags 12
packaging.specifiers 4

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
packaging.tags.sys_tags packaging.tags 1 ['N/A'] 5 0 4 3 4 62 0 214 178
packaging.metadata.Metadata.from_email packaging.metadata 3 ['N/A', 'N/A', 'N/A'] 3 0 2 3 4 38 0 124 109
packaging._manylinux.platform_tags packaging._manylinux 1 ['N/A'] 5 0 4 6 5 29 0 97 73
packaging._parser._parse_requirement_details packaging._parser 1 ['N/A'] 6 0 5 4 5 22 2 76 70
packaging.markers.Marker.evaluate packaging.markers 2 ['N/A', 'N/A'] 3 0 2 2 4 26 0 84 66
packaging.licenses.canonicalize_license_expression packaging.licenses 1 ['N/A'] 1 0 7 12 8 17 0 59 53
packaging.specifiers.Specifier._compare_equal packaging.specifiers 3 ['N/A', 'N/A', 'N/A'] 2 0 0 2 4 20 0 64 52

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

Functions statically reachable by fuzzers
37.0%
82 / 222
Cyclomatic complexity statically reachable by fuzzers
41.0%
310 / 755

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
[] []
sysconfig [] []
packaging [] []
packaging.version ['fuzz_packaging'] []
version [] []
sys [] []
subprocess [] []
atheris [] []
ctypes [] []
[] []
collections [] []
utils [] []
re [] []
packaging.markers [] []
packaging.utils ['fuzz_packaging'] []
packaging.licenses [] []
_elffile [] []
packaging.specifiers ['fuzz_packaging'] []
_manylinux [] []
_parser [] []
logging [] []
licenses [] []
ast [] []
packaging.licenses._spdx [] []
platform [] []
specifiers [] []
pathlib [] []
...fuzz_packaging ['fuzz_packaging'] []
requirements [] []
packaging._manylinux [] []
packaging._parser [] []
warnings [] []
packaging._structures [] []
packaging._musllinux [] []
packaging._tokenizer [] []
packaging._elffile [] []
packaging.requirements [] []
markers [] []
itertools [] []
packaging.tags ['fuzz_packaging'] []
typing [] []
os [] []
_musllinux [] []
struct [] []
packaging.metadata [] []

Directories in report

Directory