hooks/install: add timeouts to SBOM inspection
download_url.is_uri_valid() and go_dep.py lack timeouts. If network
probes drop or go-licenses stalls, python hangs indefinitely, causing
Kokoro builds to time out after 12 hours.
Add a 5s timeout to requests.get and a 30s timeout to go-licenses.
BUG=b/565975961
TEST=presubmit
RELEASE_NOTE=None
Change-Id: I3becae38785ce7babe60afed73dfda15c07fb07f
Reviewed-on: https://cos-review.googlesource.com/c/third_party/platform/crosutils/+/211989
Tested-by: Chenglong Tang <chenglongtang@google.com>
Reviewed-by: Angel Adetula <angeladetula@google.com>
2 files changed