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

Project overview: gitpython

High level conclusions

Reachability and coverage overview

Functions statically reachable by fuzzers
9.0%
55 / 645
Cyclomatic complexity statically reachable by fuzzers
10.0%
235 / 2281
Runtime code coverage of functions
53.0%
339 / 645

Warning: The number of runtime covered functions are larger than the number of reachable functions. This means that Fuzz Introspector found there are more functions covered at runtime than what is considered reachable based on the static analysis. This is a limitation in the analysis as anything covered at runtime is by definition reachable by the fuzzers.
This is likely due to a limitation in the static analysis. In this case, the count of functions covered at runtime is the true value, which means this is what should be considered "achieved" by the fuzzer.

Use the project functions table below to query all functions that were not covered at runtime.

Fuzzer details

Fuzzer: fuzz_submodule

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 131 52.4%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 119 47.5%
All colors 250 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
35 5 git.util.expand_path call site: 00005 typing.cast.head.commit.tree.resolve
26 223 ...gitpython.fuzzing.fuzz-targets.fuzz_submodule.TestOneInput call site: 00223 fdp.ConsumeUnicodeNoSurrogates
16 59 git.util._is_cygwin_git call site: 00059 git.util.py_where
14 131 git.config.GitConfigParser.__init__ call site: 00131 git.config.get_config_path
7 79 git.util._is_cygwin_git call site: 00079 git.util.cygpath
6 103 git.repo.fun.is_git_dir call site: 00103 os.path.join
4 175 git.repo.fun.find_worktree_git_dir call site: 00175 stat.S_ISREG
4 211 ...gitpython.fuzzing.fuzz-targets.fuzz_submodule.TestOneInput call site: 00211 fdp.remaining_bytes
3 124 git.repo.base.Repo._get_config_path call site: 00124 git.types.assert_never
2 112 git.repo.base.Repo.__init__ call site: 00112 git.repo.base.Repo._get_config_path
2 156 git.repo.base.Repo.__init__ call site: 00156 configparser.RawConfigParser.get
2 192 git.db.GitCmdObjectDB.__init__ call site: 00192 git.db.GitCmdObjectDB.__init__

Runtime coverage analysis

Covered functions
396
Functions that are reachable but not covered
119
Reachable functions
143
Percentage of reachable functions covered
16.78%
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
...gitpython.fuzzing.fuzz-targets.fuzz_submodule 30
git.repo.base 37
git.util 69
git.cmd 3
git.repo.fun 20
git.config 15
git.db 1

Fuzzer: fuzz_blob

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 160 61.0%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 102 38.9%
All colors 262 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
96 5 git.util.expand_path call site: 00005 typing.IO.head.commit.object.resolve
16 120 git.util._is_cygwin_git call site: 00120 git.util.py_where
14 192 git.config.GitConfigParser.__init__ call site: 00192 git.config.get_config_path
7 140 git.util._is_cygwin_git call site: 00140 git.util.cygpath
6 164 git.repo.fun.is_git_dir call site: 00164 os.path.join
4 236 git.repo.fun.find_worktree_git_dir call site: 00236 stat.S_ISREG
3 185 git.repo.base.Repo._get_config_path call site: 00185 git.types.assert_never
2 173 git.repo.base.Repo.__init__ call site: 00173 git.repo.base.Repo._get_config_path
2 217 git.repo.base.Repo.__init__ call site: 00217 configparser.RawConfigParser.get
1 106 git.repo.base.Repo.init call site: 00106 os.makedirs
1 113 git.repo.base.Repo.__init__ call site: 00113 os.getcwd
1 138 git.util._is_cygwin_git call site: 00138 process.communicate

Runtime coverage analysis

Covered functions
397
Functions that are reachable but not covered
162
Reachable functions
186
Percentage of reachable functions covered
12.9%
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
...gitpython.fuzzing.fuzz-targets.fuzz_blob 9
git.repo.base 37
git.util 130
git.cmd 3
git.repo.fun 20
git.config 15
git.db 1

