You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Return non-zero exit code if an error occurs during a scan (#4476)
With its original code, Trufflehog was returning a zero exit code in
cases when an error was encountered during a scan. This led to some
unexpected situations, such as succeeding if a git repo was not cloned
correctly or if a non-existent commit was referenced from
`--since-commit`.
This commit adds a new flag `--fail-on-scan-errors` that, if
enabled, will propagate scan errors further (alongside with the current
behavior of reporting them on console), ensuring that Trufflehog returns
a non-zero exit code.
The change should be fairly safe, as it is hidden behind a flag and if
not activated, the original behavior is retained.
See also: #4218
Signed-off-by: Milan Plzik <[email protected]>
0 commit comments