Back to skill

Security audit

Legal Assistant

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Chinese legal-workflow skill that handles sensitive contracts and ledger records, with disclosed permission checks, human review, audit logging, and no hidden executable behavior.

Before installing, confirm this is intended for a Chinese-language legal operations workspace. Configure Feishu/Hermes permissions, ledger-write authorization, reminder creation, audit-log access, archive location, and retention rules before production use, and keep human legal review for final opinions, external replies, high-risk clauses, and approvals.

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
Vulnerability Patterns
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (17)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · employee.yaml (reported line 107)May include surrounding context.

yaml
- L05_revision_suggestion
- L06_legal_qa
- L07_approval_opinion
- L08_contract_ledger_update
skill_catalog: skills/legal_skills.yaml
approval_policy:
  requires_human_confirmation:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description is entirely presented as a Chinese-only legal assistant, with no indication that users may choose another language or locale. Under the policy rule for language/locale constraints, this reads as a forced language setting rather than an optional or justified regional mode.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description is written as a Chinese-only role definition and the document specifies Chinese default output labels and workflow language throughout, but does not mention any user language preference or opt-in. Under the policy, forcing a specific language without offering a choice can be a natural-language locale violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly states it will automatically extract data into a contract ledger and generate expiration, renewal, and milestone reminder tasks after pre-review or workflow progression, but it does not clearly require explicit user confirmation immediately before modifying records or creating tasks. In a legal workflow, silent or assumed writes can create unauthorized records, inaccurate reminders, or downstream business actions based on incomplete review state.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The markdown mandates a fixed default output structure using Chinese section headers and does not provide an option to adapt to the user's language. This can violate language/locale policy when users are not given a choice or clear justification for the restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file presents all user-facing instructions and examples entirely in Chinese, including the invocation example and workflow description. Under the policy rules, forcing a specific language without offering a language/locale choice or documenting a justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The scenarios are defined with very broad business contexts such as contract intake, legal Q&A, approval, and ledger maintenance, but the file does not specify strong trigger constraints, input validation boundaries, or explicit exclusion conditions. In a Feishu-facing legal assistant that handles sensitive documents and can invoke multiple downstream skills, this increases the chance of misrouting requests, overbroad execution, or unauthorized use of powerful workflows in the wrong context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The document title and all operational instructions are written only in Chinese, which suggests the skill documentation is tied to a single language. The file does not mention any user language choice, opt-in, or justification for a Chinese-only locale, which may violate the language/locale policy for skills intended for broader use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest presents all user-facing skill names and purpose descriptions exclusively in Chinese, with no indication that users can choose another language or that the skill is limited to a Chinese-speaking/legal locale. This can violate language/locale policy where user-facing skills should not force a language without opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire system prompt is written as mandatory Chinese operating instructions and does not indicate that users may choose another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The markdown template is titled entirely in Chinese, which indicates the skill/template is oriented to a single language without any visible user opt-in or explanation that it is region-specific. Under the policy criteria, forcing a specific language can be a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file's heading and section labels are entirely in Chinese, which imposes a specific language on users. Under the policy, language constraints should either offer user opt-in/choice or be clearly documented as justified for a region-specific use case; neither is present in this file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The workflow explicitly handles contract messages, attachments, structured extraction, knowledge retrieval, and logging/archiving, but it provides no visible notice about sensitive-data handling, retention, or log scope. In a legal-assistant context, contracts commonly contain confidential business terms and personal data, so silent logging or retention can create privacy, confidentiality, and compliance exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The contract-ledger workflow states it will maintain status, amount, term, risk labels, and reminders, which implies modification of persistent business records, but it does not clearly warn the user before making those changes. Because ledger entries can affect downstream operations, audit trails, and business decisions, undisclosed or poorly signaled persistence increases the risk of accidental or unauthorized record modification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file title and description are entirely in Chinese and present the templates as the standard output format for the skill, with no indication that users may choose another language or locale. This can violate language/locale policy when a skill appears to require a specific language without explicit user opt-in or documented regional justification.

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 template uses only Chinese section headings, which can enforce a specific language/locale on outputs. The policy allows locale constraints only when they are optional or clearly justified, neither of which is present in this file.

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 template is entirely written in Chinese and presents the task intake format only in that language. Because there is no indication that the user can choose another language or that the template is restricted to a Chinese-language workflow, it may violate a language/locale policy requiring user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.