Back to skill

Security audit

Defect Prevention Expert

Security checks for vulnerabilities and agentic risk

Overview

This quality-review skill is mostly coherent, but it can persistently modify its own shared knowledge files after reviews without clear user approval.

Install only if you are comfortable with a Chinese-language quality-review skill that may write reports and propose broad artifact/code revisions. Before use, constrain it to read-only review or require explicit approval for every write, especially changes to its own checklists, examples, templates, and workflow docs; execute permission should be disabled unless a separate, specific workflow justifies it.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:897
Finding

Mandatory Persistent Modification of Shared Skill Knowledge

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:118, SKILL.md:897-918, and SKILL.md:954. The same instructions are mirrored in SKILL.html:1423, SKILL.html:2679-2720, and SKILL.html:2779.

Vulnerability Type: Persistent poisoning of shared agent knowledge from potentially untrusted review input

Risk Level: Medium

Vulnerable Code Snippet

The following English rendering preserves the meaning of the relevant instructions:

text
Rule 7: New defect patterns must be updated in the knowledge base and cannot be omitted.
markdown
## Phase 12: Knowledge Retention and Continuous Improvement

### Update the checklist

- Add newly discovered defect scenarios to `checklists/review-checklist.md`.
- Regularly review and update the completeness of the checklist.
- Update quality baselines based on measurement data.

### Update example scenarios

- Add typical cases to `examples.md`.
- Record specific testing steps and verification methods.
- Add production incident cases and root-cause analyses.

### Update knowledge-base files

| File | Update condition | Content |
|------|------------------|---------|
| `checklists/review-checklist.md` | A new inspection item is found | Add the new inspection point |
| `examples.md` | A new typical scenario is found | Add the new example |
| `templates/test-case-template.md` | A new testing method is found | Add the new testing strategy |
| `docs/quality-gate-workflow.md` | Quality measurement data changes | Update quality baselines and inspection standards |
text
Skipping knowledge retention | Update the knowledge base after every review.

Technical Analysis

The Skill requires review findings to be written into persistent, shared behavioral reference files. These files influence future quality reviews, test strategies, examples, and quality-gate decisions.

The review input may include untrusted requirements, source code, reports, examples, or adversarial instructions. A malicious projec ...[truncated 2245 chars]

Remediation
View remediation

