T09 · Insecure Skill Coding Practices
- Location
SKILL.md:27- Finding
NVIDIA API Key Exposed Through Command-Line Arguments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 27-29
Vulnerability Type: Secret exposure through process arguments and shell history
Risk Level: MediumVulnerable Code
bash python skills/nvidia-model-config/scripts/merge_nvidia_config.py \ --config openclaw.json --key "YOUR_KEY" --setup-env ~/.config/openclaw/gateway.env --setup-systemd --backupTechnical Analysis
The documented quick-start procedure recommends supplying the NVIDIA API key through the
--keycommand-line argument. When a real key replacesYOUR_KEY, it can be retained in shell history. Depending on the operating system configuration and process-inspection permissions, it may also be visible in process listings while the command is running.Although the script supports reading the key from the
NVIDIA_API_KEYenvironment variable, the primary documented workflow encourages the more exposed command-line mechanism.Attack Path
- An operator follows the documented quick-start procedure and substitutes a valid NVIDIA API key for
YOUR_KEY. - The shell records the complete command, including the key, in its history.
- Alternatively, a local process or monitoring system captures the command-line arguments while the script is running.
- An attacker or unauthorized local user obtains access to the history, process telemetry, or diagnostic records.
- The exposed key is used to make unauthorized requests against the NVIDIA API.
Impact Assessment
Exploitation discloses the NVIDIA API credential with the same API permissions and account entitlements assigned to that key. An attacker may consume API quota, access entitled NVIDIA models, incur usage costs, or cause service disruption through quota exhaustion. This issue does not independently grant operating-system privilege escalation.
- An operator follows the documented quick-start procedure and substitutes a valid NVIDIA API key for
- Remediation
View remediation
Remediation Suggestions
-
Remove
--key "YOUR_KEY"from the recommended quick-start command. -
Recommend providing the key through a protected runtime environment or a secure secret manager.
-
If interactive entry is required, add a
--key-stdinor hidden prompt option using Python'sgetpassmodule. -
Warn users not to place credentials directly in shell commands.
-
Provide a safer example, such as:
bash read -rsp "NVIDIA API key: " NVIDIA_API_KEY export NVIDIA_API_KEY python skills/nvidia-model-config/scripts/merge_nvidia_config.py \ --config openclaw.json \ --setup-env ~/.config/openclaw/gateway.env \ --setup-systemd \ --backup unset NVIDIA_API_KEY
-
