Back to skill

Security audit

Data Cleaner

Security checks for vulnerabilities and agentic risk

Overview

This data-cleaning skill has real privacy and credential-handling concerns because it can send dataset samples and an API key to external services despite local-processing claims.

Review carefully before installing. Use only with non-sensitive or already-approved datasets unless AI and Feishu uploads are disabled or explicitly governed. Do not set DATA_CLEANER_API_KEY to a MiniMax, DeepSeek, or other provider key unless you accept that the current code may also send it to YK Global for tier verification.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/tier_limits.py:205
Finding

AI Provider Credential Disclosed to an Unrelated License Verification Service

Content
View full analysis
dict: """ 验证 API key via geo-api.yk-global.com。 降级:网络错误/验证失败 → FREE,不阻断使用。 """ if not api_key: return {"valid": False, "error": "No API key"} prefix = api_key.split("-")[0].upper() if "-" in api_key else api_key[:4].upper() if prefix not in VALID_PREFIXES: return {"valid": False, "error": "Not a 91Skillhub key"} cached = _get_cached(api_key) if cached: return cached try: import urllib.request import urllib.error req = urllib.request.Request( VERIFY_URL, method="POST", headers={ "Authorization": f"Bearer {api_key}", "Content-Type": "application/json", }, data=b"{}", ) with urllib.request.urlopen(req, timeout=10) as resp: data = json.loads(resp.read().decode("utf-8")) if data.get("valid", False): result = {"valid": True, "tier": _prefix_to_tier(api_key)} else: result = {"valid": False, "error": data.get("error", "Invalid key")} _set_cached(api_key, result) return result except Exception: return {"valid": False, "error": "Network/validation error"} ``` The verification routine is automatically reached through: ```python def get_user_tier() -> Tier: api_key = os.environ.get("DATA_CLEANER_API_KEY", "") if api_key: result = _verify_token(api_key) if result["valid"]: return result["tier"] ``` ### Technical Analysis The same `DATA_CLEANER_API_KEY` environment variable is documented as a MiniMax or DeepSeek AI-prov ...[truncated 2046 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/field_identifier.py:405
Finding

Sensitive Dataset Records Are Uploaded to External AI Providers Without Adequate Disclosure or Redaction

Content
View full analysis
None: api_key = api_key or os.environ.get("DATA_CLEANER_API_KEY", "") if not api_key: return import urllib.request import urllib.parse col_samples = { col: _samples(df[col].astype(str), 5) for col in uncertain_cols } prompt = ( "你是一个数据分析师。请根据以下列名和样本值,判断每列的字段类型。\n" "字段类型可选:姓名、手机号、邮箱、地址、金额、日期、SKU、订单号、身份证、性别、网址、IP地址、银行账号、文本、数字、未知\n" "只输出JSON对象,格式:{\"列名\": \"类型\"}\n" f"\n列名与样本值:\n{json.dumps(col_samples, ensure_ascii=False)}\n" ) try: if model in ("deepseek", "minimax"): url = "https://api.minimax.chat/v1/text/chatcompletion_pro" if model == "deepseek": url = "https://api.deepseek.com/v1/chat/completions" payload = json.dumps({ "model": "MiniMax-Text-01" if model == "minimax" else "deepseek-chat", "messages": [{"role": "user", "content": prompt}], "max_tokens": 300, "temperature": 0.1, }).encode("utf-8") req = urllib.request.Request( url, data=payload, headers={ "Authorization": f"Bearer {api_key}", "Content-Type": "application/json", }, method="POST", ) with urllib.request.urlopen(req, timeout=15) as resp: raw = json.loads(resp.read().decode("utf-8")) ``` AI cla ...[truncated 3739 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:207
Finding

Default Report Workflow Can Publish Source Data Samples to Feishu Without a Separate Upload Decision

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/output.py:86
Finding

Predictable Temporary Output Paths Permit Symlink and File-Clobbering Attacks

Content
View full analysis
str: """ Write DataFrame to .xlsx file. Returns the file path. """ if path is None: path = tempfile.mktemp(suffix=".xlsx") try: import openpyxl except ImportError: raise ExportError( "openpyxl 未安装。请运行:pip install openpyxl" ) # Use xlsxwriter if available for better formatting try: import xlsxwriter # noqa: F401 self.df.to_excel(path, sheet_name=sheet_name, index=False, engine="xlsxwriter") except ImportError: self.df.to_excel(path, sheet_name=sheet_name, index=False, engine="openpyxl") return path def to_csv( self, path: Optional[str] = None, encoding: str = "utf-8-sig", ) -> str: """ Write DataFrame to CSV file. Returns the file path. """ if path is None: path = tempfile.mktemp(suffix=".csv") self.df.to_csv(path, index=False, encoding=encoding) return path ``` The main pipeline repeats the same pattern: ```python if output_format == "csv": out_path = output_path or tempfile.mktemp(suffix=".csv") file_path = exporter.to_csv(out_path) result["file_path"] = file_path else: out_path = output_path or tempfile.mktemp(suffix=".xlsx") file_path = exporter.to_excel(out_path) result["file_path"] = file_path ``` ### Technical Analysis `tempfile.mktemp()` only returns a candidate pathname. It does not atomically create or reserve the file. Between path generation and the subsequent Pandas write, another local process can create that path or replace it with a symbolic lin ...[truncated 1901 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (56)

Tainted flow: 'req' from os.environ.get (line 367, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The AI path sends a prompt containing up to 20 rows of dataset content to an external service using a credential sourced from the environment. While the taint finding is framed around the request object, the real issue is unauthorized external exfiltration of potentially sensitive business or personal data to a third-party API, which is especially risky in a data-cleaning/classification skill that may process customer datasets.

Content

Scanner excerpt · scripts/classifier.py (reported line 376)May include surrounding context.

python
},
                method="POST",
            )
            with urllib.request.urlopen(req, timeout=20) as resp:
                raw = json.loads(resp.read().decode("utf-8"))
            content = raw["choices"][0]["message"]["content"]

