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

Project functions overview

The following table shows data about each function in the project. The functions included in this table correspond to all functions that exist in the executables of the fuzzers. As such, there may be functions that are from third-party libraries.

For further technical details on the meaning of columns in the below table, please see the Glossary .

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined 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

Fuzzer details

Fuzzer: fuzz_select

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 347 48.8%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 363 51.1%
All colors 710 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
62 521 soupsieve.css_match.CSSMatch.match_selectors call site: 00521 soupsieve.css_match.Inputs.parse_value
32 192 soupsieve.css_types.SelectorNth.__init__ call site: 00192 soupsieve.css_parser.CSSParser.parse_selectors
21 681 soupsieve.css_match._DocumentNav.get_contents call site: 00681 soupsieve.css_match.CSSMatch.match_dir
18 595 soupsieve.css_match.CSSMatch.match_lang call site: 00595 soupsieve.css_match._DocumentNav.iter_attributes
15 655 soupsieve.css_match.CSSMatch.match_selectors call site: 00655 soupsieve.css_match.CSSMatch.match_indeterminate.get_parent_form
14 7 bs4.BeautifulSoup.__init__ call site: 00007 bs4.builder.TreeBuilderRegistry.lookup
14 459 soupsieve.css_match.CSSMatch.match_selectors call site: 00459 soupsieve.css_match.CSSMatch.match_selectors
11 42 bs4.BeautifulSoup.__init__ call site: 00042 bs4.BeautifulSoup._decode_markup
11 141 soupsieve.css_parser.CSSParser.parse_selectors call site: 00141 .print
10 26 bs4.builder.TreeBuilderRegistry.lookup call site: 00026 .len
9 671 soupsieve.css_match.CSSMatch.match_selectors call site: 00671 soupsieve.css_match._DocumentNav.is_root
8 646 soupsieve.css_match.CSSMatch.match_selectors call site: 00646 soupsieve.css_match._DocumentNav.get_tag_descendants

Runtime coverage analysis

Covered functions
331
Functions that are reachable but not covered
138
Reachable functions
236
Percentage of reachable functions covered
41.53%
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_select 5
bs4 37
bs4.builder 7
bs4.element 4
soupsieve 6
soupsieve.css_parser 80
soupsieve.util 3
soupsieve.css_match 110
soupsieve.css_types 2

Fuzzer: fuzz_filter

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 368 50.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 368 50.0%
All colors 736 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
62 543 soupsieve.css_match.CSSMatch.match_selectors call site: 00543 soupsieve.css_match.Inputs.parse_value
32 192 soupsieve.css_types.SelectorNth.__init__ call site: 00192 soupsieve.css_parser.CSSParser.parse_selectors
30 694 soupsieve.css_match.CSSMatch.match_selectors call site: 00694 soupsieve.css_match.CSSMatch.match_dir
18 617 soupsieve.css_match.CSSMatch.match_lang call site: 00617 soupsieve.css_match._DocumentNav.iter_attributes
15 678 soupsieve.css_match.CSSMatch.match_selectors call site: 00678 soupsieve.css_match.CSSMatch.match_indeterminate.get_parent_form
14 6 bs4.BeautifulSoup.__init__ call site: 00006 bs4.builder.TreeBuilderRegistry.lookup
14 474 soupsieve.css_match.CSSMatch.match_selectors call site: 00474 soupsieve.css_match.CSSMatch.match_selectors
11 41 bs4.BeautifulSoup.__init__ call site: 00041 bs4.BeautifulSoup._decode_markup
11 141 soupsieve.css_parser.CSSParser.parse_selectors call site: 00141 .print
11 452 soupsieve.css_match._DocumentNav.get_next call site: 00452 soupsieve.css_match._DocumentNav.is_content_string
10 25 bs4.builder.TreeBuilderRegistry.lookup call site: 00025 .len
9 438 soupsieve.css_match._DocumentNav.is_special_string call site: 00438 soupsieve.css_match._DocumentNav.is_cdata

Runtime coverage analysis

Covered functions
331
Functions that are reachable but not covered
153
Reachable functions
253
Percentage of reachable functions covered
39.53%
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_filter 5
bs4 37
bs4.builder 7
bs4.element 4
soupsieve 7
soupsieve.css_parser 80
soupsieve.util 3
soupsieve.css_match 124
soupsieve.css_types 2

