Back to skill

Security audit

Seller Profit Calculator

Security checks for vulnerabilities and agentic risk

Overview

This is a local order-profit spreadsheet parser, with some overbroad documentation and privacy caveats but no evidence of hidden execution, persistence, or data exfiltration in the package.

Use this skill only on order-export spreadsheets you intentionally provide. Prefer the local mode, avoid uploading unnecessary customer or personal data, and do not rely on the hosted API option until the publisher explains what data is sent and retained. Treat Markdown reports from untrusted workbooks carefully because spreadsheet text can affect report rendering.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/parse_orders.py:579
Finding

Unescaped Spreadsheet Values Allow Markdown Report Injection

Content
View full analysis

Vulnerability Details

File Location: scripts/parse_orders.py, lines 579–614; spreadsheet values originate at lines 459–463
Vulnerability Type: Markdown injection through untrusted spreadsheet fields
Risk Level: Medium

Vulnerable Code

python
# By platform
if results['by_platform']:
    md.append("\n## 🌍 按平台汇总")
    md.append("| 平台 | 订单 | 收入 | 平台支出 | 订单成本 | 净利润 | 利润率 |")
    md.append("|------|------|------|---------|---------|--------|--------|")
    for k, d in sorted(results['by_platform'].items(), key=lambda x: x[1]['profit'], reverse=True):
        m = (d['profit'] / d['income'] * 100) if d['income'] != 0 else 0
        md.append(f"| {k} | {d['count']} | ¥{d['income']:,.2f} | ¥{d['expense']:,.2f} | ¥{d['cost']:,.2f} | ¥{d['profit']:,.2f} | {m:.1f}% |")

# By store
if results['by_store']:
    md.append("\n## 🏪 按店铺汇总")
    md.append("| 店铺 | 订单 | 收入 | 平台支出 | 订单成本 | 净利润 | 利润率 |")
    md.append("|------|------|------|---------|---------|--------|--------|")
    for k, d in sorted(results['by_store'].items(), key=lambda x: x[1]['profit'], reverse=True):
        m = (d['profit'] / d['income'] * 100) if d['income'] != 0 else 0
        md.append(f"| {k} | {d['count']} | ¥{d['income']:,.2f} | ¥{d['expense']:,.2f} | ¥{d['cost']:,.2f} | ¥{d['profit']:,.2f} | {m:.1f}% |")

