The most common and most likely answer to this crossword clue is the 6 letter word CYPHER
I've seen this crossword clue in Independent
C
Y
P
H
E
R
More clues leading to the result CYPHER
Buddy explains!

The straight part
We know that "a secret code" is the straight/definition part of the clue. The straight part is often a synonym or definition, in this case a secret code = cypher.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 CYPHER mean?
CYPHER noun- A numeric character.
- Any text character.
- A combination or interweaving of letters, as the initials of a name; a device; a monogram.
- A method of transforming a text in order to conceal its meaning.
- A cryptographic system using an algorithm that converts letters or sequences of bits into ciphertext.
- Ciphertext; a message concealed via a cipher.
- A grouping of three digits in a number, especially when delimited by commas or periods:
- A fault in an organ valve which causes a pipe to sound continuously without the key having been pressed.
- A hip-hop jam session.
- The path (usually circular) shared cannabis takes through a group, an occasion of cannabis smoking.
- Someone or something of no importance.
- Zero.
- To calculate.
- To write in code or cipher.
- Of an organ pipe: to sound independent of the organ.
- To decipher.