Fuzzer: fuzz_match

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 353 48.9%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 368 51.0%
All colors 721 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
62 525 soupsieve.css_match.CSSMatch.match_selectors call site: 00525 soupsieve.css_match.Inputs.parse_value
32 196 soupsieve.css_types.SelectorNth.__init__ call site: 00196 soupsieve.css_parser.CSSParser.parse_selectors
21 685 soupsieve.css_match._DocumentNav.get_contents call site: 00685 soupsieve.css_match.CSSMatch.match_dir
18 599 soupsieve.css_match.CSSMatch.match_lang call site: 00599 soupsieve.css_match._DocumentNav.iter_attributes
15 659 soupsieve.css_match.CSSMatch.match_selectors call site: 00659 soupsieve.css_match.CSSMatch.match_indeterminate.get_parent_form
14 11 bs4.BeautifulSoup.__init__ call site: 00011 bs4.builder.TreeBuilderRegistry.lookup
14 463 soupsieve.css_match.CSSMatch.match_selectors call site: 00463 soupsieve.css_match.CSSMatch.match_selectors
11 46 bs4.BeautifulSoup.__init__ call site: 00046 bs4.BeautifulSoup._decode_markup
11 145 soupsieve.css_parser.CSSParser.parse_selectors call site: 00145 .print
10 30 bs4.builder.TreeBuilderRegistry.lookup call site: 00030 .len
9 675 soupsieve.css_match.CSSMatch.match_selectors call site: 00675 soupsieve.css_match._DocumentNav.is_root
8 650 soupsieve.css_match.CSSMatch.match_selectors call site: 00650 soupsieve.css_match._DocumentNav.get_tag_descendants

Runtime coverage analysis

Covered functions
331
Functions that are reachable but not covered
141
Reachable functions
241
Percentage of reachable functions covered
41.49%
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_match 8
bs4 37
bs4.builder 7
bs4.element 4
soupsieve 8
soupsieve.css_parser 80
soupsieve.util 3
soupsieve.css_match 110
soupsieve.css_types 2

Fuzzer: fuzz_closest

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 347 48.2%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 372 51.7%
All colors 719 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
62 521 soupsieve.css_match.CSSMatch.match_selectors call site: 00521 soupsieve.css_match.Inputs.parse_value
32 192 soupsieve.css_types.SelectorNth.__init__ call site: 00192 soupsieve.css_parser.CSSParser.parse_selectors
21 681 soupsieve.css_match._DocumentNav.get_contents call site: 00681 soupsieve.css_match.CSSMatch.match_dir
18 595 soupsieve.css_match.CSSMatch.match_lang call site: 00595 soupsieve.css_match._DocumentNav.iter_attributes
15 655 soupsieve.css_match.CSSMatch.match_selectors call site: 00655 soupsieve.css_match.CSSMatch.match_indeterminate.get_parent_form
14 7 bs4.BeautifulSoup.__init__ call site: 00007 bs4.builder.TreeBuilderRegistry.lookup
14 459 soupsieve.css_match.CSSMatch.match_selectors call site: 00459 soupsieve.css_match.CSSMatch.match_selectors
11 42 bs4.BeautifulSoup.__init__ call site: 00042 bs4.BeautifulSoup._decode_markup
11 141 soupsieve.css_parser.CSSParser.parse_selectors call site: 00141 .print
10 26 bs4.builder.TreeBuilderRegistry.lookup call site: 00026 .len
9 671 soupsieve.css_match.CSSMatch.match_selectors call site: 00671 soupsieve.css_match._DocumentNav.is_root
8 646 soupsieve.css_match.CSSMatch.match_selectors call site: 00646 soupsieve.css_match._DocumentNav.get_tag_descendants

Runtime coverage analysis

Covered functions
331
Functions that are reachable but not covered
138
Reachable functions
241
Percentage of reachable functions covered
42.74%
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_closest 7
bs4 37
bs4.builder 7
bs4.element 4
soupsieve 8
soupsieve.css_parser 80
soupsieve.util 3
soupsieve.css_match 111
soupsieve.css_types 2

Fuzz engine guidance

This sections provides heuristics that can be used as input to a fuzz engine when running a given fuzz target. The current focus is on providing input that is usable by libFuzzer.

/src/fuzz_select.py

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['soupsieve.css_match.CSSMatch.match_selectors', 'soupsieve.css_types.SelectorNth.__init__', 'soupsieve.css_match._DocumentNav.get_contents', 'soupsieve.css_match.CSSMatch.match_lang', 'bs4.BeautifulSoup.__init__', 'soupsieve.css_parser.CSSParser.parse_selectors', 'bs4.builder.TreeBuilderRegistry.lookup']

