What about if I’m attacked or harassed by a dog while riding?

Recovery is possible. Often there are “leash laws” in effect in various counties and cities. The claim in that instance is made against the homeowner, and would be covered by homeowners’ insurance.