What are your responsibilities if a student announces their intention to commit a crime?
what is the right and legal thing to do


I think this question mixes two different concerns: The right thing to do is a matter of personal ethical judgement. The legal thing to do is, well, a matter of law. 

One might argue that the ethical concern is more fundamental than the legal one, since "I will do whatever the law requires me to do" is already an ethical statement -- and, depending on the case, a highly problematic one: History is full of examples where laws were set up in a way that was clearly not right -- from our view as citizens in modern societies today, and from the view of ethically-minded individuals who initiated changes to these laws.

One's personal ethical judgement, however, will depend on the case at hand, unless one takes the shortcut of just doing whatever the law requires one to do.