Back to skill

Security audit

金融营销合规助手

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it requests broad agent powers and can falsely label risky financial marketing content as compliant.

Review before installing. If used, run it with read-only project access and no general shell/write privileges, treat outputs as drafting aids rather than legal or regulatory approval, and manually review any generated financial marketing copy before publication.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (3)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:8
Finding

Skill Requests Unnecessary Command Execution and Write Permissions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:8
Vulnerability Type: Excessive tool permissions and violation of least privilege
Risk Level: Medium

Vulnerable Code

yaml
allowed-tools: [Bash, Read, Write, Exec]

Technical Analysis

The Skill declares unrestricted Bash, command-execution, file-read, and file-write capabilities. Its stated purpose is to review financial marketing material using bundled reference files and a local checker. General-purpose Bash, Exec, and Write privileges are broader than the documented workflow requires.

No instruction in the reviewed Skill currently uses these permissions maliciously. The risk arises because the excessive permissions enlarge the impact of any future prompt-injection flaw, compromised reference content, or unsafe modification to the Skill. If the hosting Agent grants the declared tools, attacker-controlled marketing text may be processed in a session that already has command-execution and filesystem-modification capabilities.

Attack Path

  1. The Skill is loaded and the host grants the tools listed in allowed-tools.
  2. An attacker supplies adversarial marketing content or another untrusted document for review.
  3. The content attempts to induce the Agent to invoke Bash, Exec, or Write rather than treating the content strictly as data.
  4. If instruction boundaries fail, the Agent can execute commands or modify files using permissions unrelated to compliance review.
  5. The resulting scope depends on the operating-system privileges and sandbox assigned to the Agent process.

Impact Assessment

