Back to skill

Security audit

论文润色修改全流程SOP

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent local paper-review workflow, but its generated HTML reports can expose manuscript contents through under-disclosed browser/network and injection risks.

Install only if you are comfortable processing manuscripts locally and generating HTML reports that may include source excerpts. Avoid using it on confidential reviewer material or unpublished research unless you control the output location, do not host generated reports on a trusted web origin, and preferably disable or replace the CDN script and fix the HTML escaping issues first.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_enhanced_report.py:799
Finding

HTML and JavaScript Injection in the Enhanced Report Generator

Content
View full analysis
' for node in flow_analysis['flow_map']: flow_html += f'{node["dominant_type"][:3]}·P{node["idx"]}' flow_html += '→' flow_html = flow_html.rstrip('→') + '' gap_html = '' for g in flow_analysis['gaps']: gap_html += f'P{g["from_idx"]}→P{g["to_idx"]}{g["gap"]}{g["preview"]}' ``` ```python html = f""" 论文修改建议报告 · 增强版 · {html_mod.escape(paper_title[:40])} {CSS_V3}
▸ 论文润色修改建议报告 v3.0 · 三级交互增强版 ◂

{html_mod.escape(paper_title[:60])}

15维度全面诊断 · 三级交互 · 修改会话模式

📅 {now}📋 PR-{report_id}🏫 {journal_name}📏 {target_words}字
""" ``` Additional unescaped uses include: ```python

{journal_name}投稿要求逐项映射检查

``` ```python
PR-{report_id} · {now} · 目标期刊: {journal_name}
``` ### Technical Analysis The generator combines unt ...[truncated 2406 chars]
Remediation
View remediation
... ``` Parse the data once and attach handlers with `addEventListener`. 3. Avoid inline `onclick` attributes and dynamic `innerHTML`. Use `textContent`, `createElement`, and explicit DOM property assignment. 4. When embedding JSON inside a script element, escape characters that can terminate the element, particularly `<`, `>`, `&`, and the sequence ``. 5. Add a restrictive Content Security Policy, preferably disallowing inline script execution: ```html ``` 6. Add automated tests using payloads containing quotes, closing tags, event handlers, ``, and SVG markup. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_revision_report.py:860
Finding

HTML Injection Through the Journal Name in the Base Report Generator

Content
View full analysis
论文润色修改建议报告 · {html_mod.escape(paper_title[:50])} {CSS_STYLE}
▸ 论文润色修改建议报告 ◂

论文润色修改完善建议报告

{html_mod.escape(paper_title[:80])}
📅 {now} 📋 报告编号:PR-{report_id} 🏫 目标期刊:{journal_name} 📏 目标字数:{target_words}字(3版面)
""" ``` The value is also inserted into the footer without escaping: ```python
报告编号:PR-{report_id} · 生成时间:{now} · 目标期刊:{journal_name}
``` ### Technical Analysis The script correctly escapes the paper title but does not escape `journal_name`. The latter is supplied through the `--journal` argument and is embedded directly in HTML text. HTML metacharacters in the argument are therefore interpreted by the browser rather than displayed as text. This permits active markup and JavaScript event-handler injection into the generated report. ### Attack Path 1. An attacker controls or influences the journal-name input used by an automated report-generation workflow. 2. The journal name contains active HTML, such as an element with an error or load event. 3. The report generator inserts the value into the cover and footer without escaping. 4. A victim opens the generated HTML repo ...[truncated 583 chars]
Remediation
View remediation
`, `"`, `'`, `&`, closing tags, and event-handler payloads. ]]>

T08 · Insecure Dependencies

Note
Location
scripts/generate_enhanced_report.py:881
Finding

Third-Party JavaScript Is Loaded Without Subresource Integrity

Content
View full analysis
论文修改建议报告 · 增强版 · {html_mod.escape(paper_title[:40])} {CSS_V3} ``` Base generator: ```python 论文润色修改建议报告 · {html_mod.escape(paper_title[:50])} {CSS_STYLE} ``` ### Technical Analysis Both report generators cause the browser to download and execute JavaScript from a third-party CDN whenever a generated report is opened while online. Although the Chart.js version is pinned, the script element does not specify a Subresource Integrity hash. The browser therefore has no cryptographic mechanism to confirm that the returned file matches the artifact reviewed by the project author. This is not evidence that the current Chart.js file is malicious. It is a supply-chain weakness that permits the effective executable content of generated reports to change independently of the audited project. ### Attack Path 1. A report is generated normally. 2. The victim opens the report while connected to the network. 3. The browser requests Chart.js from `cdn.jsdelivr.net`. 4. If the CDN response, package artifact, DNS path, or trusted delivery infrastructure is compromised, a modified script is returned. 5. The browser executes the modified script with access to the report page. ### Impact Assessment A compromised dependency can execute arbitrary JavaScript in every opened report that loads the affected resource. It can read paper excerpts and analysis results, alte ...[truncated 221 chars]
Remediation
View remediation
``` 3. Verify the integrity hash against the exact pinned file during release and update it only through a reviewed dependency-update process. 4. Consider making chart rendering optional so sensitive reports can be viewed without any external network request. 5. Document the external dependency and monitor the pinned Chart.js release for security advisories. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

