What does IH-EXEC-005 flag?
Flags a skill that names an API key or token and starts a child process that inherits the whole parent environment, so the child gets every secret, not just the one it needs.
- A spread of process.env, env: process.env, os.environ.copy(), **os.environ or dict(os.environ) passed to a child process in a skill that names a secret.
- A spawn, exec, fork or subprocess call that leaves env unset in a file that names a secret.
- One finding per file.
Why it matters
Your shell environment often holds keys for many services. A helper process that inherits all of them can leak any of them, and a compromised dependency in that helper gets them for free.
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-EXEC-005 fire on a safe skill?
- A child that really needs most of the environment, such as a shell wrapper, still matches.
- A secret name in a comment or help text can make an unrelated spawn in the same file count.
How do I fix an IH-EXEC-005 finding?
- Build a minimal environment for the child: PATH, HOME and only the keys it needs, and pass that object as env.
- Do not spread process.env, pass process.env itself, copy os.environ, or leave env unset.
CLI guidance: Build a minimal environment for the child: PATH, HOME, and only the keys that child needs. Pass that object as env.
How do I tune or allow IH-EXEC-005?
If you have checked that the child needs the full environment, exclude that file with ignoreGlobs or lower the rule with ruleOverrides for this project.
Every key is described in Configuration. To print this rule from the CLI, run ironheights rules show IH-EXEC-005.
What can IH-EXEC-005 miss?
- Secrets loaded from files rather than the environment.
- Children started through a library wrapper the rule does not recognize.
- Files under test/, tests/, __tests__/, spec/ or fixtures/, which are skipped.
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.