Tainted flow: 'req' from os.environ.get (line 440, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
98% confidence
Finding

When ai_model is enabled, the code packages column names and sampled cell values from uncertain DataFrame columns into a prompt and sends them to a third-party API with urllib.request.urlopen. In a data-cleaning/field-identification module, those samples can contain sensitive personal or financial data, so this creates a real confidentiality risk through outbound transmission of tainted data.

Content

Scanner excerpt · scripts/field_identifier.py (reported line 449)May include surrounding context.

python
},
                method="POST",
            )
            with urllib.request.urlopen(req, timeout=15) as resp:
                raw = json.loads(resp.read().decode("utf-8"))
            content = raw["choices"][0]["message"]["content"]

Tainted flow: 'req' from os.environ.get (line 224, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
92% confidence
Finding

The module sends an API key sourced from an environment variable to an external verification endpoint. While this is framed as subscription validation, it is still a tainted credential flow to the network and creates confidentiality and trust-boundary risk if the endpoint is unnecessary, compromised, or not clearly disclosed to users.

Content

Scanner excerpt · scripts/tier_limits.py (reported line 233)May include surrounding context.

python
},
            data=b"{}",
        )
        with urllib.request.urlopen(req, timeout=10) as resp:
            data = json.loads(resp.read().decode("utf-8"))
            if data.get("valid", False):
                result = {"valid": True, "tier": _prefix_to_tier(api_key)}

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README explicitly states that all processing happens locally, yet the documented configuration requires external AI provider API keys and the feature list includes AI classification/report generation. This creates a material transparency and privacy risk because users may input sensitive datasets under the false belief that no third-party transfer occurs.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code reads an API key from an environment variable and uses it to send sample dataset rows to an external AI service. In the context of a data-cleaning skill, this creates a strong risk of silent third-party data disclosure, including customer, financial, or other regulated information.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The AI-assisted path exports sample rows to a third-party API without any visible warning, disclosure, or runtime confirmation. For a data-cleaning skill, hidden outbound transmission materially increases privacy, confidentiality, and compliance risk because users may pass sensitive operational or personal datasets into the classifier.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill is marketed as a data cleaning tool for local handling, but the README also documents AI features backed by third-party services and Feishu-native output/sharing. In a skill that processes CRM/customer spreadsheets, this mismatch can cause users to expose personal or business data to external platforms without informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are generic terms like 'data cleaning' and 'Excel cleaning' that overlap with ordinary user requests. Broad invocation increases the chance the skill activates unintentionally on sensitive datasets, which is more dangerous here because the skill may perform AI-based processing or generate shareable outputs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The README describes generating reports that include sample values, field quality details, and instant sharing as a Feishu Doc, but it does not warn that these outputs may contain sensitive or personal data derived from the source files. This can lead to secondary disclosure even if the original dataset was handled carefully.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises capabilities consistent with environment-variable access, file writing, and network use, but the manifest does not declare any tool scope or permission boundaries. In a data-cleaning skill that can export files, write back to Feishu, and use external AI APIs, this omission makes it unclear what actions are authorized and increases the risk of over-privileged execution or silent data exfiltration.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger words are broad and map to common everyday spreadsheet and office tasks, making this skill likely to auto-activate in many ordinary conversations. Because the skill handles potentially sensitive business datasets and may perform networked AI processing or write-back, overbroad invocation raises the chance of unintended processing of private data without deliberate user selection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly promotes Feishu Bitable write-back and automatic report generation, but it does not clearly warn users that their uploaded data may be modified, exported, or transmitted to external systems. In the context of CRM, bank statements, rosters, and order data, this creates meaningful confidentiality and integrity risk because sensitive records could be changed or sent to third-party services without informed consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file hardcodes Chinese tag names and instructs the AI in Chinese to output business labels, with no mechanism for user language selection. This can violate language/locale policy because the skill imposes a specific language by default rather than offering opt-in or configurability.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module is primarily presented as a rule-based local classifier, but it also contains a code path that transmits dataset samples to an external AI provider. That mismatch can mislead users and integrators into processing sensitive data under incorrect assumptions about locality and data handling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The function reads DATA_CLEANER_API_KEY from the environment to authorize remote API access. While this is common, the file lacks a clear warning or user-facing note that the skill will consume environment-based credentials, which falls under sensitive environment variable access for code files.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The presence of a hardcoded external AI endpoint confirms that this classifier can send data off-host to a third-party service. In isolation, external communication is not always unsafe, but here it is security-relevant because the code packages dataset samples into the request body in a context where users may expect local-only processing.

Content

Scanner excerpt · scripts/classifier.py (reported line 359)May include surrounding context.

python
try:
            import urllib.request
            url = "https://api.minimax.chat/v1/text/chatcompletion_pro"
            payload = json.dumps({
                "model": "MiniMax-Text-01",
                "messages": [{"role": "user", "content": prompt}],

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The summary() method returns fixed Chinese-language status messages, which forces a specific language in user-visible output. There is no opt-in, locale selection, or justification that this skill is intended only for a Chinese-language environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The clean pipeline performs missing-value imputation, format normalization, and deduplication, which can change or remove records from the input dataset. While the code has technical docstrings, it does not include any explicit user-facing warning or confirmation about these potentially impactful transformations.

Content

No source excerpt is available for this finding.

Unbounded Output

Medium
Category
Output Handling
Confidence
80% confidence
Finding

Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.

Content

Scanner excerpt · scripts/cleaner.py (reported line 176)May include surrounding context.

python
ftype: FieldType,
        strategy: str,
    ) -> pd.Series:
        """Apply the appropriate fill logic to a single column."""
        blanks = series.astype(str).isin(["", "nan", "NaN", "None", "null", "NULL"])

        if strategy == "mean":

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

AI fallback sends column names and sample values externally without any user-facing warning at the point of use, even though those samples may include identifiers such as names, phones, ID cards, addresses, or bank accounts. In this skill context, silent exfiltration is more dangerous because the module is specifically designed to inspect potentially sensitive structured business/customer data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module description and core purpose suggest local field inference, but _fill_with_ai transmits sampled column values to external AI providers. That mismatch is security-relevant because callers may pass datasets containing PII under the assumption processing is local, causing unintended data disclosure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Hardcoded outbound capability to MiniMax and DeepSeek is not necessary for basic field identification and expands the attack and data-exposure surface of the skill. Because the module handles arbitrary tabular data, the unjustified egress path can leak sensitive samples to external services and may violate deployment policies.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The hardcoded MiniMax API endpoint evidences direct external transmission capability from a module that processes user datasets. In context, that is security-relevant because requests include sampled data content, creating a real risk of sensitive data disclosure to a third party.

Content

Scanner excerpt · scripts/field_identifier.py (reported line 429)May include surrounding context.

python
try:
        if model in ("deepseek", "minimax"):
            # Unified MiniMax/DeepSeek compatible API
            url = "https://api.minimax.chat/v1/text/chatcompletion_pro"
            if model == "deepseek":
                url = "https://api.deepseek.com/v1/chat/completions"

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The hardcoded DeepSeek API endpoint provides a second built-in path for transmitting sampled column data outside the local environment. Given this skill's data-cleaning purpose and likely exposure to PII, the external transmission path is a genuine confidentiality concern rather than a harmless implementation detail.

Content

Scanner excerpt · scripts/field_identifier.py (reported line 431)May include surrounding context.

python
# Unified MiniMax/DeepSeek compatible API
            url = "https://api.minimax.chat/v1/text/chatcompletion_pro"
            if model == "deepseek":
                url = "https://api.deepseek.com/v1/chat/completions"

            payload = json.dumps({
                "model": "MiniMax-Text-01" if model == "minimax" else "deepseek-chat",

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function of the skill is presented as local data cleaning, but this code can transmit cleaned data to Feishu Bitable via exporter.to_bitable(). That is a material expansion of scope because user-supplied datasets may contain sensitive information, and the transfer occurs inside the cleaning pipeline rather than in a clearly separated export-only workflow.

Content

No source excerpt is available for this finding.