Back to skill

Security audit

NWi跨境电商数据分析

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed ecommerce data API helper, but users should treat the NWi API key and any anomaly/contact submissions as sensitive.

Install only if you are comfortable sending ecommerce query parameters and optional anomaly details to NWi. Do not put personal data, secrets, or confidential business context in anomaly descriptions, and keep any generated or manually supplied API key out of source control, shared workspaces, and logs.

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

Warning
Location
SKILL.md:20
Finding

Plaintext API-Key Persistence and Exposure Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:20-26; related command examples at references/api.md:607-625
Vulnerability Type: Plaintext credential storage and insecure secret handling
Risk Level: Medium

Vulnerable Snippets

Faithful English translation of SKILL.md:20-26:

markdown
1. **Check existing key**: Read `references/api_key.txt`; use it directly if it exists.
2. **Obtain a new key** when no key exists or the key is invalid.
3. **Save key**: Write the obtained key to `references/api_key.txt`.

Request pattern from references/api.md:607-625:

bash
curl -s -X POST "https://asia-test-private.nint.hk/api/skill/get-global-primary-categories" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"xxx","start_month":"2026-01","end_month":"2026-01","platform_ids":[47]}'

The same section supplies additional commands that embed api_key directly inside the curl command argument.

Technical Analysis

The Skill instructs the Agent to persist an authentication credential in references/api_key.txt, a plaintext file inside the project directory. It specifies no restrictive file permissions, operating-system credential store, encryption, version-control exclusion, lifecycle policy, or secure deletion procedure.

Storing the key under the project tree creates several exposure channels:

  • The credential may be included in a repository commit, archive, backup, or Skill package.
  • Other local users or processes may read it when default filesystem permissions are permissive.
  • Workspace-indexing, diagnostic, or file-inspection tools may ingest and disclose it.
  • The key may remain after the Agent session ends, increasing the exposure period.

The documented curl pattern introduces a second exposure channel because the JSON containing the key is supplied as a command-line argument. Depending on the operating system and execution environment, command arguments can become v ...[truncated 2140 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the instruction to write credentials into references/api_key.txt.
  2. Store the key in an operating-system credential manager or a secrets-management service. A protected environment variable may be used when a credential manager is unavailable.
  3. If file-based storage is unavoidable:
    • Store the file outside the project and repository trees.
    • Create it with owner-only permissions, such as mode 0600.
    • Add the path to version-control and packaging exclusion rules.
    • Avoid backups and workspace indexing.
    • Delete the file securely when the credential is revoked or no longer required.
  4. Avoid placing the key directly in command-line arguments. Construct the request through a client that reads the secret from a protected process environment, or send the body through standard input without echoing or logging it.
  5. Redact api_key values from Agent messages, tool output, errors, telemetry, debug traces, and audit logs.
  6. Correct SKILL.md:12 so that it consistently requires JSON-body authentication and explicitly prohibits query-string authentication.
  7. Define credential rotation and revocation procedures for suspected disclosure.
  8. Apply minimum API permissions and conservative quotas to temporary keys to reduce the impact of compromise.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README explicitly states that the skill can automatically generate an API key and that an API key is stored under references/api_key.txt, but it does not warn users about local credential storage, sensitivity of the key, or expected file protections. In an agent skill context, silent credential creation and storage can lead to accidental exposure through workspace sharing, backups, logs, or source control.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README says users may submit contact information to obtain upgraded access and that NWi customer service will proactively contact them, but it does not present this as a privacy-impacting action requiring explicit warning and consent. Users may disclose personal or business contact details without understanding that the information will be transmitted and used for follow-up outreach.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README describes automatic anomaly detection and reporting to the NWi backend without clearly warning that user query context or derived usage data may be transmitted externally. In a data-analysis skill, this increases risk because business-sensitive queries, market interests, or dataset characteristics could be sent to a third party without informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases include very generic ecommerce terms such as '电商数据', '销量', '销额', and ranking/distribution phrases that are common in ordinary conversation. This can cause the skill to activate in contexts broader than intended, increasing the chance it is invoked on unrelated user requests and gains access to sensitive workflow steps like reading or persisting API credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs the agent to read and write an API key in a local file under references/api_key.txt without any explicit warning, consent flow, or safer secret-handling guidance. Storing credentials in a plain local file increases the risk of accidental disclosure to other skills, logs, backups, or users, especially in shared or multi-tenant agent environments.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/api.md (reported line 55)May include surrounding context.

md
| 前置接口 | `list` | `d["data"]` | 直接返回列表(get-all-category-list-by-name 同) |
| A1 类目分布 | `{global_category_lv1_list: [], total: "...", "currency_unit": "..."}` | `d["data"]["global_category_lv1_list"]` | total 为字符串 |
| A2 Top品牌 | `{topBrandSalesList: {平台名: [品牌...]}}` | `d["data"]["topBrandSalesList"]` | 按平台名分组的 dict |
| A3 Top店铺 | `{topShopList: {平台名: [店铺...]}}` | `d["data"]["topShopList"]` | 按平台名分组的 dict |
| A4 Top商品 | `{topItemList: {平台名: [商品...]}}` | `d["data"]["topItemList"]` | 按平台名分组的 dict |
| B5 品牌总览 | `{marketOverviewData: [{...}]}` | `d["data"]["marketOverviewData"]` | 单条汇总数据 |
| B6/C7/C8/C9 | `{MarketOverview: [{...}], "currency_unit": "..."}` | `d["data"]["MarketOverview"]` | 按市场分组的列表 |

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file documents requests that send api_key and free-form description/details content to a remote service, which can include sensitive operational or user data. The document does not warn users about privacy implications, remote transmission, or the need to avoid including secrets in anomaly payloads.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/api.md (reported line 610)May include surrounding context.

查询亚马逊美国站一级类目分布

bash
curl -s -X POST "https://asia-test-private.nint.hk/api/skill/get-global-primary-categories" -H "Content-Type: application/json" -d '{"api_key":"xxx","start_month":"2026-01","end_month":"2026-01","platform_ids":[47]}'

查询美容护理品类在东南亚的 Top 品牌(C8)

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

A natural-language policy issue exists because the skill documentation forces a specific language presentation for all users. There is no indication that users can choose another language or that Chinese-only output is a justified, region-specific constraint.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.