Back to skill

Security audit

AI合同智能审查助手

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Chinese contract-review assistant, but its generated reports can run unsafe contract content and load external JavaScript despite claiming local/offline use.

Review carefully before installing. Use it only for Chinese/PRC-law contract review, avoid submitting highly confidential or attacker-supplied contracts, and do not open generated HTML reports in a browser until the template escapes all dynamic content and removes or integrity-pins the CDN script. Delete generated reports when no longer needed.

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

T09 · Insecure Skill Coding Practices

Error
Location
assets/report_template.html:219
Finding

Stored Cross-Site Scripting in Generated Contract Reports

Content
View full analysis
0) { const lawHtml = laws.map(l => `
${l.law || ''} ${l.article || ''}
${l.content || ''}
`).join(''); document.getElementById('lawContainer').innerHTML = lawHtml; } else { document.getElementById('lawSection').style.display = 'none'; } ``` The same unsafe pattern is used for overview statistics, score labels, heatmap section names, risk titles and descriptions, original contract clauses, suggested clauses, negotiation strategies, and comparison fields. ### Technical Analysis The template does not apply contextual HTML escaping or sanitization before assigning dynamic data to `innerHTML`. If any populated field contains an element with an event handler, such as an image with an `o ...[truncated 2210 chars]
Remediation
View remediation
`, `&`, U+2028, and U+2029. - Ensure script-closing sequences cannot appear literally in generated data. - Prefer placing JSON in a non-executable data element and parsing its `textContent`. 4. Validate enumerated fields such as risk level, priority, grade, and CSS class suffixes against explicit allowlists. 5. Add a restrictive Content Security Policy. After removing inline scripts, use controls similar to: - `default-src 'none'` - `script-src 'self'` - `style-src 'self'` - `img-src 'self' data:` - `connect-src 'none'` - `object-src 'none'` - `base-uri 'none'` - `form-action 'none'` 6. Add regression tests using contract clauses containing HTML tags, event handlers, quotes, template syntax, and script-closing sequences. Verify that every payload is rendered as inert text. ]]>

T08 · Insecure Dependencies

Warning
Location
assets/report_template.html:7
Finding

Remote JavaScript Dependency Loaded Without Integrity Verification

Content
View full analysis
``` The script element does not include a Subresource Integrity hash, and the dependency is not bundled with the Skill. ### Technical Analysis Opening a generated report causes the browser to retrieve executable JavaScript from `cdn.jsdelivr.net`. Although the dependency version is pinned to `4.4.0`, the browser has no cryptographic integrity value against which to verify the downloaded response. If the hosted artifact or its delivery infrastructure is compromised, modified JavaScript can execute with the same page-level access as the report’s own scripts. This behavior also conflicts with the project’s claims that the Skill and its reports are completely local and usable offline. ### Attack Path 1. The Skill generates an HTML report containing the remote script element. 2. The user opens the report while connected to a network. 3. The browser requests the Chart.js asset from the CDN. 4. A compromised upstream artifact or delivery path returns altered JavaScript. 5. Because no integrity attribute is present, the browser accepts and executes the altered response. 6. The malicious script reads or changes report data and may initiate outbound requests. ### Impact Assessment A malicious dependency response would execute within the generated report and could: - Read contract metadata, risk findings, original clauses, and recommendations embedded in the page. - Alter scores, charts, findings, or legal guidance shown to the user. - Attempt to transmit report content to an external service. - Present deceptive user-interface content. The external request also discloses ordinary connection metadata, including the user’s IP addr ...[truncated 310 chars]
Remediation
View remediation
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 (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a full AI-powered contract auditing system with substantive legal/risk analysis and rich report generation. The supplied code only extracts raw text from txt/docx/pdf files and optionally classifies the contract type using keyword matching. This is a materially different primary purpose: parsing input rather than reviewing contracts. While text extraction could be a supporting component of such a system, this code chunk by itself does not implement the core declared capabilities, so the description does not accurately represent what the code actually does.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The README is entirely written in Chinese and describes a contract-review skill centered on Chinese legal references such as the Civil Code, but it does not explicitly state that the skill is intended only for Chinese-language or PRC-law contracts. This can function as an implicit language/locale constraint without user opt-in or clear justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases include very common language such as “帮我看看合同”, “合同审核”, and “contract review”, which can match ordinary user conversation and cause the skill to activate unintentionally. In an agent environment, overly broad activation can route sensitive legal text into this skill when the user did not explicitly intend to invoke it, increasing privacy, misrouting, and unsafe reliance risks.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Broad trigger phrases can cause the skill to activate in conversations where the user did not intend to submit a contract for processing. In this skill context, accidental activation is more dangerous because contract text is often highly sensitive, and the workflow includes reading files and producing saved reports that may persist confidential data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The condition 'user uploads or pastes contract text' is ambiguous and lacks guardrails about scope, consent, and what counts as processable input. In a contract-review skill with file, URL, and write capabilities, unclear activation boundaries increase the chance of unintended handling of sensitive legal documents and downstream persistence in generated artifacts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs users to provide contracts via paste, file upload, or URL but does not warn that contracts commonly contain confidential business terms, personal data, signatures, and other regulated information. This omission can lead users to disclose sensitive content without understanding the privacy implications of local processing, retrieval from URLs, or inclusion in generated outputs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow saves a full HTML report in the working directory, likely containing raw contract excerpts, risk findings, party details, and legal analysis, but does not warn users that a persistent file with sensitive data will be written. In this context, persistence materially increases exposure risk because local artifacts may be accessed by other tools, users, backups, or later sessions.

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 sets lang="zh-CN", and the template consistently formats dates and timestamps with toLocaleDateString('zh-CN') and toLocaleString('zh-CN'). This forces a specific language/locale experience without any visible opt-in or indication that the skill is intentionally limited to a China-specific audience.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The template loads Chart.js as executable JavaScript from a third-party CDN, which creates a supply-chain and integrity risk. If the CDN, dependency, or network path is compromised, arbitrary code would execute in the context of the generated report and could access sensitive contract contents rendered into the page.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file contains natural-language guidance only in Chinese and does not offer the user a language choice or explain that the checklist is intentionally limited to a Chinese-language audience. Under the policy rule for language or locale constraints, forcing a specific language without opt-in can be a policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file contains user-facing natural-language content exclusively in Chinese, beginning with the title and introductory description. Under the policy rule for language/locale, forcing a specific language without user opt-in can be a policy concern when no choice or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file contains only Chinese-language content and provides no indication that users may choose another language or locale. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The entire checklist is presented only in Chinese, and the file does not indicate that Chinese is optional, user-selected, or required for a region-specific compliance workflow. Under the policy rule for language/locale, a skill should not implicitly force a language without opt-in or clear justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown checklist forces a specific language for all users through its heading and item text. Under the policy, a skill should not impose a language or locale without user opt-in unless the constraint is clearly documented and justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file presents all instructions and checklist items only in Chinese, and there is no indication that the user can choose another language. Under the language/locale policy rule, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The document title and all checklist content are written entirely in Chinese, with no indication that other languages are supported or that Chinese is a region-specific requirement. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file presents all content in a single language and locale context, using Chinese throughout, without any note that the user can choose another language. Under the natural-language policy rule, forcing a specific language without opt-in can be a locale policy violation unless clearly justified.

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 user-facing natural-language strings in Chinese in the module docstring and CLI usage text, and the rest of the CLI help/output is likewise Chinese-only. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation when no locale choice or justification is provided.

Content

No source excerpt is available for this finding.