It's said that Sotapanna has perfect morality.
For example, AN 3.85 says:
"There is the case where a monk is wholly accomplished in virtue, moderately accomplished in concentration, and moderately accomplished in discernment. With reference to the lesser and minor training rules, he falls into offenses and rehabilitates himself. Why is that? Because I have not declared that to be a disqualification in these circumstances. But as for the training rules that are basic to the holy life and proper to the holy life, he is one of permanent virtue, one of steadfast virtue. Having undertaken them, he trains in reference to the training rules. With the wasting away of [the first] three fetters, he is a stream-winner, never again destined for states of woe, certain, headed for self-awakening.
And in AN 9.12:
Again, Sāriputta, a certain person is complete in virtues, incomplete in concentration and incomplete in wisdom. Destroying three bonds he transmigrates as a human or god the most seven times and makes end of unpleasantness. Sāriputta, this is the eighth person who dies with substratum, released, from hell, from animal birth, from the sphere of ghosts and released from loss and hellish births.
But we do wrong thing from time to time. Our deeds are not perfect. So what does it mean by having a perfect (wholly accomplished) morality/virtue?