Closed jspawar closed 6 years ago
thanks for noticing and fixing this!
there are no unit tests for the git driver as they really wouldn't reduce much risk; 90% of the operations are just shelling out, and if that's all stubbed out there's not much being tested. there are integration tests that operate at a higher level and they did indeed catch this breakage.
UAA team has forked from this repo and realized we recently started having some failures when running the
test/check.sh
tests during build of the Docker image. We have found that the same failure is exhibited in this repo as well.Specifically, there is a test in
test/check.sh
calledit_fails_if_key_has_password
which attempts to runcheck
given a private key encrypted with a passphrase. It appears theGitDriver
attempts to inspect the contents of the private key to verify whether or not it is encrypted. Also, kind of related to this: there don't appear to be any unit tests for theGitDriver
, don't know if we missed them or this was intentional?Problem is that the newer generation of keys through
ssh-keygen
no longer contain headers indicating whether or not the key is encrypted. This invalidates the logic linked above by considering the key to be valid and being able to successfully fetch the version from the bucket when it shouldn't. (At least in thatit_fails_if_key_has_password
test)We are looking into a fix for ourselves and can send one your way or hold off, up to y'all.
Thanks!
~ Jwal & @bruce-ricard