Ships being attack by squadrons

By player3701323, in Support

When a ship is being attack by squadrons does that ship get to spend defense tokens? Or are defense token only used in ship to ship combat.