/src/fuzz_filter.py

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['soupsieve.css_match.CSSMatch.match_selectors', 'soupsieve.css_types.SelectorNth.__init__', 'soupsieve.css_match.CSSMatch.match_lang', 'bs4.BeautifulSoup.__init__', 'soupsieve.css_parser.CSSParser.parse_selectors', 'soupsieve.css_match._DocumentNav.get_next']

/src/fuzz_match.py

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['soupsieve.css_match.CSSMatch.match_selectors', 'soupsieve.css_types.SelectorNth.__init__', 'soupsieve.css_match._DocumentNav.get_contents', 'soupsieve.css_match.CSSMatch.match_lang', 'bs4.BeautifulSoup.__init__', 'soupsieve.css_parser.CSSParser.parse_selectors', 'bs4.builder.TreeBuilderRegistry.lookup']

/src/fuzz_closest.py

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['soupsieve.css_match.CSSMatch.match_selectors', 'soupsieve.css_types.SelectorNth.__init__', 'soupsieve.css_match._DocumentNav.get_contents', 'soupsieve.css_match.CSSMatch.match_lang', 'bs4.BeautifulSoup.__init__', 'soupsieve.css_parser.CSSParser.parse_selectors', 'bs4.builder.TreeBuilderRegistry.lookup']

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
bs4.element.PageElement.insert 34 13 38.23% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
bs4.element.Tag.__init__ 64 29 45.31% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
bs4.element.ResultSet.__getattr__ 203 64 31.52% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
bs4.builder._html5lib.TextNode.cloneNode 61 0 0.0% []
match.end 40 21 52.5% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
bs4.dammit.chardet_dammit 356 133 37.35% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
html.parser.attrfind.match 994 51 5.130% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
soupsieve.css_match.Inputs.parse_value 49 2 4.081% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
soupsieve.css_match.CSSMatch.extended_language_filter 33 0 0.0% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
soupsieve.css_match.CSSMatch.match_nth 80 3 3.75% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
soupsieve.css_match.CSSMatch.match_indeterminate.get_parent_form 47 0 0.0% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
soupsieve.css_match.CSSMatch.match_lang 63 31 49.20% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
soupsieve.css_match.CSSMatch.match_dir 39 0 0.0% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']
bs4.builder._lxml.LXMLTreeBuilder.test_fragment_to_document 89 15 16.85% ['fuzz_filter', 'fuzz_select', 'fuzz_closest', 'fuzz_match']

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
[] []
soupsieve.css_types ['fuzz_select', 'fuzz_filter', 'fuzz_match', 'fuzz_closest'] []
time [] []
...fuzz_select ['fuzz_select'] []
bs4.formatter [] []
soupsieve.__meta__ [] []
tempfile [] []
codecs [] []
pstats [] []
random [] []
chardet [] []
logging [] []
unicodedata [] []
soupsieve.css_parser ['fuzz_select', 'fuzz_filter', 'fuzz_match', 'fuzz_closest'] []
cProfile [] []
atheris [] []
...fuzz_filter ['fuzz_filter'] []
...fuzz_closest ['fuzz_closest'] []
pickle [] []
bs4.dammit [] []
bs4.builder ['fuzz_select', 'fuzz_filter', 'fuzz_match', 'fuzz_closest'] []
collections [] []
os [] []
bs4.builder._html5lib [] []
warnings [] []
bs4.diagnose [] []
re [] []
soupsieve.util ['fuzz_select', 'fuzz_filter', 'fuzz_match', 'fuzz_closest'] []
soupsieve.pretty [] []
io [] []
datetime [] []
bs4.element ['fuzz_select', 'fuzz_filter', 'fuzz_match', 'fuzz_closest'] []
unittest [] []
copy [] []
cchardet [] []
...fuzz_match ['fuzz_match'] []
sys [] []
copyreg [] []
html [] []
soupsieve ['fuzz_select', 'fuzz_filter', 'fuzz_match', 'fuzz_closest'] []
soupsieve.css_match ['fuzz_select', 'fuzz_filter', 'fuzz_match', 'fuzz_closest'] []
functools [] []
traceback [] []
html5lib [] []
[] []
typing [] []
bs4.builder._lxml [] []
bs4.builder._htmlparser [] []
bs4.testing [] []
lxml [] []
bs4 ['fuzz_select', 'fuzz_filter', 'fuzz_match', 'fuzz_closest'] []

Directories in report

Directory