Fuzzer: fuzz_config

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 67 23.7%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 215 76.2%
All colors 282 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
51 225 git.config.GitConfigParser.read call site: 00225 git.remote.PushInfoList.__init__
13 207 git.config.GitConfigParser._included_paths call site: 00207 git.config.GitConfigParser.items
1 1 ...gitpython.fuzzing.fuzz-targets.fuzz_config.TestOneInput call site: 00001 git.config.GitConfigParser.read
1 9 git.config.GitConfigParser.read call site: 00009 .super
1 280 git.config.GitConfigParser.read call site: 00280 .str

Runtime coverage analysis

Covered functions
396
Functions that are reachable but not covered
162
Reachable functions
170
Percentage of reachable functions covered
4.71%
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
...gitpython.fuzzing.fuzz-targets.fuzz_config 3
git.config 167
git.remote 1

Fuzzer: fuzz_diff

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 840 32.5%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 1744 67.4%
All colors 2584 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
315 1717 git.cmd.Git.AutoInterrupt._terminate call site: 01717 git.util.RemoteProgress.new_message_handler.handler
292 2291 git.util.finalize_process call site: 02291 git.diff.Diff._handle_diff_line
124 428 git.cmd.handle_process_output call site: 00428 ...gitpython.fuzzing.fuzz-targets.fuzz_diff.BytesProcessAdapter.__init__
55 561 git.cmd.handle_process_output call site: 00561 git.cmd.Git.AutoInterrupt._terminate
22 281 ...gitpython.fuzzing.fuzz-targets.fuzz_diff.TestOneInput call site: 00281 git.diff.Diff._index_from_patch_format
11 2157 git.util.RemoteProgress._parse_progress_line call site: 02157 git.util.finalize_process
7 262 git.objects.base.IndexObject.__init__ call site: 00262 git.objects.base.IndexObject.__init__
5 272 ...gitpython.fuzzing.fuzz-targets.fuzz_diff.TestOneInput call site: 00272 fdp.ConsumeBytes
3 256 git.diff.Diff.__init__ call site: 00256 a_rawpath.decode
2 553 git.cmd.handle_process_output call site: 00553 cmdline.split
1 123 ...gitpython.fuzzing.fuzz-targets.fuzz_diff.TestOneInput call site: 00123 git.diff.Diff.__init__
1 143 git.objects.util.mode_str_to_int call site: 00143 io.BytesIO

Runtime coverage analysis

Covered functions
397
Functions that are reachable but not covered
1520
Reachable functions
1536
Percentage of reachable functions covered
1.04%
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
...gitpython.fuzzing.fuzz-targets.fuzz_diff 257
git.diff 162
git.objects.util 126
git.objects.base 1
git.cmd 1231
git.util 255

Fuzzer: fuzz_repo

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 5 1.01%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 487 98.9%
All colors 492 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
4 235 ...gitpython.fuzzing.fuzz-targets.fuzz_repo.TestOneInput call site: 00235 os.path.join
1 0 EP call site: 00000 atheris.FuzzedDataProvider

Runtime coverage analysis

Covered functions
397
Functions that are reachable but not covered
485
Reachable functions
488
Percentage of reachable functions covered
0.61%
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
...gitpython.fuzzing.fuzz-targets.fuzz_repo 247
git.objects.tree 2
git.objects.fun 4
git.compat 234

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/gitpython/fuzzing/fuzz-targets/fuzz_submodule.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=['git.util.expand_path', '...gitpython.fuzzing.fuzz-targets.fuzz_submodule.TestOneInput', 'git.util._is_cygwin_git', 'git.config.GitConfigParser.__init__', 'git.repo.fun.is_git_dir', 'git.repo.fun.find_worktree_git_dir', 'git.repo.base.Repo._get_config_path', 'git.repo.base.Repo.__init__']

