Skip to content

Commit a63d18d

Browse files
committed
fix: add some essential logging
Signed-off-by: Zvi Grinberg <[email protected]>
1 parent 1e7d3a4 commit a63d18d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/vuln_analysis/utils/source_code_git_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def load_repo(self):
134134
repo.git.fetch("origin", self.ref, "--depth=1", "--force")
135135
tag_refspec = f"refs/tags/{self.ref}:refs/tags/{self.ref}"
136136
try:
137-
repo.git.fetch("origin", tag_refspec, "--depth=1" , "--force")
137+
repo.git.fetch("origin", tag_refspec, "--depth=1", "--force")
138138
except GitCommandError:
139139
pass
140140
repo.git.checkout(self.ref, "--force")

src/vuln_analysis/utils/transitive_code_searcher_tool.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,15 @@ def download_dependencies(git_repo_path: Path, manifest_path: str = None, the_ec
8181
# If manifest path is supplied in input, override the default root repo dir as dir of manifest file with this value.
8282
if manifest_path:
8383
path_to_manifest = git_repo_path.joinpath(manifest_path)
84+
logger.info(f"manifest_path field supplied in request payload, overriding default value of "
85+
f"root directory of repository."
86+
f" relative manifest_path value => {manifest_path}, path_to_manifest=>{path_to_manifest}")
8487
else:
8588
path_to_manifest = git_repo_path
8689
# If ecosystem is supplied in input, then override default of first found ecosystem manifest in the repo.
8790
if the_ecosystem and os.path.isfile(path_to_manifest / determine_manifest_name_by_ecosystem(the_ecosystem)):
8891
ecosystem = the_ecosystem
92+
logger.info(f"Ecosystem field supplied in request payload, ecosystem value => {ecosystem}")
8993
elif os.path.isfile(path_to_manifest / GOLANG_MANIFEST):
9094
ecosystem = MANIFESTS_TO_ECOSYSTEMS[GOLANG_MANIFEST]
9195
elif os.path.isfile(git_repo_path / PYTHON_MANIFEST):

0 commit comments

Comments
 (0)