Only attacks in water. If you're on land you're safe.

More Baryonyx Taming & KO Tips