codesign still tries to access other keychains when adding --keychain parameter
We have the same problem. For now, we have to add the keychain we want to the search list as the only keychain. Then restore all keychains after codesign.