IH-CRED-005lowCredentials

Secret in a URL

An API key or token placed in a URL query string or in user:token@host lands in shell history, proxy and server logs, error messages, and stored git remotes.

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.

Key in the query string
Flagged
curl "<api-url>/v1/data?key=$GEMINI_API_KEY"
Token in a git remote
Flagged
git remote add fork https://<user>:$GH_TOKEN@<git-host>/o/r.git
Key in a header
Not flagged
curl -H "x-api-key: $KEY" <api-url>

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.

{
  "ruleOverrides": {
    "IH-CRED-005": {
      "severity": "info"
    }
  }
}

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.

Scores and thresholds shown are the CLI defaults; your config can change them. List every rule from the terminal with ironheights rules list.

All 44 rules