Do brief connections contaminate?

Can an expert please answer this for me?

If  I make a very brief connection of a SATA Western Digital  (apparently just out of the manufacturer ) HD to a computer that has a presumably  malware contaminated SATA HD with Windows XP OS and the connection is short enough for only allowing the Western Digital HD to be recognized by the BIOS…Does that make the Western Digital  HD to be also regarded as presumably contaminated?

Thank you

Maybe.  Maybe not.  The only way to know for sure is to reformat the drive and wipe any potential software.