The most common and most likely answer to this crossword clue is the 6 letter word CREEDS
I've seen this crossword clue in The Guardian
C
R
E
E
D
S
Buddy explains!

The straight part
We know that "moral codes" is the straight/definition part of the clue. The straight part is often a synonym or definition, in this case moral codes = creeds.The cryptic/wordplay part
In cryptic crossword there's often an wordplay/cryptic part as well.This part involves a more complex hint, such as an anagram, homophone, hidden word, etc.
Sadly, We don't have an explanation for this specific crossword clue yet.
What does CREEDS mean?
CREEDS noun- That which is believed; accepted doctrine, especially religious doctrine; a particular set of beliefs; any summary of principles or opinions professed or adhered to.
- (specifically) A reading or statement of belief that summarizes the faith it represents; a confession of faith for public use, especially one which is brief and comprehensive.
- The fact of believing; belief, faith.
- (only survives in "creeded") To believe; to credit.
- To provide with a creed.