And Congress has the power to cite him for contempt like a judge presiding over a grand jury hearing.
Furthermore, Pretreaus is likely still listed on active duty , and any case, it is possible for any flag officer can be subjected to Uniform Code of Military Justice.
I went looking to answer this question.
"General Petraeus will not resign his commission and come to the CIA until hes able to transition the mission in Afghanistan to General Allen."
http://www.intelligence.senate.gov/pdfs112th/112307.pdf