Both characters could be in danger. Joe could have been in danger if the other gang member had known his real job. He could have also been in trouble by the police if there had been another detective watching him; because what he had been doing was against the law. For example, he shouldn’t have kicked the man when they were in the bathroom.
Lefty would have been in danger by the other gang members if they had known about Joe, they might think he also works with him since they always stick around. He is also in jeopardy if Joe submits the recorded conversations, where he testifies about his crimes, to the authorities.
I like this type of movies. It is thrilling and interesting especially because it is based on a true story. It also shows us that we don’t live in a perfect world, as how usually movies depict it. People usually get drifted by the temptations of power or money, which is natural. The world is not free from corruption. I couldn’t finish the movie, but I am sure the ending was with justice as always. So my point is it is okay to sometimes make mistakes as long as we go back to the straight line of living.
Teacher's note: As this author correctly points out, both men are in double danger. This may be the whole fascinating core of the story. They're both in the same boat except that one has a secret. Thanks for a cool post.
--mike

