What does IH-CRED-005 flag?
Flags an API key or token placed in a URL, either in the query string or as user:token@host.
- A query parameter such as key=, token= or api_key= whose value is a secret variable or secret-looking literal.
- A git remote or URL with a token before the @.
Why it matters
URLs are copied everywhere: shell history, proxy and server logs, error messages and stored git remotes. A key in a URL ends up in all of them.
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-005 fire on a safe skill?
- APIs that only accept a key in the URL, where the skill has no better option.
How do I fix an IH-CRED-005 finding?
- Send the key in a header such as Authorization, x-api-key or x-goog-api-key.
- Use a git credential helper instead of a token in a remote URL.
CLI guidance: Send the key in a header (Authorization, x-api-key, x-goog-api-key) and use a credential helper instead of a token in a git remote URL.
How do I tune or allow IH-CRED-005?
If the API only accepts query keys, lower the rule with ruleOverrides; it is already low severity.
Every key is described in Configuration. To print this rule from the CLI, run ironheights rules show IH-CRED-005.
What can IH-CRED-005 miss?
- URLs built at run time from pieces the rule cannot see.
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.