T09 · Insecure Skill Coding Practices
- Location
SKILL.md:56- Finding
API Credentials Passed Through Command-Line Arguments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 56-85
Vulnerability Type: Exposure of sensitive credentials through process arguments and shell history
Risk Level: MediumVulnerable Code
powershell .\scripts\install-adapter.ps1 -Provider deepseek -ApiKey "your-api-key"bash python adapters/universal_adapter.py <port> <provider-type> [api_key] [failover-providers...] # DeepSeek primary provider python adapters/universal_adapter.py 18669 deepseek "sk-xxxx" # DeepSeek primary provider with OpenAI and Gemini failover python adapters/universal_adapter.py 18669 deepseek "sk-xxxx" openai geminiTechnical Analysis
The documented invocation patterns pass provider API credentials directly as command-line arguments. Although the examples use placeholders, users are instructed to replace them with real credentials.
Command-line secrets can be exposed through:
- PowerShell or shell command history.
- Process command-line inspection while the adapter is running.
- Process-monitoring and diagnostic utilities.
- Terminal transcripts, support bundles, or automation logs.
- Wrapper scripts that record their received arguments.
The project contains only
SKILL.md, so the referenced scripts and adapter implementation were unavailable. Consequently, it was not possible to determine whether they additionally log, persist, or otherwise expose these arguments.Attack Path
- A user follows the documentation and substitutes a valid provider API key for the placeholder.
- The shell records the command in persistent history, or the adapter remains active with the key present in its process command line.
- A local user, monitoring agent, diagnostic process, or log reader obtains access to that history or process metadata.
- The exposed API key is recovered.
- The key is used against the corresponding provider API until it is revoked, expires, or reaches its ...[truncated 847 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove API keys from command-line examples and interfaces.
- Read secrets from provider-specific environment variables or a protected operating-system credential store.
- Prefer Windows Credential Manager, macOS Keychain, Linux Secret Service, or an equivalent managed secret system.
- If interactive configuration is necessary, use a masked prompt and avoid echoing the value.
- Pass only a credential identifier or environment-variable name to the adapter process.
- Ensure scripts never log secret values and redact credentials from diagnostics and error messages.
- Disable unnecessary command transcription and prevent secret-bearing commands from being written to history.
- Restrict configuration-file permissions to the owning user if secrets must be persisted.
- Rotate any real credentials previously supplied using the documented command-line pattern.
