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 313 83.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 64 16.9%
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 162 lark.visitors.Transformer_InPlace.transform call site: 00162 lark.load_grammar.GrammarBuilder.do_import
38 14 lark.lark.Lark.__init__ call site: 00014 lark.lark.Lark._load
22 119 lark.lark.Lark.__init__ call site: 00119 lark.load_grammar.GrammarBuilder.load_grammar
17 56 lark.utils._deserialize call site: 00056 lark.lark.Lark._prepare_callbacks
15 307 lark.lexer.BasicLexer.__init__ call site: 00307 lark.lexer._check_regex_collisions
14 323 lark.lexer._check_regex_collisions call site: 00323 lark.lark.Lark.save
12 106 lark.parser_frontends._wrap_lexer call site: 00106 lark.parser_frontends.create_contextual_lexer
8 296 lark.parser_frontends._construct_parsing_frontend call site: 00296 lark.lark.Lark._build_lexer
7 74 lark.lark.Lark._prepare_callbacks call site: 00074 lark.parse_tree_builder.ParseTreeBuilder._init_builders
7 152 lark.common.ParserConf.__init__ call site: 00152 lark.load_grammar._get_parser
7 348 lark.utils.Serialize.serialize call site: 00348 lark.utils._serialize
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
191
Reachable functions
199
Percentage of reachable functions covered
4.02%
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 46
lark.load_grammar 88
lark.utils 34
lark.parser_frontends 24
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'] 7 0 2 2 4 99 0 319 229
lark.load_grammar.Grammar.compile lark.load_grammar 3 ['N/A', 'N/A', 'N/A'] 6 0 5 12 8 66 0 209 119
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 59
lark.parsers.lalr_parser.LALR_Parser.parse lark.parsers.lalr_parser 4 ['N/A', 'N/A', 'N/A', 'N/A'] 3 0 1 6 5 19 0 63 51
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'] 5 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%
157 / 625
Cyclomatic complexity statically reachable by fuzzers
28.0%
579 / 2081

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

Directories in report

Directory