Back to skill

Security audit

企业查询助手(免费版)

Security checks for vulnerabilities and agentic risk

Overview

This skill is a company lookup helper, but it asks the agent to run an unbundled local script and has scope mismatches that require careful review before installation.

Install only if you can verify and control the actual scripts/tool.mjs that will be executed. Treat company names, person names, and entids as data sent to an external enterprise-query service, avoid using sensitive private API keys in broad agent environments, and limit this skill to explicit company lookup tasks.

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:171
Finding

Execution of an Unbundled Working-Directory-Relative Script

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 171-188; references/detail.md, lines 102-147
Vulnerability Type: Untrusted executable path resolution
Risk Level: Medium

Vulnerable Code

From SKILL.md, lines 171-188:

bash
node scripts/tool.mjs discover "Enterprise basic information"

node scripts/tool.mjs call biz_fuzzy_search --params '{"key":"Tencent"}'

node scripts/tool.mjs call biz_shareholders --params '{"entid":"AerjZTfkSh0"}'
bash
node --version
node scripts/tool.mjs discover "Enterprise"

node scripts/tool.mjs call biz_fuzzy_search --params '{"key":"Alibaba"}' > search_result.json
ENTID=$(cat search_result.json | python3 -c "import json,sys; print(json.load(sys.stdin)['data'][0]['entid'])")
echo "Enterprise ID: $ENTID"

node scripts/tool.mjs call biz_basic_info --params "{\"entid\":\"$ENTID\"}"
node scripts/tool.mjs call biz_shareholders --params "{\"entid\":\"$ENTID\"}"

From references/detail.md, lines 102-147:

python
def __init__(self, script_path="scripts/tool.mjs"):
    self.script_path = script_path
    self.runtime = self._detect_runtime()

def discover_tools(self, keyword):
    """Discover available tools"""
    cmd = [self.runtime, self.script_path, "discover", keyword]
    result = subprocess.run(
        cmd, capture_output=True, text=True, timeout=30, encoding="utf-8"
    )
    if result.returncode == 0:
        return result.stdout
    return f"Query failed: {result.stderr}"

def fuzzy_search(self, company_name):
    """Perform a fuzzy enterprise search"""
    cmd = [
        self.runtime, self.script_path, "call", "biz_fuzzy_search",
        "--params", json.dumps({"key": company_name}, ensure_ascii=False)
    ]
    result = subprocess.run(
        cmd, capture_output=True, text=True, timeout=30, encoding="utf-8"
    )
    if result.returncode == 0:
        try:
            return json.loads(result.stdout)
        except json.JSONDecodeError:
            return result.stdout
    return {
...[truncated 2703 chars]
Remediation
View remediation

Remediation Suggestions

  1. Bundle the actual scripts/tool.mjs implementation inside the Skill package so that its complete behavior can be audited.
  2. Resolve the script path relative to the Skill's trusted installation directory rather than the current working directory.
  3. Canonicalize the path and verify that it remains within the expected package directory before invoking Node.js.
  4. Fail closed if the bundled script is absent; do not search for or execute an ambient file with the same relative path.
  5. Verify the script against a pinned cryptographic digest or signed manifest before execution.
  6. Check that the script and its parent directories are not writable by untrusted users.
  7. Run the script in a least-privilege sandbox with restricted filesystem, environment-variable, and network access.
  8. Pass only the environment variables required for company queries rather than inheriting the entire Agent environment.
  9. Align the Skill metadata: allowed-tools declares read and exec, while the separate tools list also declares write. Remove permissions that are not necessary.
  10. Add tests that launch the Skill from an unrelated working directory and confirm that only the package-owned script can be executed.
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 Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Vague Triggers

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation text includes broad phrases like SEO optimization, keyword analysis, ranking improvement, and search traffic optimization, which are unrelated to a company-search tool's core function. Overbroad triggers can cause the agent to select this skill in inappropriate contexts, granting exec/read/write and third-party query behavior where it is not needed.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document says the free edition does not support risk screening, yet later enumerates risk-related endpoints such as executed person, dishonesty, business anomaly, and administrative penalty. Contradictory capability boundaries are dangerous because they can mislead users and agents into accessing more sensitive compliance/risk data than expected, undermining consent and policy controls.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill's declared purpose is company-information lookup, but the manifest and documentation broaden activation to SEO optimization and later to generic automation/file-processing. This mismatch can cause over-invocation in unrelated contexts and justify use of exec/read/write outside the narrow business-query scope, increasing the chance of unnecessary command execution and data handling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description explicitly says '支持中文交互', and the content consistently frames the skill as Chinese-language interaction without presenting language choice or opt-in. Under the language/locale policy, forcing a specific language is a violation unless the constraint is explicitly justified as region-specific or optional.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill advertises a built-in shared API key and 'no configuration required' usage, but does not clearly warn that user queries will be sent to a third-party service under shared credentials. This creates privacy and accountability risks, especially for sensitive company, partner, or person-related background checks.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The documentation positions the free version as limited to single-dimension lookups and explicitly says enterprise due-diligence reports are not supported. Yet it then states the capability supports '创建/查询/导出操作', introducing an export-oriented workflow that goes beyond the previously described lookup-only scope and conflicts with the free-version limitations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The FAQ says entid should not be shown to users, but the quick-start example explicitly prints it. Even if entid is an internal identifier, exposing internal lookup IDs encourages downstream leakage, logging, and reuse of implementation-specific identifiers that the documentation itself classifies as non-user-facing.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is nominally for company search, but the documented capabilities expand to generic file read/write, API integration, and command execution. In a skill already granted exec/read/write, this broader framing increases the attack surface by normalizing unrelated filesystem and shell activity beyond the minimum needed for company queries.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill metadata claims SEO/keyword-ranking and search-traffic optimization use cases, but the documented code only performs enterprise-information lookups. This scope mismatch is risky because it can mislead users and orchestrators into invoking a company-data access tool in unrelated workflows, increasing the chance of inappropriate data use and unsafe delegation decisions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The markdown examples perform subprocess execution and external company-data queries without clearly warning users that local commands will run and remote lookups will occur. This lack of transparency can cause unintended execution, privacy issues, or policy violations when readers copy the example into automated or production environments.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The example code launches a local Node.js subprocess to execute an external script, which expands the skill's capabilities beyond simple company lookup into local code execution. In an agent setting, this is dangerous because it can enable execution of modified or untrusted local scripts, create hidden environmental dependencies, and bypass expectations established by the manifest.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. The visible headings, descriptions, docstrings, and output strings are all in Chinese, with no indication that users may choose another language or that the skill is intentionally restricted to a Chinese-language audience.

Content

No source excerpt is available for this finding.