The defense said the woman testified under an immunity deal protecting her from punishment for lying and other violations of the academy 's honor code .