K-2SO will work alongside Cassian, Jyn Erso, Chirrut Îmwe, Baze Malbus and Bodhi Rook in Rogue One to secure the Death Star Plans and bring them back to the Rebellion, though it remains to be seen how their mission will actually turn out.
Although K-2SO was created as a weapon to enforce the Empire’s will, that won’t be his function in Rogue One.
Thanks to Cassian Andor’s reprogramming, he now serves the Rebellion, making him one of their most valued operatives.
Since K-2SO still likes your everyday Imperial enforcer droid on the outside, he can infiltrate key Imperial installations without anyone batting an eye.