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

Project overview: lxml

High level conclusions

Reachability and coverage overview

Functions statically reachable by fuzzers
6.0%
20 / 318
Cyclomatic complexity statically reachable by fuzzers
7.00%
75 / 1153
Runtime code coverage of functions
4.0%
14 / 318

Fuzzer details

Fuzzer: fuzz_xmlschema

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 25.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 6 75.0%
All colors 8 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 4 ...fuzz_xmlschema.TestOneInput call site: 00004 etree.XMLSchema

Runtime coverage analysis

Covered functions
10
Functions that are reachable but not covered
5
Reachable functions
6
Percentage of reachable functions covered
16.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_xmlschema 5

Fuzzer: fuzz_sax

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 91.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 5 8.62%
All colors 58 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
53 2 ...fuzz_sax.TestOneInput call site: 00002 lxml.sax.ElementTreeProducer.saxify

Runtime coverage analysis

Covered functions
9
Functions that are reachable but not covered
46
Reachable functions
46
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.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/ 1
...fuzz_sax 7
lxml.sax 38

Fuzzer: fuzz_html_parse

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 0 0.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 6 100.%
All colors 6 100

Runtime coverage analysis

Covered functions
9
Functions that are reachable but not covered
5
Reachable functions
5
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_html_parse 4

Fuzzer: fuzz_xml_parse

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 16.6%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 5 83.3%
All colors 6 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 2 ...fuzz_xml_parse.TestOneInput call site: 00002 etree.ElementTree

Runtime coverage analysis

Covered functions
9
Functions that are reachable but not covered
6
Reachable functions
6
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_xml_parse 5

Fuzzer: fuzz_schematron

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 14 58.3%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 10 41.6%
All colors 24 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
10 12 lxml.isoschematron.Schematron.__init__ call site: 00012 lxml.isoschematron._stylesheet_param_dict
3 2 ...fuzz_schematron.TestOneInput call site: 00002 lxml.isoschematron.Schematron.__init__
1 8 lxml.isoschematron.Schematron.__init__ call site: 00008 _etree.parse

Runtime coverage analysis

Covered functions
10
Functions that are reachable but not covered
17
Reachable functions
21
Percentage of reachable functions covered
19.05%
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_schematron 5
lxml.isoschematron 15

Fuzzer: fuzz_xslt

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 0 0.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 6 100.%
All colors 6 100

Runtime coverage analysis

Covered functions
8
Functions that are reachable but not covered
4
Reachable functions
4
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_xslt 3

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
lxml.html._diffcommand.main lxml.html._diffcommand 1 ['N/A'] 6 0 5 5 5 115 1 379 367
lxml.doctestcompare.LXMLOutputChecker.output_difference lxml.doctestcompare 4 ['N/A', 'N/A', 'N/A', 'N/A'] 5 0 3 3 4 48 0 163 139
lxml.ElementInclude._include lxml.ElementInclude 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 3 0 2 15 9 22 2 82 73
lxml.html.soupparser._parse lxml.html.soupparser 4 ['N/A', 'N/A', 'N/A', 'N/A'] 2 0 0 6 5 23 3 78 69
lxml.html.HtmlMixin.rewrite_links lxml.html 4 ['N/A', 'N/A', 'N/A', 'N/A'] 7 0 4 7 6 24 3 90 65
lxml.html._html5builder.TreeBuilder.insertRoot lxml.html._html5builder 2 ['N/A', 'N/A'] 3 0 7 2 4 26 0 91 52
lxml.html.formfill._fill_form lxml.html.formfill 2 ['N/A', 'N/A'] 3 0 2 7 6 19 2 69 50

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

Functions statically reachable by fuzzers
31.0%
100 / 318
Cyclomatic complexity statically reachable by fuzzers
35.0%
401 / 1153

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
[] []
lxml.isoschematron ['fuzz_schematron'] []
...fuzz_sax ['fuzz_sax'] []
lxml.includes.libxml [] []
tempfile [] []
os [] []
lxml.includes.libexslt [] []
...fuzz_xslt ['fuzz_xslt'] []
lxml.pyclasslookup [] []
urllib2 [] []
lxml.builder [] []
lxml.sax ['fuzz_sax'] []
cssselect [] []
collections [] []
lxml.includes.extlibs [] []
lxml [] []
lxml.html._html5builder [] []
lxml.html._diffcommand [] []
lxml._elementpath [] []
...fuzz_xml_parse ['fuzz_xml_parse'] []
doctest [] []
etree [] []
optparse [] []
urlparse [] []
lxml.html.soupparser [] []
...fuzz_schematron ['fuzz_schematron'] []
[] []
lxml.ElementInclude [] []
sys [] []
html [] []
webbrowser [] []
lxml.html._setmixin [] []
lxml.html.clean [] []
lxml.html.builder [] []
lxml.html.formfill [] []
lxml.html.html5parser [] []
...fuzz_xmlschema ['fuzz_xmlschema'] []
re [] []
lxml.html.defs [] []
lxml.html.diff [] []
bs4 [] []
io [] []
difflib [] []
lxml.html.usedoctest [] []
lxml.usedoctest [] []
test_utils [] []
lxml.includes.libxslt [] []
...fuzz_html_parse ['fuzz_html_parse'] []
lxml.cssselect [] []
lxml.doctestcompare [] []
xml [] []
atheris [] []
cgi [] []
lxml.includes [] []
html5lib [] []
lxml.html.ElementSoup [] []
BeautifulSoup [] []
urllib [] []
lxml.html [] []
functools [] []

Directories in report

Directory