Engineering

Hard-coded secret

A password, API key or token written directly into source code or a config file, where anyone who sees the code can use it.

In a sentence

“The live payments key was pasted into the code and pushed to a public repository: a hard-coded secret.”

Why it matters at work

Code gets copied, shared and leaked. Keep secrets in a secrets manager, and change any key that has been exposed straight away.

Related terms

Sources and further reading

OWASP Top 10 · PCI DSS 6.2

Cite this definitionAqoon. “Hard-coded secret.” Aqoon Security Dictionary, 2026. aqoonhq.com/dictionary/hard-coded-secret

Reviewed by the Aqoon GRC team. General guidance, not legal advice.

Knowing the word is step one.
Aqoon turns it into a habit.

Short games built on real attacks, so your team spots the phish, not just defines it.