This declaration does not itself prove arbitrary command execution, and no malicious command was found in the project. Nevertheless, successful exploitation of a separate instruction-injection weakness could provide:

  • Command execution with the privileges of the Agent process.
  • Modification of files writable by that process.
  • Access to local files readable by that process.
  • A ...[truncated 243 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove Bash, Exec, and Write unless a concrete workflow requires them.
  2. Prefer a read-only declaration limited to bundled project references.
  3. If local execution is necessary, expose only the specific checker entry point rather than a general shell.
  4. Run the checker in a sandbox with:
    • No network access.
    • A read-only project directory.
    • No access to credentials or user home directories.
    • A dedicated unprivileged operating-system account.
  5. Treat reviewed marketing material, linked content, and uploaded files strictly as untrusted data.
  6. Require explicit user confirmation before any operation that writes files or executes commands outside the checker.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/compliance-checker.py:192
Finding

Specialized Checks Append Findings Without Recalculating Compliance Status

Content
View full analysis

Vulnerability Details

File Location: scripts/compliance-checker.py:192-227 and scripts/compliance-checker.py:404-428
Vulnerability Type: Stale security decision after mutation of compliance findings
Risk Level: High

Vulnerable Code

python
def check_marketing_plan(plan: str, channel: str = "", product_type: str = "") -> dict:
    """
    审查营销方案合规性

    Args:
        plan: 营销方案文本
        channel: 营销渠道
        product_type: 金融产品类型

    Returns:
        审查结果字典
    """
    result = check_content(plan, product_type)

    # 渠道合规性检查(第十六条)
    if channel in ["公众号", "直播", "短视频"]:
        if "自营平台" not in plan and "金融机构" not in plan:
            result["warnings"].append({
                "rule": "第十六条",
                "description": "渠道合规性",
                "details": f"通过{channel}营销需在金融机构自营平台或合法开设的账号进行",
                "severity": "中"
            })
            result["suggestions"].append(f"确保通过{channel}营销在金融机构自营平台进行")

    # 跳转链接检查(第五条)
    if "链接" in plan or "url" in plan.lower():
        if "自营平台" not in plan:
            result["warnings"].append({
                "rule": "第五条",
                "description": "跳转至非自营平台",
                "details": "购买链接需跳转至金融机构自营平台",
                "severity": "中"
            })
            result["suggestions"].append("购买链接需跳转至金融机构自营平台")

    return result
python
def check_industry_content(content: str, industry: str) -> dict:
    """
    分行业合规检查

    Args:
        content: 营销内容文本
        industry: 行业类型(fund/securities/insurance/bank)

    Returns:
        审查结果字典
    """
    result = check_content(content)

    # 行业专属检查
    if industry in INDUSTRY_KEYWORDS:
        found_keywords = [word for word in INDUSTRY_KEYWORDS[industry] if word in content]
        if found_keywords:
            result["violations"].append({
                "rule": f"行业专属规则({industry})",
                "description": "使用行业禁止用语",
                "details": f"发现行业禁止用语:{', '.join(found_keywords)}",
                "severi
...[truncated 2773 chars]
Remediation
View remediation

Remediation Suggestions

  1. Move status calculation into a dedicated finalization function that runs after every generic and specialized rule:
    python
    def finalize_result(result):
        if result["violations"]:
            result["compliance_status"] = "violation"
            result["risk_level"] = "high"
        elif result["warnings"]:
            result["compliance_status"] = "changes required"
            result["risk_level"] = "medium"
        else:
            result["compliance_status"] = "compliant"
            result["risk_level"] = "low"
        return result
    
  2. Call the finalizer immediately before returning from every public checking function.
  3. Derive risk from the maximum severity of all findings rather than only the presence of an array entry.
  4. Avoid storing mutable status fields when they can be calculated from the final findings at report time.
  5. Add invariant checks preventing:
    • A compliant status when warnings or violations exist.
    • A low-risk result containing medium- or high-severity findings.
    • A non-violation status when any violation exists.
  6. Add regression tests for channel-only warnings and industry-only violations.
  7. Either expose and test the documented industry CLI command or remove that unsupported command from the README.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/compliance-checker.py:231
Finding

Marketing Plan Generator Echoes Unvalidated Prohibited Claims While Certifying Compliance

Content
View full analysis

Vulnerability Details

File Location: scripts/compliance-checker.py:231-264
Vulnerability Type: Unvalidated content propagation and false compliance assurance
Risk Level: High

Vulnerable Code

python
def generate_marketing_plan(product_type: str, target_audience: str, channel: str, selling_points: str) -> dict:
    """
    生成合规营销方案

    Args:
        product_type: 金融产品类型
        target_audience: 目标人群
        channel: 营销渠道
        selling_points: 核心卖点

    Returns:
        营销方案字典
    """
    plan = {
        "product_type": product_type,
        "target_audience": target_audience,
        "channel": channel,
        "selling_points": selling_points,
        "compliance_tips": [
            "✅ 未使用诱导性用语",
            "✅ 未承诺收益",
            "✅ 补充风险提示",
            "✅ 使用涉金融属性字样具有相应资质"
        ],
        "risk_points": [
            "⚠️ 确保营销内容真实准确",
            "⚠️ 确保关键信息完整",
            "⚠️ 确保渠道合规"
        ],
        "suggestions": [
            "补充产品风险提示",
            "确保营销人员具备相关资格",
            "确保跳转至金融机构自营平台"
        ]
    }

    return plan

Technical Analysis

The function copies selling_points directly from untrusted command-line input into the generated plan. It performs no call to check_content(), no keyword validation, no contextual review, and no rejection or sanitization.

At the same time, it always emits fixed assertions claiming that the generated material contains no inducement language and makes no return promise. These assurances are unrelated to the actual input. An input containing a guaranteed-return statement, principal-protection promise, or other prohibited wording is therefore reproduced unchanged next to a contradictory compliance certification.

The same design also makes fixed claims about the presence of risk disclosures and appropriate qualifications without verifying either condition.

Attack Path

  1. Invoke the generate command.
  2. Set --selling-points to prohibited or misleading financial ma ...[truncated 1239 chars]
Remediation
View remediation

Remediation Suggestions

  1. Validate every user-controlled field before constructing the plan, especially selling_points.
  2. Run the complete generic, product-specific, channel-specific, and industry-specific rule set against the assembled output.
  3. Derive compliance statements exclusively from actual findings; never emit unconditional certification text.
  4. Reject generation when high-severity violations remain, or return a clearly marked draft requiring correction.
  5. Replace prohibited expressions only when a legally reviewed rewrite is available; otherwise identify the exact expression and request user revision.
  6. Verify the presence and applicability of risk disclosures rather than asserting that they exist.
  7. Do not claim that the marketer has appropriate qualifications or uses an authorized platform without explicit, validated input.
  8. Add tests using prohibited selling points and assert that:
    • The output is not labeled compliant.
    • Violations are listed.
    • Contradictory assurances are absent.
  9. Clearly distinguish generated drafting assistance from formal legal or regulatory approval.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • 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 (15)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/compliance-checker.py (reported line 102)May include surrounding context.

python
"S04: 场外衍生品"
        ]
    
    return rules


def check_content(content: str, product_type: str = "") -> dict:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill description and all user-facing instructions are entirely in Chinese, with no indication that other languages are supported or that the user may choose a preferred language. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description uses broad keyword triggers such as '金融营销', '合规审查', and '违规判断', which can match many general conversations and cause the skill to activate outside its intended narrow use case. Over-broad routing increases the chance that unrelated user data is pulled into this skill, leading to incorrect authority assumptions, unintended tool availability, or policy bypass through misclassification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest grants Bash and Exec to a skill whose documented purpose is compliance review and text generation, and the skill content does not justify arbitrary command execution. Unnecessary execution-capable tools expand the attack surface: a prompt-injected user document, linked content, or future script reference could cause file access, command execution, or data exfiltration beyond what a compliance-review skill needs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The entire skill is written to operate in Chinese and all triggers, examples, and outputs assume Chinese-language interaction, but there is no opt-in or statement that the skill is limited to Chinese-speaking users or China-specific workflows. Under the policy, forcing a specific language without user choice is a natural-language policy concern unless clearly justified and documented.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrase '制定营销方案' is generic and can overlap with ordinary marketing-planning requests unrelated to regulated financial products. This can route non-financial or non-compliance tasks into a high-authority skill, increasing the chance of inappropriate tool access or misleading regulatory framing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The document title and all instructional content are written exclusively in Chinese, which can constitute a language/locale policy constraint when no user opt-in or alternative language option is provided. Nothing in the file explains that the skill is intentionally limited to a Chinese-speaking or China-compliance-only audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file consists solely of Chinese-language headings, rules, and notes, with no indication that the user may choose another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code presents its primary description and later all command help/output strings only in Chinese, which imposes a specific language on users without any opt-in or fallback. The file does not document that the skill is intentionally limited to Chinese-speaking or China-specific operators, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function is presented as generating a compliant marketing plan, but it only returns a static checklist-like template and never evaluates the supplied product type, audience, channel, or selling points against the compliance rules. In a finance compliance skill, this can mislead users into trusting output as regulatorily safe when no real compliance analysis has occurred, creating a dangerous false sense of assurance.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The docstring and CLI help text claim the command generates a compliant marketing plan, but the implementation neither generates actual marketing copy nor performs compliance checking. This is a security-relevant integrity issue because users may operationalize the output in regulated financial marketing contexts under the mistaken belief that it has been vetted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The argparse descriptions, subcommand help, argument help text, and generated reports are all hard-coded in Chinese, requiring Chinese-language interaction regardless of user preference. There is no option to select another language or any explicit justification for this locale restriction within the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown template is entirely written in Chinese, including the title, section headers, field labels, and footer, which implies the skill will generate reports only in that language. The provided file does not mention any user language selection or that the locale is intentionally limited to a China-specific or Chinese-speaking context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The entire document is written in Chinese and provides no indication that users may choose another language or that the Chinese-only presentation is a documented, region-specific requirement. Under the stated policy, language constraints should be opt-in or clearly justified when a skill enforces a specific language/locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown template library presents all instructions and disclaimer text only in Chinese, and there is no natural-language indication that the skill is limited to Chinese-speaking users or a China-specific deployment context. Under the language/locale policy, forcing a single language without opt-in or documented justification can be a policy concern.

Content

No source excerpt is available for this finding.