T09 · Insecure Skill Coding Practices
- Location
scripts/L2-auth-storage-C17-baidu-list-files.py:27- Finding
Baidu Netdisk access token disclosed through request URLs and error output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a disclosed connector toolkit, but it includes scripts that handle credentials and can mutate external services, with a concrete Baidu token-leak risk that users should review before installing.
Install only if you trust the publisher and will provide narrowly scoped credentials. Avoid running the Baidu Netdisk scripts until token redaction or safer auth handling is added, and review each mutating script before allowing an agent to post messages, upload files, create repos/MRs/issues, tickets, surveys, CRM leads, or email attachments.
scripts/L2-auth-storage-C17-baidu-list-files.py:27Baidu Netdisk access token disclosed through request URLs and error output
scripts/L2-auth-storage-C17-baidu-upload.py:40Baidu Netdisk upload token may leak from multiple credential-bearing request URLs
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"type": doc_type # doc, sheet, slide
}
resp = requests.post(f"{API_BASE}/files", headers=headers, data=data)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"type": doc_type
}
resp = requests.post(f"{API_BASE}/documents", headers=headers, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"properties": properties
}
resp = requests.post(f"{API_BASE}/pages", headers=headers, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
if sorts:
payload["sorts"] = sorts
resp = requests.post(f"{API_BASE}/databases/{database_id}/query", headers=headers, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
if kb_id:
params["kb_id"] = kb_id
resp = requests.get(f"{API_BASE}/search", headers=headers, params=params)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"keyword": keyword
}
resp = requests.get(f"{API_BASE}/search", headers=headers, params=params)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"keyword": keyword
}
resp = requests.get(f"{API_BASE}/search", headers=headers, params=params)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"keyword": keyword
}
resp = requests.get(f"{API_BASE}/search", headers=headers, params=params)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
payload["timestamp"] = timestamp
payload["sign"] = sign
resp = requests.post(WEBHOOK_URL, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
payload["timestamp"] = timestamp
payload["sign"] = sign
resp = requests.post(WEBHOOK_URL, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
payload["timestamp"] = timestamp
payload["sign"] = sign
resp = requests.post(WEBHOOK_URL, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
}
resp = requests.post(url, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
}
resp = requests.post(url, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
if at_mobiles:
payload["at"]["atMobiles"] = at_mobiles
resp = requests.post(url, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
}
resp = requests.post(WEBHOOK_URL, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
}
resp = requests.post(WEBHOOK_URL, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
}
resp = requests.post(WEBHOOK_URL, json=payload)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"web": 1
}
resp = requests.get(API_BASE, params=params)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"rtype": rtype # 1-重命名 2-覆盖 3-覆盖
}
resp = requests.post(f"{API_BASE}/precreate", params=params)
resp.raise_for_status()
pre_data = resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"partseq": i
}
resp = requests.post(
UPLOAD_API,
params=params,
files={"file": ("chunk", chunk)}
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"block_list": json.dumps(uploaded_blocks)
}
resp = requests.post(f"{API_BASE}/create", params=params)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"path": path
}
resp = requests.get(f"{API_BASE}/files", headers=headers, params=params)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
if return_date:
params["return_date"] = return_date
resp = requests.get(f"{API_BASE}/flights/search", headers=headers, params=params)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
if star:
params["star"] = star
resp = requests.get(f"{API_BASE}/hotels/search", headers=headers, params=params)
resp.raise_for_status()
return resp.json()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
"channel": channel
}
resp = requests.post(f"{API_BASE}/sessions", headers=headers, json=payload)
resp.raise_for_status()
return resp.json()