This was my initial thought. Then I realised whatever sensors are on-board these things would likely detect incoming pirate attacks (of the physical kind) from miles away (think satellites). At which point nearby naval forces would be alerted.
Hell, you could go a step further and equip each one with it's own drone to defend itself in case of attack.