# Top/bottom
orders = results['orders']
if orders:
    bottom5 = orders[:5]
    top5 = orders[-5:][::-1]

    md.append("\n## 🔴 亏损最严重的5单")
    md.append("| # | 订单号 | 平台 | 店铺 | 收入 | 支出 | 成本 | 净利润 |")
    md.append("|---|--------|------|------|------|------|------|--------|")
    for i, o in enumerate(bottom5, 1):
        md.append(f"| {i} | {o['order_no'][:18]} | {o['platform']} | {o['store'][:8]} | ¥{o['platform_income']:,.2f} | ¥{o['platform_expense']:,.2f} | ¥{o['order_cost']:,.2f} | 🔴 ¥{o['net_profit_calc']:,.2f} |")

    md.append("\n## 🟢 盈利最高的5单")
    md.append("| # | 订单号 | 平台 | 店铺 | 收入 | 支出 | 成本 | 净利润 
...[truncated 2679 chars]
Remediation
View remediation

Remediation Suggestions

  1. Implement one centralized escaping function for all workbook-derived values before placing them in Markdown:

    python
    def escape_markdown_table(value):
        text = str(value or '')
        text = text.replace('\\', '\\\\')
        text = text.replace('|', '\\|')
        text = text.replace('\r', ' ').replace('\n', ' ')
        text = text.replace('<', '<').replace('>', '>')
        return text
    
  2. Apply the function to every untrusted textual field, including order numbers, platform names, store names, SKUs, statuses, and aggregation keys.

  3. Prefer a structured report-generation library that performs contextual escaping rather than constructing Markdown through direct interpolation.

  4. Configure the intended Markdown renderer to reject raw HTML and disable remote image or resource loading.

  5. Add tests containing vertical bars, CR/LF characters, Markdown links and images, HTML tags, backslashes, and unusually long cell values.

  6. If reports are converted to HTML, apply HTML escaping at the conversion boundary and enforce an appropriate Content Security Policy.

T08 · Insecure Dependencies

Note
Location
README.md:73
Finding

Unpinned Third-Party Dependency Produces Non-Reproducible Installations

Content
View full analysis

Vulnerability Details

File Location: README.md, lines 73–76
Vulnerability Type: Unpinned third-party dependency
Risk Level: Low

Vulnerable Code

markdown
## Dependencies

- Python 3.8+
- openpyxl (`pip install openpyxl`)

Technical Analysis

The documented installation command installs whichever openpyxl release the configured package index currently resolves. No exact version, integrity hash, lock file, or reviewed dependency manifest is supplied.

The package name itself is not misspelled, and the audit found no evidence that the currently named package is malicious. The weakness is that the code executed by future installations may differ from the dependency version that was tested or reviewed. This reduces build reproducibility and creates exposure to a future compromised, malicious, or incompatible upstream release.

Attack Path

  1. A user follows the documented pip install openpyxl instruction.
  2. The package manager contacts its configured package index and resolves the current release.
  3. A release that was not reviewed with this Skill is downloaded and installed.
  4. If that release or its dependency chain is compromised, malicious code may execute during installation or when the parser imports and uses the package.

This path depends on a package-index, maintainer-account, release, or dependency-chain compromise; no such compromise was identified in the audited project.

Impact Assessment

The potential impact is determined by the privileges of the account performing installation or running the parser. A compromised dependency could access files and environment variables available to that account, alter generated reports, or execute arbitrary Python behavior in the process.

In a normal user installation, scope would generally be limited to that user and accessible data. Installation with administrative privileges could increase the affected scope. The audited project ...[truncated 86 chars]

Remediation
View remediation

Remediation Suggestions

  1. Add a dependency manifest containing an exact, reviewed openpyxl version, such as:

    text
    openpyxl==REVIEWED_VERSION
    
  2. Generate and publish cryptographic hashes for all resolved packages and install them using:

    bash
    pip install --require-hashes -r requirements.txt
    
  3. Use a lock-generation workflow to pin transitive dependencies where applicable.

  4. Document installation inside an isolated virtual environment and advise users not to run pip with administrative privileges.

  5. Add automated dependency vulnerability and update monitoring.

  6. Review and test dependency updates before changing the pinned version.

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

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README instructs users to configure an API key and process order exports with a hosted API option, but does not disclose that potentially sensitive order data may be transmitted off-device to an external service. Since order exports can contain customer, pricing, and business-sensitive data, this omission can lead users to unknowingly exfiltrate confidential information to a third party.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documentation claims broad multi-platform profit calculation capabilities, while the analyzed behavior appears limited to header/sample inspection and field-map preparation. This mismatch is dangerous because users may upload sensitive order exports expecting full local processing, when the actual behavior and limitations are not accurately disclosed, undermining informed consent and safe review.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This is a markdown file, so vague-trigger checks apply. The description claims compatibility with virtually any platform or ERP, which is overly broad and lacks negative examples or specific boundaries, making it unclear what inputs are actually supported versus unsupported.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This statement suggests near-universal activation on arbitrary spreadsheets but does not define required column names, formats, or failure cases. Without constraints or negative examples, users may expect the skill to work on inputs it cannot safely or correctly process.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill advertises workflows that read uploaded files and write outputs such as JSON reports, but the manifest does not declare any explicit tool or permission boundaries. That creates an authorization and review gap: consumers and the platform cannot clearly verify what file access is intended, increasing the risk of over-broad file operations or unexpected data handling.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Claiming the skill works with 'any' platform or ERP without tight trigger constraints encourages over-broad use on arbitrary spreadsheets and business exports. That expands the attack and privacy surface by prompting users to submit data outside the tested scope, possibly including unexpected schemas or sensitive content the skill is not prepared to handle safely.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The repeated 'any Excel order export' language lacks boundaries and negative examples, which can cause users or agents to route unrelated or highly sensitive spreadsheets into the skill. In this context, order exports often contain customer, financial, and operational data, so vague invocation language materially increases misuse risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill asks users to upload order export files but does not warn that these files may contain sensitive personal, financial, and commercial information. Because the workflow explicitly mentions agent/LLM reasoning over headers and sample rows, the absence of a data-sensitivity notice can lead to inadvertent exposure of customer data, pricing, margins, or business identifiers.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · README.md (reported line 57)May include surrounding context.

md
| Walmart / eBay | ✅ | Platform backend export |
| Other platforms | ✅ | Generic auto field detection |

> **Field mapping is automatic.** Not limited to any specific platform. As long as the export contains standard order fields.

---

Static analysis

No suspicious patterns detected.