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

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 300 25.3%
gold [1:9] 7 0.59%
yellow [10:29] 1 0.08%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 874 73.9%
All colors 1182 100

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
3824 3824 1 :

['njs_process_file']

3824 3824 njs_main call site: 00017 /src/njs/external/njs_shell.c:448
3470 6629 3 :

['njs_rbtree_delete', 'njs_vm_invoke', 'njs_engine_njs_output']

3470 6631 njs_engine_njs_process_events call site: 00000 /src/njs/external/njs_shell.c:1627
3429 3482 3 :

['njs_arr_destroy', 'njs_vm_error2', 'njs_vm_value_to_string']

3429 3482 njs_engine_njs_unhandled_rejection call site: 00000 /src/njs/external/njs_shell.c:1667
3201 3472 2 :

['njs_iterator_to_array', 'njs_throw_error']

3201 6877 njs_error_constructor call site: 00000 /src/njs/src/njs_error.c:290
3200 4515 5 :

['njs_parser_module', 'njs_mp_zalloc', 'njs_lexer_consume_token', 'njs_mp_free', 'njs_lexer_token']

3200 4515 njs_parser_import call site: 00000 /src/njs/src/njs_parser.c:8177
3195 3195 1 :

['njs_parser_export_sink']

3195 3195 njs_parser call site: 01125 /src/njs/src/njs_parser.c:612
3138 3138 1 :

['njs_error_stack']

3138 17227 njs_error_to_string2 call site: 00000 /src/njs/src/njs_error.c:600
273 273 1 :

['njs_error_fmt_new']

273 454 njs_promise_resolve_function call site: 00000 /src/njs/src/njs_promise.c:597
126 126 1 :

['njs_disassembler']

126 126 njs_vm_compile call site: 00000 /src/njs/src/njs_vm.c:293
6 6 3 :

['close', 'read', 'open']

10 12 njs_random_stir call site: 00000 /src/njs/src/njs_random.c:102
4 4 2 :

['gettimeofday', 'getpid']

4 6 njs_random_stir call site: 00000 /src/njs/src/njs_random.c:111
2 2 1 :

['njs_vm_set_rejection_tracker']

2 73 njs_engine_njs_init call site: 00254 /src/njs/external/njs_shell.c:1346

Runtime coverage analysis

Covered functions
1118
Functions that are reachable but not covered
47
Reachable functions
313
Percentage of reachable functions covered
84.98%
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
external/njs_shell.c 16
src/njs_sprintf.c 5
src/njs_rbtree.c 6
src/njs_mp.c 15
src/njs_malloc.c 2
src/njs_vm.c 17
src/njs_regexp.c 6
external/njs_regex.c 8
src/njs_error.c 8
src/njs_builtin.c 2
src/njs_atom.c 4
src/njs_flathsh.c 11
src/njs_string.c 17
src/njs_utf8.c 5
src/njs_djb_hash.c 1
src/njs_trace.c 1
src/njs_object.c 15
src/njs_dtoa.c 1
src/njs_diyfp.c 2
src/njs_number.c 6
src/njs_strtod.c 4
src/njs_arr.c 4
src/njs_function.c 18
src/njs_symbol.c 3
src/njs_scope.c 2
src/njs_value.c 17
src/njs_module.c 2
src/njs_variable.c 6
src/njs_parser.c 7
src/njs_lexer.c 11
src/njs_object_prop.c 7
src/njs_async.c 1
src/njs_promise.c 5
src/njs_array.c 11
src/njs_vmcode.c 29
src/njs_utils.c 2
src/njs_typed_array.c 3
src/njs_array_buffer.c 1
src/njs_generator.c 5

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
njs_generate /src/njs/src/njs_generator.c 3 ['N/A', 'N/A', 'N/A'] 40 0 1039 133 7 298 0 3865 602
njs_ext_import_key /src/njs/external/njs_webcrypto_module.c 5 ['N/A', 'N/A', 'int', 'size_t', 'N/A'] 42 0 1123 165 52 286 0 3597 460
njs_engine_njs_process_events /src/njs/external/njs_shell.c 1 ['N/A'] 21 0 150 17 6 245 0 3478 299
njs_date_constructor /src/njs/src/njs_date.c 5 ['N/A', 'N/A', 'int', 'size_t', 'N/A'] 36 0 678 73 28 220 0 3413 279
njs_regexp_prototype_symbol_replace /src/njs/src/njs_regexp.c 5 ['N/A', 'N/A', 'int', 'size_t', 'N/A'] 37 0 2298 268 96 236 0 3446 274
njs_fs_readlink /src/njs/external/njs_fs_module.c 5 ['N/A', 'N/A', 'int', 'size_t', 'N/A'] 43 0 363 56 21 240 0 3427 234
njs_parser_property_definition /src/njs/src/njs_parser.c 3 ['N/A', 'N/A', 'N/A'] 43 0 2715 252 87 245 0 3549 205
njs_engine_njs_eval /src/njs/external/njs_shell.c 2 ['N/A', 'N/A'] 16 0 73 9 4 269 0 3682 198
njs_ext_export_key /src/njs/external/njs_webcrypto_module.c 5 ['N/A', 'N/A', 'int', 'size_t', 'N/A'] 42 0 514 70 21 276 0 3419 182
njs_error_prototype_stack /src/njs/src/njs_error.c 6 ['N/A', 'N/A', 'int', 'N/A', 'N/A', 'N/A'] 37 0 477 56 21 225 0 3351 165

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

