In the specific case of monsters using pseudo-magical or magical effects, it's certainly reasonable for the DM to rule them as 'spells' for purposes of sanctuary and invisibility. IMO the entire question on if they are attacks or not is a red herring in those specific cases.