声明描述的是一个覆盖论文修改全流程的综合技能,核心能力应包括解析审稿意见、对论文进行修改/润色、生成批注并完成终审检查。而代码内容只是“Phase 1”诊断脚本,主要做文本读取、统计指标、规则匹配和风险判定,属于流程中的前置分析模块。虽然“论文全息诊断”“去AI味检查”“学术写作规范检查”的一小部分与声明有一定相关性,但整体能力范围明显小于声明,且缺失声明中的关键执行能力,因此描述不能准确代表该代码块的实际行为。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

文档称该维度会做“期刊合规矩阵(格式要求逐项映射)”,界面也显示“{journal_name}投稿要求逐项映射检查”。然而 analyze_journal_compliance 并未读取任何期刊规则源或依据期刊名切换标准,只是对标题、摘要、关键词、总字数做固定阈值检查,并将“无自我评价语言”“参考文献格式统一”“各部分结构完整”直接标为 pass,甚至将“有实证数据支撑”直接标为 fail。该注释/文案与实现形成明显背离。

Content

No source excerpt is available for this finding.

eval() call detected

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

Direct eval() call evaluates arbitrary expressions. This can be exploited to execute malicious code or exfiltrate data.

Content

Scanner excerpt · scripts/generate_enhanced_report.py (reported line 964)May include surrounding context.

python
<div class="chart-wrap"><canvas id="sentLenChart" height="200"></canvas></div>
    <h3>过渡断裂点</h3>
    <table><tr><th>#</th><th>位置</th><th>前后段落</th></tr>
    {''.join(f'<tr><td>{i}</td><td>P{tb["from_idx"]}→P{tb["to_idx"]}</td><td class="text-sm">"{html_mod.escape(tb["from_preview"])}" → "{html_mod.escape(tb["to_preview"])}"</td></tr>' for i, tb in enumerate(eval(repr([]))[:5], 1))}
    </table>
  </div>
</div>

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill directs the system to read and write files and invoke local scripts, but it does not declare an explicit tool scope such as allowed-tools or permissions. This creates a governance gap: an agent may be induced to access or modify local files beyond what a user clearly expected, especially because the workflow includes manuscript ingestion and document generation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description says the skill triggers when users need paper polishing, AI-tone removal, writing checks, or ask broad phrases like “帮我看看这篇论文能不能通过”. These conditions are expansive and lack negative examples or clear boundaries, so the skill could be invoked for many generic editing requests beyond the intended SOP workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill asks for full manuscripts, reviewer comments, screenshots, and PDFs, all of which may contain unpublished research, personal data, or confidential peer-review material, but it provides no privacy warning or minimization guidance. In this context, omission is more dangerous because academic manuscripts often contain sensitive intellectual property and reviewer correspondence that users may not realize they are broadly exposing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill states it will modify the original paper and generate a new .docx, including format-preserving edits via python-docx, without warning the user about file changes or output artifacts. In a document-processing context, silent write behavior is risky because it can overwrite expectations, create sensitive derivative files, or cause users to trust outputs they did not explicitly authorize.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The HTML document declares lang="zh-CN", which fixes the output to Simplified Chinese. Under the policy rules, a hardcoded language/locale is a natural-language policy issue unless the skill offers opt-in or clearly documents a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The document title and all checklist content are written exclusively in Chinese, and the requirements appear to govern the skill's review behavior without any indication that users may opt into another language. Under the policy, forcing a specific language without user choice or a clearly justified regional constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

模块顶层说明将新增维度10描述为“引用与参考文献分析 (时效性/格式/自引率)”,而报告页面又写成“时效性、格式一致性、自引率、文献类型分布检查”。但实际 analyze_references 仅统计引用编号、年份和格式混用情况,没有任何作者匹配、自引识别或文献类型分类逻辑,属于文档对实际能力的积极性夸大。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The report markup explicitly declares zh-CN and the surrounding interface text is entirely fixed in Chinese. Under the policy, forcing a specific language/locale without user opt-in is a natural-language policy violation unless the constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script embeds substantial portions of the source paper, including full paragraphs and excerpts, into a generated HTML file without warning the user that sensitive manuscript content is being copied into a new artifact. In an academic-review context, manuscripts may be unpublished or confidential, so this increases exposure risk through accidental sharing, syncing, backup, or hosting of the report.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The generated HTML hard-codes lang="zh-CN", indicating the report is produced in Simplified Chinese regardless of user preference. This is reinforced by the file-level description and all user-facing strings being Chinese, with no option to choose another language or locale.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The generated HTML unconditionally loads Chart.js from an external CDN (cdn.jsdelivr.net). Opening the local report will therefore trigger a network request that can leak metadata such as IP, access time, user agent, and possibly the report-opening workflow; it also introduces a supply-chain dependency where a compromised CDN response could execute attacker-controlled JavaScript in the report context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The manifest description and operational instructions are presented entirely in Chinese, implying a fixed language mode for interaction and outputs. Under the language/locale policy, a skill should not force a specific language unless it offers user choice or clearly justifies the constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language documentation and CLI usage text entirely in Chinese, and later emits fixed Chinese-language status/output strings. Under the language/locale policy, forcing a specific language without offering user choice or documenting a justified regional constraint is a policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

该技能的清单式修改辅助与报告交互是合理的,但此脚本不仅生成分析报告,还在前端通过 localStorage 持久保存活动标签、修改会话状态和终审清单状态。这类用户行为追踪/持久化能力超出了“论文润色分析”本身的核心描述,属于附加产品化行为而非明显必需的实现细节。

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/generate_enhanced_report.py:964