By being a devoted asset to the theocracy that runs the military outside the regular chain of command, especially when the Empire being inherently corrupt is a feature, not a flaw.
Vader himself is her superior and has a tendency towards rewarding initiative that accomplishes his goals just as much as he does punishing failure - if he personally is satisfied that she managed to roust Kenobi, he may not care that she stabbed the GI.