pub const SECRET_KEY_HINTS: &[&str];Expand description
Normalised key words whose presence marks a value as secret-bearing.
Why: project configuration under .trusty-code/ is committed to the
project’s repository by convention, so a credential landing there is a leak
with a long tail. The import path checks against this list before copying a
settings file rather than after.
What: lowercase, separator-free, SINGULAR word forms — not substrings. A key
is split into words first ([key_segments]) and each word is de-pluralised
before matching, so one entry covers every spelling of it: api_key,
API-KEY, x-api-key, xApiKey, APIKEY and apiKeys all reduce to the
apikey form. Multi-word entries (apikey, accesskey, privatekey) are
matched against adjacent word PAIRS as well as against a single unseparated
word.
Test: paths::tests::secret_keys_match_across_separator_and_case_spellings,
paths::tests::secret_keys_match_plural_spellings,
paths::tests::benign_keys_containing_a_hint_are_not_flagged.