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 74 69.1%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 33 30.8%
All colors 107 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
34 5 packaging.utils.canonicalize_version call site: 00005 packaging.version._cmpkey
18 63 ...fuzz_packaging.fuzz_utils call site: 00063 packaging.version.Version.__init__
7 51 ...fuzz_packaging.fuzz_utils call site: 00051 packaging.utils.canonicalize_name
3 47 packaging.utils.canonicalize_version call site: 00047 parts.append
3 59 packaging.utils.canonicalize_name call site: 00059 packaging.version.Version.__init__
2 85 packaging.tags.Tag.__init__ call site: 00085 tags.add
2 92 ...fuzz_packaging.fuzz_specifier call site: 00092 match.group
2 104 packaging.specifiers._coerce_version call site: 00104 packaging.specifiers.Specifier._get_operator
1 3 ...fuzz_packaging.fuzz_utils call site: 00003 .isinstance
1 82 packaging.tags.Tag.__init__ call site: 00082 abi.lower
1 101 ...fuzz_packaging.fuzz_specifier call site: 00101 packaging.specifiers._coerce_version

Runtime coverage analysis

Covered functions
11
Functions that are reachable but not covered
55
Reachable functions
56
Percentage of reachable functions covered
1.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.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...fuzz_packaging 10
packaging.utils 18
packaging.version 14
packaging.tags 12
packaging.specifiers 6

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'] 4 0 4 3 4 86 0 290 248
packaging.requirements.Requirement.__init__ packaging.requirements 2 ['N/A', 'N/A'] 4 0 0 5 5 48 0 158 125
packaging.metadata.parse_email packaging.metadata 1 ['N/A'] 1 0 8 11 7 30 0 97 82
packaging.markers.Marker.evaluate packaging.markers 2 ['N/A', 'N/A'] 3 0 2 2 4 42 0 138 57
packaging.specifiers.Specifier._compare_equal packaging.specifiers 3 ['N/A', 'N/A', 'N/A'] 2 0 0 2 4 34 1 114 43

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

Functions statically reachable by fuzzers
58.7%
222/378
Cyclomatic complexity statically reachable by fuzzers
59.9%
726 / 1212

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