Remediation Suggestions

  1. Make all shared knowledge-base modifications opt-in rather than mandatory.
  2. Require explicit user approval before writing to any Skill-owned file.
  3. Present a complete proposed diff, affected paths, rationale, and source provenance before requesting approval.
  4. Store findings from untrusted inputs in a project-local draft, such as docs/review/proposed-knowledge-updates.md, instead of directly changing shared instructions.
  5. Establish a promotion process requiring human review before project-local proposals become global Skill guidance.
  6. Validate proposed entries for provenance, duplication, factual correctness, scope, and conflicts with existing security rules.
  7. Treat all reviewed artifacts as untrusted data and prohibit their instructions from directly becoming agent behavior.
  8. Restrict write access to an explicitly approved workspace directory and deny modification of loaded Skill instructions by default.
  9. Record an audit trail containing the source project, approving user, timestamp, proposed change, and validation result.
  10. Remove the unused execute permission from allowed-tools to improve least privilege, because the documented workflows do not require command execution.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (27)

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · SKILL.html (reported line 10)May include surrounding context.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title></title>
  <style>
  @font-face {
  font-family: octicons-link;
  src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill’s top-level contract says it is not for concrete code fixes, but the workflow later instructs generating revised artifacts and even optimized code. This creates a scope-integrity violation: callers may invoke a supposedly advisory-only skill and unexpectedly receive implementation-changing outputs, increasing the chance of unsafe autonomous modifications.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Stage 3 explicitly recommends directly generating optimized code, which contradicts the skill’s stated 'Not for: 具体的代码修复' boundary. In a tool-enabled agent, this can cause unauthorized or poorly reviewed code changes under the guise of analysis, especially because write/execute tools are available.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation criteria are broad enough to match a large fraction of normal software-delivery work, making this skill easy to invoke in contexts far beyond tightly scoped quality review. When combined with write and execute permissions, over-broad routing increases the chance of the skill being selected and taking actions in situations where a safer, narrower tool should have been used.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises broad tool access including write and execute without an upfront safety boundary explaining when those capabilities may or may not be used. For a quality-analysis skill, this is dangerous because users may expect passive review while the agent is actually empowered to modify files or run commands, enabling unintended state changes or abuse if triggered by adversarial content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The metadata sets 'language: zh', and the surrounding description and workflow content are written entirely in Chinese, which indicates a fixed language expectation. There is no visible statement offering language choice or explaining that the locale is optional or region-specific.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The keyword triggers are generic terms like review, risk identification, test strategy, and quality improvement, which are common across many benign tasks and other skills. Such ambiguous triggers can cause misrouting to a privileged skill, exposing write/execute-capable behavior during ordinary discussions that do not require it.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill goes beyond analysis/reporting and explicitly instructs itself to update repository knowledge-base artifacts such as checklists and related workflow content. In a skill granted write access, this creates a scope-expansion path where ordinary review requests can cause persistent repository modifications that were not clearly bounded to user-approved outputs.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill states it is not intended for concrete code fixes or refactoring, yet it directs updates to multiple repository files including checklists, examples, templates, and workflow docs. This mismatch increases the chance of unintended persistent changes and lets a broadly-invoked quality skill behave like a maintenance agent with write authority.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger scope spans nearly every software lifecycle stage and broadly says to use the skill whenever quality support is needed. Such overbreadth can cause inappropriate routing, overshadow more specialized skills, and increase the chance that high-impact tasks like code modification are performed in the wrong operational context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill enables the write tool and repeatedly instructs saving reports and artifacts, but the top-level description does not clearly warn users that workspace files may be created or modified. This undermines informed consent and can lead to unexpected persistence of generated content in the repository or workspace.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The keyword triggers include generic terms such as '评审', '风险识别', and '质量提升' without contextual constraints. This raises accidental invocation risk, which matters more here because the skill is empowered with write and execute tools and contains workflow branches that can move beyond analysis into modification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Stage 1 is framed as a risk-analysis workflow, but it offers generating an optimized requirements document as a direct next step. This broadens the skill from assessment into modification, which can blur boundaries and lead to unintended changes to source requirements without a clear mode switch.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Stage 2 similarly shifts from design review into direct generation of an optimized design document. While less dangerous than direct code generation, it still weakens the principle of least surprise and can cause an analysis skill to overstep into authoring system design changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file contains a natural-language statement, "仅支持中文,英文场景未覆盖," which indicates the skill is limited to Chinese only. Under the policy, forcing a specific language without user choice or a clearly justified regional constraint is a reportable locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest sets the skill language to "zh", which indicates a fixed language choice. There is no indication here that users can choose another language or that the Chinese-only constraint is justified as region-specific, so this may violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all user-facing instructions and checklist items exclusively in Chinese. Under the policy, forcing a specific language without user opt-in or a clearly documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document title and all instructional content are written exclusively in Chinese, and nowhere in the file does it offer an alternative language or state that the workflow is intentionally limited to a Chinese-speaking or region-specific context. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow document expands the skill from quality analysis into code and test generation, which conflicts with the manifest's stated scope and 'Not for' constraints. This kind of scope drift is dangerous because an orchestrator or user may invoke the skill for implementation tasks it was not intended or reviewed to perform, weakening safety boundaries and increasing the chance of insecure or over-privileged outputs.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The review-stage routing describes the skill as guiding coding-stage and test-writing-stage activities rather than strictly reviewing artifacts, again broadening behavior beyond the declared scope. In practice, this can cause policy bypass via documentation: downstream agents may treat the skill as authorized to influence or generate implementation content, leading to unsafe task routing and reduced separation of duties.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown template is entirely framed as standard output formats in Chinese, including the title and descriptive instructions, with no indication that another language may be used on user request. That creates a language/locale policy issue because the 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
94% confidence
Finding

SQP-3 适用于所有文件类型。L0021 将语言设为 zh,结合全文中文说明,表现为默认强制单一语言,但没有说明可根据用户偏好切换语言或先征求语言选择,存在语言/locale 策略风险。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

该段声明为“修复后的 defect-prevention-expert v4.0”并给出一组最终评分结论,但同一文件前文已明确该报告针对 v4.1.0,且前文的实测综合结果为 8.2/10。这里的版本号、分数与前文最终结论不一致,属于文档内容主动传达了与文件实际主题相冲突的信息。

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This manifest file declares the skill language as "zh", but does not clarify whether the skill is limited to Chinese output, which variant is used, or whether users can opt into another language. In a manifest, that can make activation/behavior expectations less specific and may create ambiguity about when the skill is appropriate to invoke.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all instructions, examples, and test cases exclusively in Chinese. Under the policy rule, forcing a specific language without user opt-in can be a natural-language policy violation when no language choice or justification is provided.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.