T09 · Insecure Skill Coding Practices
- Location
scripts/common.js:160- Finding
Global Basic Auth credentials may be disclosed to unrelated Prometheus instances
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Prometheus query tool, but its credential handling is broad enough that users should review it before installing.
Install only if you are comfortable with this skill reading local .env files, storing Prometheus credentials in plaintext config, and using environment Basic Auth credentials as fallbacks for configured instances. Prefer per-instance credentials, restrict config file permissions, avoid running it from untrusted project directories, and do not use --all with mixed-trust Prometheus endpoints until credential scoping is fixed.
scripts/common.js:160Global Basic Auth credentials may be disclosed to unrelated Prometheus instances
scripts/cli.js:126The configuration wizard stores passwords in plaintext without enforcing restrictive file permissions
scripts/common.js:36The CLI imports all variables from workspace and current-directory .env files
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Referenced artifact was not completely inspected
node scripts/cli.js init
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
/**
* Load environment variables from .env file
*/
function loadEnvFile() {
if (envLoaded) return;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
/**
* Load environment variables from .env file
*/
function loadEnvFile() {
if (envLoaded) return;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
/**
* Load environment variables from .env file
*/
function loadEnvFile() {
if (envLoaded) return;
The code automatically loads a .env file from the workspace root, which may contain secrets, without any trust boundary checks or user opt-in. In an agent/skill context, workspace contents can be influenced by external tasks or repositories, so implicit secret loading can cause credential confusion and unintended use of attacker-supplied Prometheus endpoints or credentials.
const workspaceDir = getWorkspaceDir();
const envPaths = [
join(workspaceDir, '.env'),
join(process.cwd(), '.env'),
];
Loading .env from process.cwd() is especially risky because the current working directory is often caller-controlled in CLI/agent environments. An attacker who can place a .env in the execution directory can inject PROMETHEUS_URL, PROMETHEUS_USER, or PROMETHEUS_PASSWORD values, redirecting requests and causing credential disclosure via Basic Auth to an attacker-controlled server.
const workspaceDir = getWorkspaceDir();
const envPaths = [
join(workspaceDir, '.env'),
join(process.cwd(), '.env'),
];
for (const envPath of envPaths) {
No suspicious patterns detected.