Back to skill

Security audit

Refactor Safely

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward refactoring guidance skill with no executable payload, persistence, credential access, or hidden behavior.

Install this if you want a Chinese-language workflow for cautious refactoring. Review proposed code edits before accepting them, especially deletion of dead code or structural changes, and ask the agent to use your preferred language if needed.

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

Vague Triggers

Medium
Confidence
90% confidence
Finding
The invocation description includes broad phrases like "重构这段代码", "清理技术债", and "改善结构但不要改行为" without clarifying boundaries or exclusion conditions. This can make it unclear when the skill should activate versus when a user is making a more general software-engineering request.

Natural-Language Policy Violations

Medium
Confidence
80% confidence
Finding
The skill's natural-language content is predominantly in Chinese and does not state that the assistant should match or ask for the user's preferred language. This can violate language/locale policy when users have not opted into Chinese output.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The trigger section mixes explicit user phrases with broad conditions like '代码难以维护、重复多、职责混乱、难以加测试', which are common code-quality observations rather than clear invocation boundaries. Without exclusions or narrower context, the skill could be invoked whenever code looks messy, even if the user did not ask for refactoring help.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
The skill description and usage instructions are entirely in Chinese, with no indication that users may choose another language or locale. Under the language/locale policy, this can be a natural-language policy issue unless the locale restriction is explicit and justified.

Static analysis

No suspicious patterns detected.