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_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 321 85.1%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 56 14.8%
All colors 377 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
120 172 lark.visitors.Transformer_InPlace.transform call site: 00172 lark.load_grammar.GrammarBuilder.do_import
38 14 lark.lark.Lark.__init__ call site: 00014 lark.lark.Lark._load
26 56 lark.utils._deserialize call site: 00056 lark.lark.Lark._deserialize_lexer_conf
22 129 lark.lark.Lark.__init__ call site: 00129 lark.load_grammar.GrammarBuilder.load_grammar
15 317 lark.lexer.BasicLexer.__init__ call site: 00317 lark.lexer._check_regex_collisions
14 333 lark.lexer._check_regex_collisions call site: 00333 lark.lark.Lark.save
12 116 lark.parser_frontends._wrap_lexer call site: 00116 lark.parser_frontends.create_contextual_lexer
11 352 lark.utils.Serialize.memo_serialize call site: 00352 lark.utils._serialize
8 306 lark.parser_frontends._construct_parsing_frontend call site: 00306 lark.lark.Lark._build_lexer
7 83 lark.lark.Lark._prepare_callbacks call site: 00083 lark.parse_tree_builder.ParseTreeBuilder._init_builders
7 162 lark.common.ParserConf.__init__ call site: 00162 lark.load_grammar._get_parser
6 370 lark.lark.Lark.parse call site: 00370 lark.parser_frontends.ParsingFrontend._verify_start

Runtime coverage analysis

Covered functions
58
Functions that are reachable but not covered
192
Reachable functions
200
Percentage of reachable functions covered
4.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_parse 5
lark.lark 47
lark.load_grammar 88
lark.utils 33
lark.parser_frontends 25
lark.parse_tree_builder 11
lark.lexer 20
lark.grammar 3
lark.common 2
lark.visitors 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
lark.reconstruct.Reconstructor.reconstruct lark.reconstruct 4 ['N/A', 'N/A', 'N/A', 'N/A'] 8 0 2 2 4 109 0 354 258
lark.load_grammar.Grammar.compile lark.load_grammar 3 ['N/A', 'N/A', 'N/A'] 5 0 5 12 8 66 0 209 116
lark.parsers.lalr_parser.LALR_Parser.parse lark.parsers.lalr_parser 4 ['N/A', 'N/A', 'N/A', 'N/A'] 4 0 1 6 5 21 0 69 57
lark.tools.standalone.gen_standalone lark.tools.standalone 4 ['N/A', 'N/A', 'N/A', 'N/A'] 2 0 23 3 4 22 2 74 56
lark.lexer._create_unless lark.lexer 4 ['N/A', 'N/A', 'N/A', 'N/A'] 2 0 2 4 5 29 2 92 44
lark.parser_frontends.create_earley_parser lark.parser_frontends 3 ['N/A', 'N/A', 'N/A'] 6 0 0 2 4 55 0 178 43
lark.parsers.lalr_analysis.LALR_Analyzer.compute_lalr1_states lark.parsers.lalr_analysis 1 ['N/A'] 2 0 7 9 7 18 2 61 40

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

Functions statically reachable by fuzzers
25.0%
155 / 623
Cyclomatic complexity statically reachable by fuzzers
28.0%
578 / 2072

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 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

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
[] []
lark.parsers.xearley [] []
lark.load_grammar ['fuzz_parse'] []
os [] []
lark.parser_frontends ['fuzz_parse'] []
functools [] []
logging [] []
lark.parse_tree_builder ['fuzz_parse'] []
lark.parsers.cyk [] []
lark.reconstruct [] []
getpass [] []
lark.grammars [] []
lark.__pyinstaller [] []
rich [] []
warnings [] []
lark.parsers.earley_common [] []
importlib [] []
PyInstaller [] []
pkgutil [] []
contextlib [] []
sre_parse [] []
textwrap [] []
lark.tools [] []
lark.parsers.grammar_analysis [] []
atheris [] []
tempfile [] []
lark.ast_utils [] []
lark.common ['fuzz_parse'] []
re [] []
atomicwrites [] []
random [] []
lark.parsers.lalr_parser_state [] []
lark.utils ['fuzz_parse'] []
lark.visitors ['fuzz_parse'] []
lark.parsers.lalr_parser [] []
lark.tools.serialize [] []
lark.parsers.earley_forest [] []
collections [] []
lark.grammar ['fuzz_parse'] []
lark [] []
lark.lexer ['fuzz_parse'] []
Tree [] []
lark.indenter [] []
lark.tree [] []
...fuzz_parse ['fuzz_parse'] []
js2py [] []
[] []
lark.exceptions [] []
lark.tree_templates [] []
pydot [] []
lark.__pyinstaller.hook-lark [] []
interegular [] []
pickle [] []
lark.lark ['fuzz_parse'] []
inspect [] []
unicodedata [] []
sys [] []
regex [] []
lark.tools.standalone [] []
codecs [] []
lark.tools.nearley [] []
abc [] []
lark.parsers [] []
zlib [] []
argparse [] []
typing [] []
json [] []
operator [] []
itertools [] []
lark.parsers.lalr_analysis [] []
hashlib [] []
ast [] []
lark.parsers.earley [] []
lark.tree_matcher [] []
copy [] []
lark.parsers.lalr_interactive_parser [] []
tokenize [] []
base64 [] []

Directories in report

Directory