Functions statically reachable by fuzzers
37.0%
521 / 1409
Cyclomatic complexity statically reachable by fuzzers
44.0%
6559 / 15029

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

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
njs_array_prototype_iterator 131 54 41.22% ['njs_process_script_fuzzer']
njs_array_prototype_slice_copy 103 51 49.51% ['njs_process_script_fuzzer']
njs_top_level_constructor 32 12 37.5% ['njs_process_script_fuzzer']
njs_error_alloc 72 38 52.77% ['njs_process_script_fuzzer']
njs_error_to_string2 74 40 54.05% ['njs_process_script_fuzzer']
njs_function_capture_global_closures 42 10 23.80% ['njs_process_script_fuzzer']
njs_object_iterate_reverse 124 56 45.16% ['njs_process_script_fuzzer']
njs_dump_terminal 149 73 48.99% ['njs_process_script_fuzzer']
njs_object_math_func 143 42 29.37% ['njs_process_script_fuzzer']
njs_module_find 39 13 33.33% ['njs_process_script_fuzzer']
njs_object_enumerate_array 62 27 43.54% ['njs_process_script_fuzzer']
njs_object_enumerate_typed_array 43 21 48.83% ['njs_process_script_fuzzer']
njs_object_enumerate_string 96 24 25.0% ['njs_process_script_fuzzer']
njs_object_own_enumerate_object 49 14 28.57% ['njs_process_script_fuzzer']
njs_parser_optional_chain 48 20 41.66% ['njs_process_script_fuzzer']
njs_parser_export 73 8 10.95% ['njs_process_script_fuzzer']
njs_parser_import 62 28 45.16% ['njs_process_script_fuzzer']
njs_vsprintf 257 126 49.02% ['njs_process_script_fuzzer']
njs_value_own_enumerate 66 11 16.66% ['njs_process_script_fuzzer']
njs_value_property_delete 76 39 51.31% ['njs_process_script_fuzzer']

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
[] []
/src/njs/src/njs_djb_hash.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_math.c [] []
/src/njs/external/njs_sha2.c [] []
/src/njs/src/njs_strtod.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_arr.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_object_prop.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_dtoa_fixed.c [] []
/src/njs/src/njs_utils.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_random.c [] []
/src/njs/external/njs_webcrypto_module.c [] []
/src/njs/src/njs_sprintf.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_rbtree.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_disassembler.c [] []
/src/njs/src/njs_diyfp.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_flathsh.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_promise.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_object.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_array_buffer.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/external/njs_query_string_module.c [] []
/src/njs/src/njs_chb.c [] []
/src/njs/src/njs_json.c [] []
/src/njs/external/njs_zlib_module.c [] []
/src/njs/src/njs_builtin.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_malloc.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_trace.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_module.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_vm.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/external/njs_shell.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_string.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_extern.c [] []
/src/njs/src/njs_lexer.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_error.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_async.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_typed_array.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_value.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_generator.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_utils.h [] []
/src/njs/src/njs_str.c [] []
/src/njs/src/njs_number.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/external/njs_md5.c [] []
/src/njs/src/njs_variable.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_vmcode.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_iterator.c [] []
/src/njs/src/njs_dtoa.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_utf8.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_utf16.c [] []
/src/njs/external/njs_sha1.c [] []
/src/njs/external/njs_regex.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_symbol.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_array.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/external/njs_fs_module.c [] []
/src/njs/src/njs_boolean.c [] []
/src/njs/src/njs_date.c [] []
/src/njs/src/njs_function.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_regexp.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_atom.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_parser.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_mp.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/src/njs_buffer.c [] []
/src/njs/src/njs_encoding.c [] []
/src/njs/src/njs_scope.c ['njs_process_script_fuzzer'] ['njs_process_script_fuzzer']
/src/njs/external/njs_crypto_module.c [] []

Directories in report

Directory
/src/njs/external/
/src/njs/src/