Cannons and Beams, fired from your own turrets, will damage your own shields if a part of your ship is in their firing lane.
Beams have <RailHitMultiplierParent>0</RailHitMultiplierParent> though so they don't actually apply damage, cannons don't have this config value though so you get full shield damage from those.