We investigate a wiretap channel model in which an active adversary tampers with the channel while being monitored by the receiver. We show that it is possible to simultaneously learn the adversary's actions and ensure secrecy, in the sense that the rate achieved is close to the best rate that could have been obtained with hindsight.