Back to skill

Security audit

Yunlv Pricing

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed B2B export pricing assistant that uses a third-party pricing API and local templates, with no evidence of hidden execution, credential theft, or destructive behavior.

Install only if you intend to use Yunlv/TradeGPT for B2B export pricing support. Treat its output as business guidance, not an automatic pricing decision, and avoid including confidential customer lists, negotiated prices, or sensitive internal pricing strategy unless you are comfortable sending the disclosed request context to the provider API.

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 (2)

T09 · Insecure Skill Coding Practices

Note
Location
scripts/pricing-calculator.py:72
Finding

Zero-Value Market Prices Cause an Unhandled Division-by-Zero Error

Content
View full analysis

Vulnerability Details

File Location: scripts/pricing-calculator.py, lines 72-75
Vulnerability Type: Improper numeric input validation resulting in denial of service
Risk Level: Low

python
avg_price = sum(market_prices) / len(market_prices)
min_price = min(market_prices)
max_price = max(market_prices)
gap_pct = ((your_price - avg_price) / avg_price) * 100

Technical Analysis

The position command converts user-controlled comma-separated values into market_prices and passes them to analyze_competitor_position() without validating that the values are finite and positive.

If the supplied prices have an average of zero, line 75 divides by zero and raises an unhandled ZeroDivisionError. Negative values can also be selected so that their sum is zero. Because the program has no exception handler around command processing, the exception terminates the process and prevents a structured result from being returned.

An empty or malformed price list can similarly terminate execution through unhandled conversion or aggregation errors, although the directly identified division-by-zero condition is sufficient to demonstrate the issue.

Attack Path

  1. An attacker or malformed upstream request invokes the calculator's position command.
  2. The attacker supplies a price list with an average of zero, such as:
    bash
    python3 scripts/pricing-calculator.py position --your-price 1 --prices 0
    
  3. cmd_position() parses the attacker-controlled value and calls analyze_competitor_position().
  4. avg_price becomes 0.0.
  5. The calculation of gap_pct divides by avg_price.
  6. Python raises an unhandled ZeroDivisionError, terminating the calculator process.

Impact Assessment

Exploitation causes denial of service for the affected calculator invocation. In an automated pricing pipeline, repeated malformed requests could disrupt report generation or dependent jobs. The issue ...[truncated 153 chars]

Remediation
View remediation

Remediation Suggestions

  • Reject empty competitor-price lists before performing aggregation.
  • Require every market price to be finite and greater than zero.
  • Explicitly verify that the calculated average is greater than zero before using it as a divisor.
  • Catch ValueError and arithmetic exceptions at the CLI boundary and return a controlled error message with a nonzero exit status.
  • Add tests covering empty input, malformed values, zero, negative values, values whose sum is zero, NaN, and positive or negative infinity.
  • Consider a validation helper such as:
    python
    import math
    
    if not market_prices:
        raise ValueError("At least one market price is required")
    if any(not math.isfinite(price) or price <= 0 for price in market_prices):
        raise ValueError("Market prices must be finite positive numbers")
    
    avg_price = sum(market_prices) / len(market_prices)
    

T09 · Insecure Skill Coding Practices

Note
Location
scripts/pricing-calculator.py:122
Finding

Zero Exchange Rate Causes an Unhandled Division-by-Zero Error

Content
View full analysis

Vulnerability Details

File Location: scripts/pricing-calculator.py, line 122
Vulnerability Type: Improper numeric input validation resulting in denial of service
Risk Level: Low

python
break_even = (total_cost - rebate) / exchange_rate

Technical Analysis

The simulate command accepts --exchange-rate as an unrestricted floating-point value. Although some output calculations elsewhere in the script conditionally avoid division when the exchange rate is not positive, simulate_profit() performs an unconditional division at line 122.

Supplying an exchange rate of zero therefore raises an unhandled ZeroDivisionError. The command-processing path does not catch this exception, so the entire invocation terminates without producing its expected JSON response.

Attack Path

  1. An attacker or malformed upstream request invokes the simulate command.
  2. The request supplies zero as the exchange rate:
    bash
    python3 scripts/pricing-calculator.py simulate \
      --cost 100 \
      --selling-price 20 \
      --exchange-rate 0
    
  3. cmd_simulate() forwards the value to simulate_profit().
  4. The function reaches the break-even calculation and divides by zero.
  5. Python raises an unhandled ZeroDivisionError.
  6. The calculator process terminates and no structured pricing result is returned.

Impact Assessment

Exploitation causes denial of service for the affected simulation request. If the CLI is exposed through an agent, service wrapper, or batch workflow, attacker-controlled input can interrupt that calculation and potentially fail the enclosing job. No additional system privileges, arbitrary code execution, confidential information, or persistent access can be obtained through this flaw.

Remediation
View remediation

Remediation Suggestions

  • Validate exchange_rate before any calculations and require it to be finite and strictly greater than zero.
  • Apply validation consistently in the calculation function rather than relying only on CLI parsing, so direct callers receive the same protection.
  • Return a controlled validation error rather than allowing an arithmetic exception to terminate the process.
  • Reject nonsensical negative rates as well as zero, NaN, and infinite values.
  • Add unit and CLI integration tests for all invalid exchange-rate cases.
  • A suitable guard is:
    python
    import math
    
    if not math.isfinite(exchange_rate) or exchange_rate <= 0:
        raise ValueError("Exchange rate must be a finite positive number")
    
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description uses broad 'use when' language for common pricing-related topics without clear exclusion criteria or tighter scope boundaries. This can cause the orchestrator to invoke the skill during ordinary business discussion, sending user context to an external API unnecessarily and increasing the chance of inappropriate routing or data exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list contains generic phrases like 'pricing strategy', 'pricing advice', and broad Chinese pricing terms that are likely to appear in normal conversation. Overbroad triggers increase accidental activation risk, which may route sensitive commercial context to the third-party TradeGPT API even when the user did not intend to use this skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire template is written in Chinese, including headings and field labels, with no indication that users may choose another language or that the skill is intended only for a Chinese-language context. Under the policy, fixed language behavior without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire markdown template is written only in Chinese, including headings and field labels, with no indication that users may choose another language or that the skill is intended exclusively for a Chinese-language or region-specific workflow. This creates a natural-language locale constraint that may violate policy when no user opt-in or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file contains user-facing instructional content only in Chinese, and there is no indication that the skill is region-specific or that users may choose another language. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file contains user-facing natural-language descriptions and command help in Chinese only. Under the policy, forcing a specific language without user opt-in can be a locale/language policy violation when no alternative or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The argparse description, subcommand help, and argument help strings are all presented in Chinese, which imposes a single language on users. The file does not provide a mechanism to choose another language or clearly justify the locale restriction.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.