Volume 1 of "The Planet Pirates" / Anne McCaffrey and Elizabeth Moon. 1991.
1
Sassinak was twelve when pirates raided her native colony, enslaving her and murdering her family. Abe, a fellow captive, befriends her and, when they are emancipated by Fleet (the military), becomes her guardian until he is slain in a barroom brawl. Intelligent and daring, Sass joins Fleet as a raw recruit, surprising everyone with her rapid rise to senior rank. And then her vengeance begins in earnest.