Thanks doc I appreciate it!
Welcome to the forum.
Hand-genital contact, such as mutual masturbation and vaginal or anal fingering, is not an STD risk. In theory, some infections might take hold in a wound like you describe, but in my 4 decades in the STD business I have never seen a case. For sure there are no known cases of HIV transmission in this manner, and I doubt it has happened with viral hepatitis. Herpes might be the most likely, but if that happened, it would be obvious from the herpetic blister or sore that would occur in a few days at the site of the cut. Assuming that doesn't happen, I would advise you not worry, not get tested, and not worry further about it.
Best wishes-- HHH, MD