Back to skill

Security audit

简历-JD 5维度匹配度评分引擎

Security checks for vulnerabilities and agentic risk

Overview

This resume scoring skill mostly matches its stated purpose, but its generated HTML report can execute injected content and its optional web lookup is under-scoped for sensitive resume data.

Review before installing. Use this only with trusted resume/JD inputs, avoid opening generated HTML reports from untrusted or externally modified score JSON until HTML escaping/CSP is fixed, and do not allow web search/fetch unless you are comfortable with the job-query data being sent externally. Treat generated report files as sensitive because they can contain personal career information.

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

Error
Location
scripts/generate_report.py:472
Finding

Stored HTML and JavaScript Injection in Generated Reports

Content
View full analysis
简历-JD 匹配度评分报告 | {candidate} → {target_job} ``` JSON-derived report values are also inserted into generated markup without escaping: ```python def generate_score_hero(result: dict) -> str: """生成总分Hero区域HTML""" total = result["total_score"] grade = result["grade"] grade_text = result["grade_text"] oneliner = result["oneliner"] # 颜色映射 if grade == "A": color = "#16a34a" elif grade == "B": color = "#2563eb" elif grade == "C": color = "#ca8a04" else: color = "#dc2626" # 圆环角度 angle = total / 100 * 360 return f'''
{total}
/ 100
匹配评级:{grade} 级 — {grade_text}
{oneliner}
''' ``` Keyword evidence is similarly interpolated directly: ```python rows.append(f''' {i} {kw["keyword"]} {kw["category"]} {weight_label} {badge} {evidence} ''') ``` Recommendation cont ...[truncated 5225 chars]
Remediation
View remediation
``` The report currently requires no JavaScript, so `script-src 'none'` is appropriate. 7. Add regression tests using payloads in every rendered field, including: ```html "><svg onload=alert(1)> ``` Tests should verify that the output contains encoded text such as `<script>` and no executable attacker ...[truncated 27 chars]
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 (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

整体来看,该代码的核心目的与声明高度一致:都是做简历-JD匹配、关键词提取、5维度评分、给出总分/评级/建议,并且还实现了跨岗位对比。评分维度权重也与声明一致(30/25/20/15/10)。不过,声明中一个重要输出承诺是“生成交互式HTML报告”,而代码完全没有HTML生成逻辑,只会将结果写入JSON文件并打印控制台摘要。这属于对输出形态的实质性不一致。其余如教育、学术产出、角色分析等属于实现评分所需的内部能力,不构成额外越权能力。故应判定为存在描述与行为不匹配,主要差异在输出格式/呈现方式。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger list contains generic phrases such as "简历评分", "简历打分", "简历评估", "岗位匹配", and English phrases like "resume match" that can overlap with ordinary discussion about resumes rather than a clear request to invoke this specific skill. The file does not provide exclusion conditions or negative examples to narrow when these phrases should or should not activate the skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill contemplates web search/fetch for JD retrieval but does not provide a privacy warning despite handling sensitive resume data. In context, users may assume all processing is local; if resume details, target companies, or inferred profile information are sent or used in remote lookups, that can expose personal or career-sensitive information to external services.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill writes generated reports to local files without clearly warning the user. Because resumes and JD analyses can contain personal data, silently persisting HTML/Markdown reports creates a confidentiality risk through leftover artifacts, broader filesystem exposure, or later unintended sharing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file title and all substantive guidance are written in Chinese, with no indication that users may choose another language or that the locale restriction is required for a region-specific purpose. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The hard-skills formula adds a separate critical bonus on top of a base score scaled to 30, so the documented calculation can exceed the stated 30-point cap. In a resume-screening skill, this creates inconsistent and potentially unfair scoring, and downstream code may implement the flawed formula literally, producing inflated totals and misleading rankings.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The academic-output subsection lists multiple additive subitems whose summed values can exceed the declared 20-point maximum for the dimension. This ambiguity can lead to non-deterministic implementations, score inflation, and biased candidate evaluation depending on how different components choose to interpret the rubric.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring and all user-facing descriptions are written exclusively in Chinese, and the generated HTML explicitly sets lang="zh-CN". There is no indication that the skill is region-specific or that users can opt into another language, which creates 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
98% confidence
Finding

The manifest says the skill will generate an interactive HTML report with tables and detailed presentation, but the file docstring and implementation only produce JSON output plus a few console print lines. No HTML rendering, templating, or report file generation appears anywhere in the code path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file-level docstring presents the tool description, usage, and output contract entirely in Chinese, signaling that the skill is designed around a fixed language/locale rather than offering a user choice. Under the policy for natural-language issues, forcing a specific language without opt-in is a locale-policy concern when no alternative or justification is documented.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Natural-language instructions, examples, and outputs are consistently presented in Chinese, with no indication that users may choose another language. This can constitute a language/locale policy issue when the skill implicitly forces one language without documented opt-in or region-specific justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest grants WebSearch/WebFetch even though the core task is local resume/JD scoring, expanding the attack surface beyond least privilege. In this context, the skill may process highly sensitive resume content, so unnecessary network-capable tools increase the risk of accidental disclosure, prompt-induced browsing with embedded personal data, or fetching untrusted JD content that influences downstream processing.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest centers on extracting keywords, cross-matching, five-dimension scoring, and reporting, with cross-role comparison mentioned only as an output item. This code goes further by heuristically inferring fit for several alternative jobs using hard-coded role scoring models, which is a distinct recommendation capability rather than a straightforward presentation of the requested five-dimension score.

Content

No source excerpt is available for this finding.