You must have at least favorable reputation.
Spoiler alert:
Spoiler
If you have ever played Exerelin, this hotfix brings some of that joy to vanilla: diplomacy events! Although seemingly limited to declaring open hostilities, it can easily catch you with your pants down, as in the case of you being comissioned for faction x, you immediaetly become hostile to faction y, just like x is. However, x will eventually become hostile to z, but you won't. Lest you want to let go of your hard-earned reputation, you will be underway looking for a fleet belonging to z and unleashing maniacal bloodthirst the fine art of privateering. Cheers!