In Joshua 7, everyone knew what the punishment would be for Achan, but he freely admitted his sin anyway. Not only did he admit it, but he repented by revealing the location of the stolen items so that they could be properly destroyed. "Truly I have sinned against YHWH God of Israel, and this is what I did..." See v20-21.