When I was a kid there was a product that you applied to your finger nails to stop you biting them. Tasted terrible, but in the end, it didn't work.
It was a herb known as biitter aloes MB. Alum is the mineral aluminium sulphate used as an astringent.