T09 · Insecure Skill Coding Practices
- Location
SKILL.md:66- Finding
Hardcoded ISP Credentials Exposed in Skill Documentation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is an ISP API test runner, but it exposes and handles credentials, database data, tokens, and reports in ways users should review carefully before installing.
Install only in a controlled test environment after rotating the exposed credentials, requiring HTTPS, using least-privilege read-only database accounts, reviewing every config file's SQL and URL, and treating generated report files as sensitive secrets-bearing artifacts. Do not publish or share raw reports without redaction.
SKILL.md:66Hardcoded ISP Credentials Exposed in Skill Documentation
scripts/run_isp_test.py:59Sensitive Authentication Material and API Data Transmitted over Plaintext HTTP
scripts/run_isp_test.py:229Access Tokens and Request Signatures Persisted in Generated Reports
scripts/run_isp_test.py:121Arbitrary SQL from Configuration Executed with Database Account Privileges
scripts/run_isp_test.py:617Unsafe Dynamic Execution of a Mutable Adjacent Skill Module
SKILL.md:187Third-Party Dependencies Installed without Version or Integrity Pinning
The skill clearly instructs execution of Python scripts that perform network access, database access, and generate local output files, but it declares no explicit tool scope or permissions boundaries. In an agent setting, this creates an authorization gap: the agent may invoke sensitive capabilities without clear user-facing constraints, increasing the risk of unintended outbound requests, credential use, or filesystem writes.
The skill is designed to use real database data, embedded credentials, external API testing, and local report generation, yet it provides no explicit warning or consent flow for handling secrets, production-like data, or writing artifacts containing sensitive responses. In context, this is especially risky because the document includes plaintext credentials and a database endpoint, so an agent could expose, misuse, or persist sensitive information during testing.
The documentation states the agent does not generate, copy, or rewrite scripts in the project directory, but later says it automatically generates report, result, and data files in the output directory, which may be the project directory. This contradiction can mislead users and downstream policy systems about actual write behavior, causing unsafe assumptions around local file modifications and data leakage.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
'client_secret': appSecret,
}
headers = {"Content-Type": "application/json", "Accept": "*/*"}
resp = requests.post(token_url, json=req_data, headers=headers, timeout=30).json()
if resp.get('success'):
return resp['response']['access_token']
raise Exception("获取token失败: " + str(resp))
Database fixture values are printed directly to stdout, which can expose real customer or production-like data in CI logs, terminal scrollback, or centralized log collectors. Because this skill explicitly loads '真实测试数据' from a database, the context makes the leak more dangerous than a generic debug print.
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
headers = {"Content-Type": "application/json;charset=UTF-8"}
try:
if http_method.upper() == "GET":
resp = requests.get(url, params=body, headers=headers, timeout=timeout)
else:
resp = requests.post(url, json=body, headers=headers, timeout=timeout)
try:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
if http_method.upper() == "GET":
resp = requests.get(url, params=body, headers=headers, timeout=timeout)
else:
resp = requests.post(url, json=body, headers=headers, timeout=timeout)
try:
return {"status_code": resp.status_code, "body": resp.json(),
"raw": resp.text, "error": None}
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
if http_method.upper() == "GET":
resp = requests.get(url, params=body, headers=headers, timeout=timeout)
else:
resp = requests.post(url, json=body, headers=headers, timeout=timeout)
try:
return {"status_code": resp.status_code, "body": resp.json(),
"raw": resp.text, "error": None}
The generated JSON/JS/HTML reports persist full request bodies and response bodies to disk, which can include access tokens, identifiers, invoice data, or database-derived test fixtures. In this API-testing context, long-lived local artifacts substantially increase exposure through accidental sharing, backups, or later compromise of the workstation or CI environment.
The manifest description and visible documentation are entirely in Chinese, and the skill does not indicate that users may choose another language or that the locale restriction is required for a region-specific workflow. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern.