Back to skill

Security audit

数安云智数据分类分级

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-built for data classification, but it can send sensitive sample data and bearer credentials over insecure or weakly controlled API settings.

Review before installing. Use this only with a trusted local service or an HTTPS endpoint you control, set a unique SHUYAN_API_KEY, and avoid sending real PII, financial data, production samples, or regulated records unless your data-handling policy allows it. Treat batch JSON files as uploaded content, and do not rely on the default sk-secret-key credential.

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

T09 · Insecure Skill Coding Practices

Error
Location
shuyan_classify.py:21
Finding

Bearer Credential and Sensitive Classification Data Can Be Transmitted over Plaintext HTTP

Content
View full analysis
Dict[str, str]: return { "Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json" } def classify_batch( self, items: List[Dict[str, Any]] ) -> Dict[str, Any]: """Batch classification""" response = requests.post( self.endpoint, headers=self._headers(), json=items, timeout=120 ) response.raise_for_status() return response.json() ``` The shell implementation has the same behavior: ```bash API_KEY="${SHUYAN_API_KEY:-sk-secret-key}" API_URL="${SHUYAN_API_URL:-http://localhost:8080}" ENDPOINT="/api/llm_infer_zh_and_cls_and_type_v2_batchdata_sync" curl -s -X POST "${API_URL}${ENDPOINT}" \ -H "Authorization: Bearer ${API_KEY}" \ -H "Content-Type: application/json" \ -d @"$JSON_FILE" ``` ### Technical Analysis Submitting field information to a classification service is necessary for the Skill's declared functionality. The network operation is documented and is not covert exfiltration. However, the implementation permits any caller-controlled `SHUYAN_API_URL` and does not enforce TLS for non-loopback destinati ...[truncated 1802 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
shuyan_classify.py:21
Finding

Predictable Hard-Coded Fallback API Credential

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
shuyan_classify.py:5
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
shuyan-classify.sh:18
Finding

JSON Injection through Unescaped Shell Arguments

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill demonstrates network, shell, environment-variable, and configuration-file usage but does not declare any explicit tool scope or permissions boundary. This increases the chance that an agent can invoke broader capabilities than users expect, especially when combined with examples that send structured data and bearer tokens to an API.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is specifically designed to transmit field names, comments, and sample values that may contain sensitive or regulated data, yet the documentation does not clearly warn about privacy, data minimization, retention, or transmission risk. The context makes this more dangerous because the stated purpose is classification of potentially sensitive datasets, so users are likely to send real production metadata and sample records.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

The skill instructs users to POST dataset metadata and sample values to an HTTP endpoint using a bearer token. Because the documented transport is plain HTTP rather than HTTPS, sensitive content and credentials could be exposed via interception, and the payload itself may contain regulated personal data.

Content

Scanner excerpt · SKILL.md (reported line 94)May include surrounding context.

md
API_KEY="${SHUYAN_API_KEY:-your-api-key-here}"
API_URL="${SHUYAN_API_URL:-http://localhost:8080}"

curl -s -X POST "${API_URL}/api/llm_infer_zh_and_cls_and_type_v2_batchdata_sync" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '[

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The examples include realistic personal and financial data such as names, ID numbers, phone numbers, and bank-account-related fields without stating that they are synthetic or should be sanitized. This normalizes unsafe handling of sensitive data and may lead operators to paste real PII or financial records into requests and logs.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This example again sends potentially sensitive classification inputs to a plain-HTTP external endpoint with bearer-token authentication. In this skill's context, even a localhost default is risky because users may change the URL to remote services and follow the insecure example, propagating unsafe transport of sensitive metadata and secrets.

Content

Scanner excerpt · SKILL.md (reported line 206)May include surrounding context.

示例1:用户信息表分类

bash
curl -s -X POST "http://localhost:8080/api/llm_infer_zh_and_cls_and_type_v2_batchdata_sync" \
  -H "Authorization: Bearer your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '[

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The script defaults to using an insecure HTTP endpoint and transmits both the bearer API key and potentially sensitive field metadata over the network. If the endpoint is remote or traffic leaves the host, an attacker on the network path could intercept credentials and data or tamper with responses; the skill context increases risk because the payloads are specifically data-classification inputs that may contain sensitive schema details.

Content

Scanner excerpt · shuyan-classify.sh (reported line 34)May include surrounding context.

sh
]
EOF
)
    curl -s -X POST "${API_URL}${ENDPOINT}" \
      -H "Authorization: Bearer ${API_KEY}" \
      -H "Content-Type: application/json" \
      -d "$DATA"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script posts user-provided classification data to a remote API and includes an Authorization bearer token, but these network transmissions are not disclosed by a confirmation prompt, comment, or user-facing warning near the operation. Because the payload may contain sensitive field names and descriptions, users are not clearly warned that their data will be sent over the network.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The classify-batch command sends the full contents of the specified JSON file to the API, but the script does not warn that local file data will be transmitted externally. The help text describes batch classification but omits any disclosure about uploading file contents to a server.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The single-field classification command sends user-supplied column names and comments directly to a configured API without an explicit disclosure at execution time. Because these inputs can encode sensitive business, personal, or regulated metadata, silent transmission increases the risk of accidental data leakage, especially when SHUYAN_API_URL is pointed at a non-local or untrusted endpoint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The batch command reads arbitrary JSON from a local file and transmits it to a remote API endpoint without any explicit warning, confirmation, or guardrails. In this skill's context, the payload is likely to contain schema metadata and potentially sensitive field descriptions, so users may unintentionally exfiltrate internal or regulated data to an external service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

User-facing descriptions, help text, and messages in this file are presented exclusively in Chinese, which can amount to forcing a specific language without user opt-in. The file does not provide an alternative locale, selection mechanism, or documentation that the tool is intentionally region-specific.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The cmd_health function is documented as a health check command, but it instantiates ShucanClassifier, a different/undefined class, instead of the implemented ShuyanClassifier. This means the documented intent of performing a service health check is contradicted by code that will fail before making the check.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.