What does IH-CRED-006 flag?
Flags a real-looking credential used as the default when an environment variable is missing, which means the key ships inside the skill.
- os.getenv, os.environ.get, getenv(...) or, process.env || or ??, and ${VAR:-...} with a literal default, including calls split across lines.
- A known key prefix (AIza, sk-, ghp_, AKIA and others) of length 16 or more, or a random-looking literal with a secret-like variable name.
Why it matters
The author meant to read the key from the environment, but the fallback puts a working key in every copy of the skill. Anyone who downloads it can use or abuse that account.
Examples
Illustrative shapes with placeholders in angle brackets. They show what the rule looks at; they are not runnable and not taken from real malware.
Can IH-CRED-006 fire on a safe skill?
- A long test value with a secret-like name that is not a real key.
How do I fix an IH-CRED-006 finding?
- Remove the fallback secret and rotate it.
- Read the environment variable with no default and fail clearly when it is missing.
CLI guidance: Remove the fallback secret, rotate it, and read the environment variable with no default.
How do I tune or allow IH-CRED-006?
For a known fake value in a fixture, exclude that file with ignoreGlobs rather than turning the rule off.
Every key is described in Configuration. To print this rule from the CLI, run ironheights rules show IH-CRED-006.
What can IH-CRED-006 miss?
- Markdown, which this rule does not scan.
- Defaults loaded from a separate config file.
No finding means no rule matched. It is not proof of safety. Files larger than 1 MiB are skipped without being read; the verdict is then incomplete, not no findings, but the file is still not checked. See Limitations.
Related rules
ironheights rules list.