/src/gitpython/fuzzing/fuzz-targets/fuzz_blob.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=['git.util.expand_path', 'git.util._is_cygwin_git', 'git.config.GitConfigParser.__init__', 'git.repo.fun.is_git_dir', 'git.repo.fun.find_worktree_git_dir', 'git.repo.base.Repo._get_config_path', 'git.repo.base.Repo.__init__', 'git.repo.base.Repo.init']

/src/gitpython/fuzzing/fuzz-targets/fuzz_config.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=['git.config.GitConfigParser.read', 'git.config.GitConfigParser._included_paths', '...gitpython.fuzzing.fuzz-targets.fuzz_config.TestOneInput']

/src/gitpython/fuzzing/fuzz-targets/fuzz_diff.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=['git.cmd.Git.AutoInterrupt._terminate', 'git.util.finalize_process', 'git.cmd.handle_process_output', '...gitpython.fuzzing.fuzz-targets.fuzz_diff.TestOneInput', 'git.util.RemoteProgress._parse_progress_line', 'git.objects.base.IndexObject.__init__', 'git.diff.Diff.__init__']

/src/gitpython/fuzzing/fuzz-targets/fuzz_repo.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=['...gitpython.fuzzing.fuzz-targets.fuzz_repo.TestOneInput']

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
[] []
...gitpython.fuzzing.fuzz-targets.fuzz_submodule ['fuzz_submodule'] []
git.index.util [] []
itertools [] []
stat [] []
locale [] []
git.diff ['fuzz_diff'] []
contextlib [] []
git.refs.log [] []
git.repo.fun ['fuzz_submodule', 'fuzz_blob'] []
git.exc [] []
atheris [] []
git.db ['fuzz_submodule', 'fuzz_blob'] []
typing [] []
git.refs.symbolic [] []
git.refs [] []
git.index.base [] []
git.objects.tree ['fuzz_repo'] []
threading [] []
fnmatch [] []
git.cmd ['fuzz_submodule', 'fuzz_blob', 'fuzz_diff'] []
functools [] []
subprocess [] []
time [] []
typing_extensions [] []
git.objects.submodule.base [] []
gc [] []
git.config ['fuzz_submodule', 'fuzz_blob', 'fuzz_config'] []
git.refs.reference [] []
git.repo.base ['fuzz_submodule', 'fuzz_blob'] []
pathlib [] []
git.objects.commit [] []
git.refs.head [] []
uuid [] []
git.refs.tag [] []
configparser [] []
calendar [] []
importlib [] []
weakref [] []
git.objects [] []
inspect [] []
enum [] []
mimetypes [] []
git.objects.util ['fuzz_diff'] []
tempfile [] []
git.index.typ [] []
platform [] []
[] []
git.index.fun [] []
urllib [] []
git.objects.submodule [] []
datetime [] []
re [] []
git.objects.submodule.root [] []
git.objects.fun ['fuzz_repo'] []
struct [] []
git.remote ['fuzz_config'] []
os [] []
textwrap [] []
shlex [] []
git.refs.remote [] []
git.objects.submodule.util [] []
warnings [] []
git.objects.tag [] []
git.objects.blob [] []
...gitpython.fuzzing.fuzz-targets.fuzz_repo ['fuzz_repo'] []
git.objects.base ['fuzz_diff'] []
gitdb [] []
io [] []
sys [] []
...gitpython.fuzzing.fuzz-targets.fuzz_diff ['fuzz_diff'] []
...gitpython.fuzzing.fuzz-targets.fuzz_config ['fuzz_config'] []
git [] []
...gitpython.fuzzing.fuzz-targets.fuzz_blob ['fuzz_blob'] []
git.util ['fuzz_submodule', 'fuzz_blob', 'fuzz_diff'] []
utils [] []
getpass [] []
collections [] []
git.index [] []
git.types [] []
logging [] []
git.compat ['fuzz_repo'] []
glob [] []
shutil [] []
binascii [] []
git.repo [] []

Directories in report

Directory