hardcoded credential

A password, key or token written directly into source code or a configuration file in the repository.

Every reader of the code, including every clone and backup, receives the credential.

In more detail

It leaks to everyone who can read the repository and every clone, and cannot be rotated without a code change. Moving it to the environment is a step up, and a secret manager or workload identity is the real fix.

Related terms

Taught in

References