T09 · Insecure Skill Coding Practices
- Location
scripts/free-models.js:12- Finding
Unnecessary Collection and Requirement of an OpenRouter API Key
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly does what it claims, but it unnecessarily asks for and reads an OpenRouter API key that its code does not use.
Review before installing. The model discovery functionality is straightforward, but do not provide a live OpenRouter API key to this version unless you are comfortable with unnecessary credential exposure to the Node.js process. Prefer a version that removes the key requirement or clearly uses and scopes the key for authenticated functionality.
scripts/free-models.js:12Unnecessary Collection and Requirement of an OpenRouter API Key
Referenced artifact was not completely inspected
import { discoverFreeModels } from './scripts/free-models.js';
Referenced artifact was not completely inspected
import { discoverFreeModels } from './scripts/free-models.js';
Referenced artifact was not completely inspected
import { discoverFreeModels } from './scripts/free-models.js';
Referenced artifact was not completely inspected
import { discoverFreeModels } from './scripts/free-models.js';
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
const models = await fetchAllModels();
return models.filter((m) => {
const promptPrice = parseFloat(m.pricing.prompt);
return promptPrice === 0 || promptPrice < 0.0001;
});
}
The README explicitly instructs users to place a live OpenRouter API key into an environment variable but gives no guidance on secure handling, scoping, rotation, or avoiding accidental disclosure in shell history, logs, screenshots, or shared environments. While using environment variables is common practice, documenting secret setup without basic safety warnings can lead to inadvertent credential exposure and downstream account misuse.
The header comment and CLI check state that OPENROUTER_API_KEY is required, implying authenticated API usage. However, fetchAllModels performs an unauthenticated fetch to the models endpoint and no authorization header or API-key-based behavior appears anywhere in the code, so the documentation actively misstates what the code needs to do its core work.