ggshield does not handle absence of git correctly #329
Labels
status:confirmed
This issue has been reviewed and confirmed
type:bug
Something isn't working
type:techdebt
Fix non-optimal code
GitGuardian Shield Version
Command executed
Start an Ubuntu 22.04 docker container:
docker run -it --rm ubuntu:20.04
Install ggshield using pip:
Try to run ggshield:
Describe the bug
ggshield assumes the
git
command is available at import time, and fails to start.Expected behavior
At a minimum, ggshield should print a proper error message when git is not available, not a stack trace.
Ideally, ggshield should not require the
git
command unless it's necessary. Commands likesecret scan docker
or `secret scan archiveè do not require git to be available.Tech details
Reworking
git_shell.py
to hide GIT_PATH and add agit()
function should help.The text was updated successfully, but these errors were encountered: