Back to skill

Security audit

Code Review

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent code-review skill with no executable payload, persistence, or hidden data flow, though users should be aware it may read local git diffs for PR-style review requests.

Install if you want a Chinese-first code review assistant. When asking it to review recent changes, specify exactly which repository, branch, staged changes, commit, or pasted diff should be reviewed to avoid unintentionally including unrelated local code or configuration in the review context.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The statement '中文优先' imposes a language-output preference at the skill level without indicating that it defers to user preference. This can override or conflict with the user's requested language, causing usability and policy-alignment issues, though it is not a direct security exploit by itself.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README includes broad natural-language invocation examples such as “帮我看看代码” and generic review prompts that can match ordinary user requests, increasing the chance the skill is invoked unintentionally. In an agent setting, over-broad triggers can cause incorrect routing of user requests, unexpected processing of sensitive code, or bypass of more appropriate specialized tools.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

触发条件包含“帮我看看代码”“这段代码有问题吗”这类日常且高频表达,范围过宽,容易在普通咨询场景下误触发该技能。误触发后会把用户输入当作待审查代码或代码上下文处理,增加不必要的上下文读取、工具调用和后续敏感内容暴露风险。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

PR 审查模式的触发条件包含“审查我最近的代码变更”这类表述,但未限定仓库、分支、提交范围或是否允许读取本地工作区。结合后续自动执行 git diff 的设计,可能在用户未充分理解范围时读取超出预期的代码变更。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

技能指示在用户处于工作目录时主动执行 git diff 获取变更,但没有明确告知这会读取当前仓库内容,也没有要求显式授权或范围确认。这会导致本地源代码、配置、注释、密钥片段或未提交的敏感改动被自动摄取,属于典型的上下文越权/数据暴露风险。

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 presents the review rules primarily in Chinese, starting with a Chinese title and content, while not offering any language-selection option or noting that the skill is intended only for Chinese-speaking users. The policy specifically flags language or locale constraints when they are imposed without user opt-in or clear justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown test case explicitly requires that the review output be in Chinese. That is a natural-language locale requirement, and the file does not indicate that the user is given a language choice or has opted into Chinese output.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.