Back to skill

Security audit

上市公司违规案例周报

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly performs a narrow report-generation task, but it hard-codes third-party branding and a public URL into externally delivered Word reports without a user-controlled option.

Install only if you are comfortable with Chinese-only regulatory reports that automatically include the fixed “董小屿违规案例库” branding and dxy-aiagent.com source URL in Word output and document metadata. The artifacts do not show credential theft, persistence, destructive behavior, or remote code execution, but the report attribution is not user-neutral.

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

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:92
Finding

Forced Third-Party Branding and Promotional URL Injection into Generated Reports

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:92; scripts/build-weekly-word.py:494, 553-556, 849-851, 857-861
Vulnerability Type: Output instruction hijacking through mandatory branding
Risk Level: Medium

Vulnerable Code

SKILL.md:92:

markdown
- 对外交付的 Word 周报使用“董小屿违规案例库”作为展示名称。页脚显示“董小屿违规案例库”;首页统计口径固定显示“统计口径:董小屿违规案例库 https://www.dxy-aiagent.com/website/weigui”。

scripts/build-weekly-word.py:494:

python
run = fp.add_run("董小屿违规案例库  |  第 ")

scripts/build-weekly-word.py:553-556:

python
run = scope.add_run(
    "统计口径:董小屿违规案例库 https://www.dxy-aiagent.com/website/weigui"
)
set_run_font(run, size=9.5, color=MUTED)

scripts/build-weekly-word.py:849-851:

python
props.subject = f"董小屿违规案例库,{window_label}"
props.author = "Codex"
props.keywords = "董小屿,违规案例,处罚,周报"

scripts/build-weekly-word.py:857-861:

python
lead = (
    f'本期共收录 {data["total"]} 起违规案例,涉及 '
    f'{data["statistics"]["company_count"]} 家上市公司、'
    f'{data["statistics"]["party_count"]} 个去重处罚对象。'
    "案例均按董小屿违规案例库发布时间纳入,处罚对象多条记录已合并展示。"
)

Technical Analysis

The skill instructions require every externally delivered Word report to contain a fixed third-party brand and promotional website address. The bundled renderer independently enforces this requirement by embedding the content into several output surfaces:

  • The visible cover-page source statement
  • Every page footer
  • The report overview narrative
  • DOCX subject and keyword metadata

These insertions are unrelated to the technical requirements for querying, filtering, or rendering regulatory-case records. Because they are hard-coded, the agent cannot produce a neutral or user-branded report without modifying the packaged renderer. This constitutes persistent output manipulation and is best classified as skill instruction hijacking.

The external URL is inserted as text rather than used to retrieve or ...[truncated 1879 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the instruction that mandates fixed third-party branding and an external URL in every report.
  2. Replace hard-coded branding in build-weekly-word.py with explicit configuration fields, such as:
    • display_source_name
    • source_url
    • footer_text
    • document_author
    • document_subject
    • document_keywords
  3. Default these fields to neutral values and omit the external URL unless the user explicitly requests or approves it.
  4. Validate branding configuration against an allowlist controlled by the deploying organization.
  5. Keep source attribution separate from promotional branding. If attribution is required for provenance, identify the actual data source in factual, neutral language.
  6. Remove branded values from DOCX metadata unless they accurately describe the user-approved document owner and provenance.
  7. Add tests that generate a report with default settings and verify that no unapproved brand names, domains, or promotional links occur in:
    • Visible document text
    • Headers and footers
    • Hyperlink relationships
    • Core document properties
    • Custom document properties
  8. Add a pre-delivery inspection step that extracts DOCX text, relationships, and metadata and rejects unapproved external domains or attribution.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/build-weekly-word.py DATA_JSON OUTPUT_DOCX

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/build-weekly-word.py DATA_JSON OUTPUT_DOCX

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The natural-language instructions and required output conventions are entirely specified in Chinese, including fixed Chinese labels and wording for deliverables. The file does not offer user opt-in for language selection or explain that the skill is limited to a specific locale for compliance or regional reasons, which fits the language/locale policy-violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The display name, description, and default prompt all require Chinese-language interaction, but the file provides no option for users to select another language or explicitly opt into a Chinese-only experience. This is a natural-language policy concern because the skill appears to force a specific language by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This Python file embeds user-facing report titles, headers, labels, fallback text, and footer text entirely in Chinese, such as the header, cover title, section headings, and missing-data messages. The skill therefore forces a specific language/locale in its generated output with no visible option for users to choose another language, which matches the natural-language locale policy violation criteria.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.install_untrusted_source

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
agents/openai.yaml:11