Back to skill

Security audit

JD智能解读

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly purpose-aligned, but its generated HTML report can execute injected browser code from malicious job-description content and it contradicts its own no-storage privacy claims.

Review before installing. Use it only on job descriptions and URLs you trust, avoid opening generated reports from untrusted postings until the renderer escapes content, and manually delete analysis.json and generated HTML reports if they contain private job-search or self-assessment 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_report.py:41
Finding

Stored HTML and JavaScript Injection in Generated Reports

Content
View full analysis
{i+1}{r}' for i, r in enumerate(responsibilities) ) hard_req_tags = "".join( f'{s}' for s in hard_skills_required ) hard_plus_tags = "".join( f'{s}' for s in hard_skills_plus ) soft_tags = "".join( f'{s}' for s in soft_skills ) ``` At lines 92-95, explicit and implicit requirement fields are interpolated without escaping: ```python rows += f""" {explicit} → {implicit} {render_signal_badge(strength)} """ ``` At lines 278-289, learning-roadmap fields are also rendered as raw HTML: ```python items_html = "".join(f"
  • {item}
  • " for item in p.get("items", [])) projects = p.get("projects", "") phase_cards += f"""
    第 {phase_num} 阶段 ⏱ {duration}

    {title}

      {items_html}
    {f'
    🛠 实战项目:{projects}
    ' if projects else ''}
    """ ``` At lines 310-318, ATS keywords and integration advice are rendered without escaping: ```python tags = "".join(f'{k}' for k in items) sections += f"""

    {cat}

    {tags}
    """ tips = "".join( f"
  • {t}
  • " for t in data.get("module_7_integration_tips", []) ) ...[truncated 3496 chars]
    Remediation
    View remediation
    str: return escape(str(value), quote=True) ``` Use `safe_text()` for all text inserted into HTML, SVG text, titles, labels, list items, table cells, and attributes. 2. Prefer a template engine with automatic escaping, such as Jinja2 with autoescaping enabled, rather than constructing the document with large f-strings. 3. Validate the complete JSON structure before rendering: - Require expected object, array, string, and numeric types. - Reject unexpected nested markup. - Enforce documented numeric ranges. - Limit field and collection lengths to prevent resource exhaustion. 4. If limited rich-text support is required, sanitize it with a strict allowlist. Do not allow scripts, event-handler attributes, active SVG elements, iframes, object elements, or dangerous URL schemes. 5. Add a restrictive Content Security Policy, preferably through an HTTP header when served or a compatible HTML meta policy: ```html ``` The existing inline script should be moved into a trusted external file or replaced with nonce/hash-based authorization so that `unsafe-inline` is not required for scripts. 6. Add regression tests that provide payloads in every schema string field and verify that the generated document contains encoded text such as `<` rather than executable markup. ]]>

    T09 · Insecure Skill Coding Practices

    Warning
    Location
    SKILL.md:186
    Finding

    Analysis Data Is Persisted Despite Explicit Non-Storage Claims

    Content
    View full analysis
    Remediation
    View remediation
    Vulnerability Patterns
    • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
    • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
    • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
    • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
    • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
    Findings (5)

    Vague Triggers

    Medium
    Category
    Not specified by scanner
    Confidence
    91% confidence
    Finding

    The trigger list includes broad, everyday phrases such as '岗位分析', '帮我分析这个职位', and English variants like 'analyze job', which can match normal conversation outside a deliberate skill invocation. This can cause unintended activation, leading the agent to fetch URLs, process uploaded content, or generate reports when the user did not explicitly request this skill.

    Content

    No source excerpt is available for this finding.

    Vague Triggers

    Medium
    Category
    Not specified by scanner
    Confidence
    88% confidence
    Finding

    The activation conditions are loosely defined, allowing the skill to trigger on general requests like '帮我分析这个职位' or '这个岗位到底要什么' without a strict requirement that a concrete JD be present. In context, this is more dangerous because the skill has WebFetch/WebSearch/Bash/Write capabilities and a workflow that may retrieve external content and generate files, increasing the blast radius of accidental invocation.

    Content

    No source excerpt is available for this finding.

    Natural-Language Policy Violations

    Medium
    Category
    Not specified by scanner
    Confidence
    96% confidence
    Finding

    Line L003 instructs the agent to generate the report content in Chinese ("生成报告前...") and the rest of the schema examples are also localized to Chinese. This creates a language/locale constraint in natural-language instructions without any user opt-in or stated regional justification, which matches the policy-violation category.

    Content

    No source excerpt is available for this finding.

    Context-Inappropriate Capability

    Medium
    Category
    Not specified by scanner
    Confidence
    98% confidence
    Finding

    The script interpolates untrusted JSON fields directly into HTML, SVG, and inline event-bearing DOM without escaping. Because the skill accepts arbitrary JD input and renders it into a browser-opened report, an attacker can place HTML/JavaScript payloads in fields like title, company, skills, questions, or benchmark text and trigger stored client-side script execution when the report is viewed.

    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 generates HTML with lang="zh-CN" and the surrounding UI text is entirely in Chinese, which forces a specific language/locale on users. The policy allows locale constraints only when the skill offers opt-in choice or clearly documents and justifies the restriction, neither of which appears in this file.

    Content

    No source excerpt is available for this finding.

    Static analysis

    No suspicious patterns detected.