Back to skill

Security audit

Loan Qualification Check

Security checks for vulnerabilities and agentic risk

Overview

This loan-screening skill needs review before installation because it can send customer financial data and an API key to a remote service over a plaintext HTTP default.

Install only after confirming you are comfortable sending applicant financial details to the operator's backend. Do not use real customer data unless the endpoint is changed to HTTPS, the provider states retention and privacy terms, and applicants have consented. Treat the user key like a credential, and clarify the extra SaaS/account/admin functions before use.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/loan_check.py:10
Finding

Sensitive Financial Data and Authentication Token Transmitted over Plaintext HTTP

Content
View full analysis

Vulnerability Details

File Location: scripts/loan_check.py, lines 10–11, 14–24, and 82–94
Vulnerability Type: Cleartext transmission of sensitive information
Risk Level: High

Vulnerable Code

python
API_BASE = os.environ.get(f"COZE_LOAN_CHECK_API_URL_{SKILL_ID}", os.environ.get("LOAN_CHECK_API_URL", "http://47.109.39.255:8765/api/v4")
USER_KEY = os.environ.get("LOAN_CHECK_USER_KEY", "")


def api_call(endpoint, data=None, method="POST"):
    url = f"{API_BASE.rstrip('/')}/{endpoint}"
    h = {"Content-Type": "application/json"}
    if USER_KEY:
        h["X-User-Key"] = USER_KEY
    try:
        if method == "GET":
            resp = requests.get(url, headers=h, params=data or {}, timeout=30)
        else:
            resp = requests.post(url, headers=h, json=data or {}, timeout=60)

The loan-assessment operation supplies sensitive customer information to this API call:

python
def cmd_check(args):
    if not USER_KEY:
        print("❌ 请先设置 LOAN_CHECK_USER_KEY 环境变量", file=sys.stderr)
        print("   注册命令:脚本 register --username 你的名字", file=sys.stderr)
        sys.exit(1)
    print(f"🚀 贷款资质预审中...", file=sys.stderr)
    data = {}
    data['age'] = args.age
    data['income'] = args.income
    if args.credit: data['credit'] = args.credit
    if args.loan_type: data['loan_type'] = args.loan_type
    data['loan_amount'] = args.loan_amount if args.loan_amount else 10
    if args.city: data['city'] = args.city
    result = api_call("loan-check", data)

Technical Analysis

The default API endpoint uses unencrypted HTTP:

text
http://47.109.39.255:8765/api/v4

The client places the user's authentication credential in the X-User-Key header and sends applicant information—including age, income, credit status, requested loan amount, loan type, and city—in the request body. HTTP provides neither transport confidentiality nor cryptographic server authentication.

An attacker with a suitable network position can inspect the r ...[truncated 1964 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace the plaintext default endpoint with an HTTPS URL on an operator-controlled hostname that has a valid TLS certificate.
  2. Reject insecure endpoint configurations before sending any request:
python
from urllib.parse import urlparse

parsed = urlparse(API_BASE)
if parsed.scheme != "https":
    raise RuntimeError("LOAN_CHECK_API_URL must use HTTPS")
  1. Do not provide an HTTP fallback. Fail closed when a secure endpoint has not been configured.
  2. Retain TLS certificate and hostname verification; do not introduce verify=False or custom logic that bypasses certificate validation.
  3. Rotate user keys that may already have traversed plaintext networks and provide a revocation mechanism for compromised keys.
  4. Apply least privilege and expiration to API keys, rate-limit their use, and monitor for replay or anomalous consumption.
  5. Minimize submitted applicant data to fields strictly required for an assessment.
  6. Clearly disclose the remote recipient, purpose, retention period, and handling policy for financial information before transmission.
  7. Consider application-level encryption for especially sensitive fields in addition to mandatory TLS where the service's threat model requires it.
  8. Add automated tests that reject http:// API URLs and verify that credentials are transmitted only through authenticated TLS connections.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation supports batch import of customer records for evaluation but does not clearly warn that sensitive personal and financial data will be sent to a backend API. In the loan-screening context, this can involve large-scale transfer of highly sensitive data, raising privacy, consent, compliance, and breach-risk concerns.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill requires environment variables and documents backend API usage, but it does not declare an explicit tool/permission scope. This weakens least-privilege controls and makes it harder for users or the platform to understand that the skill can access secrets and send data over the network.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest presents the skill as a loan prequalification tool, but the documentation also exposes registration, balance lookup, recharge, and operational statistics features. This scope expansion can mislead users about what actions the skill may perform and may expose account-management or admin functionality beyond the advertised purpose.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger conditions are broad, conversational, and likely to activate the skill during ordinary discussion about borrowing eligibility. In a skill that sends user financial data to a backend service, overbroad activation increases the chance of unintended collection and transmission of sensitive information without sufficiently explicit user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill collects and transmits sensitive financial/profile data such as age, income, city, credit profile, loan type, and desired amount to a remote API, but the description provides no privacy notice, retention statement, or transmission warning. In a financial context, this is especially risky because the data can be used for profiling, targeted fraud, or secondary commercial use if the backend is insecure or untrusted.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The code sends user-supplied financial/profile data to an external network endpoint, including a default hard-coded HTTP URL, which creates confidentiality and integrity risks during transit. Because this is a loan-assessment skill handling sensitive information, remote transmission to an undisclosed third-party service is materially more dangerous than in a low-sensitivity context.

Content

Scanner excerpt · scripts/loan_check.py (reported line 25)May include surrounding context.

python
if method == "GET":
            resp = requests.get(url, headers=h, params=data or {}, timeout=30)
        else:
            resp = requests.post(url, headers=h, json=data or {}, timeout=60)
        if resp.status_code >= 400:
            try:
                err = resp.json()

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill exposes registration, account info, pricing, and service-catalog operations unrelated to narrowly performing loan prequalification. This expands the skill’s effective capability surface and introduces undisclosed interactions with a third-party commercial service, increasing the chance of misuse, surprise billing, and unintended data sharing.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The implemented behavior is broader than the advertised purpose because it includes a general SaaS client surface for account and product discovery, not just loan qualification. This mismatch undermines informed consent and makes it easier for users or upstream agents to invoke commercial or data-sharing actions they did not expect from the skill description.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description says new users receive 5 free uses, while the skill documentation elsewhere states new users receive 3 free evaluations. This is an active contradiction in the skill's stated behavior and pricing/usage terms, which can mislead users about what the skill actually provides.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

文件中的标题、说明、命令注释和操作指引均仅以中文提供,没有说明是否支持其他语言,也未给出用户语言偏好选择。这可能构成默认强制特定语言的自然语言策略问题,尤其在面向广泛用户时缺少显式的语言/地区限定。

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The stated purpose is loan qualification pre-screening, but this section promotes GEO optimization, enterprise agent customization, automation consulting, pricing, and direct WeChat contact. Those are marketing and sales capabilities unrelated to performing a loan eligibility assessment and are not justified by the manifest's functional scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This markdown file is entirely presented in Chinese and does not provide any user opt-in, alternative language, or note that it is intended only for a Chinese-speaking audience. Under the policy, a skill should not implicitly force a specific language unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

Natural-language strings in the file, including the primary description and user-facing CLI messages, are presented only in Chinese. Under the policy, forcing a specific language without user opt-in is a locale/language policy concern unless the restriction is explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.