They share an FBI handler who told Nick to keep Ralph around.
Hey, didn't a big hacking forum getting raided and it's admin arrested in Portugal? Huh, it'd be really weird if someone suspected of being a rat to the Feds had visited there recently, to meet people he knew from the less legitimate parts of Internet. Certainly they didn't discover a wire on him and cave his face in for it.
I am of course being facetious(feces-tious?), even I don't think the government is incompetent enough to work with Ralph, and even if they did, they wouldn't be successful in operations using him.