T09 · Insecure Skill Coding Practices
- Location
scripts/gui-upload.mjs:83- Finding
Bearer Secret and Local Path Disclosure to Arbitrary Hosts over Plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The PicGo upload skill is mostly coherent, but its helper script can be pointed at arbitrary HTTP hosts and may send a local auth secret and file paths there.
Review this skill before installing. It is suitable for PicGo-based uploads only if you are comfortable with public links and global PicGo CLI setup. Avoid using --host with anything except localhost or 127.0.0.1, and do not put sensitive files, bearer secrets, or confidential filenames through the GUI helper unless the endpoint is definitely your local PicGo app.
scripts/gui-upload.mjs:83Bearer Secret and Local Path Disclosure to Arbitrary Hosts over Plaintext HTTP
SKILL.md:66Unpinned Global npm Package Installation
Referenced artifact was not completely inspected
node scripts/gui-upload.mjs /abs/path/to/image.png
Referenced artifact was not completely inspected
node scripts/gui-upload.mjs /abs/path/to/image.png
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
// --- Secret resolution ------------------------------------------------------
// Priority: --secret flag > .env next to this script > PICGO_SERVER_SECRET env.
function resolveSecret (flagSecret) {
if (flagSecret) return flagSecret
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
// --- Secret resolution ------------------------------------------------------
// Priority: --secret flag > .env next to this script > PICGO_SERVER_SECRET env.
function resolveSecret (flagSecret) {
if (flagSecret) return flagSecret
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
// --- Secret resolution ------------------------------------------------------
// Priority: --secret flag > .env next to this script > PICGO_SERVER_SECRET env.
function resolveSecret (flagSecret) {
if (flagSecret) return flagSecret
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
if (flagSecret) return flagSecret
const scriptDir = path.dirname(fileURLToPath(import.meta.url))
const envPath = path.join(scriptDir, '.env')
if (existsSync(envPath)) {
try {
// Node 22 builtin; loads KEY=VALUE pairs into process.env. Zero-dependency.
Without declared permissions the skill's intent is opaque and cannot be validated.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
npm install picgo -g
If the install fails (commonly an `EACCES` permission error), **don't try sudo automatically** — show the user the command to run themselves (e.g. `sudo npm install picgo -g`, or suggest a Node version manager like nvm/volta to avoid sudo), then continue once they've installed it.
### Step 3 — Upload via the CLI (optimistic)
The script claims to talk to a local PicGo GUI server, but exposing a user-controlled --host lets callers direct requests to arbitrary hosts over HTTP. That broadens the skill into a generic network client and can enable SSRF-style access to internal services or accidental exfiltration of local file paths and authentication secrets to a non-local endpoint.
Detected: suspicious.env_credential_access