T08 · Insecure Dependencies
- Location
references/troubleshooting.md:181- Finding
Unpinned Third-Party Package Installation Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This code-refactoring skill is mostly purpose-aligned, but its automatic rewrite tool can corrupt user code and lacks clear safeguards.
Install only if you will use analysis and suggestions by default, review generated changes carefully, run tests, and avoid writing output over the original file. Treat --simplify as experimental. If following troubleshooting steps, use an isolated environment and pin package and Docker versions.
references/troubleshooting.md:181Unpinned Third-Party Package Installation Instructions
scripts/code_simplifier.py:472Semantically Unsafe Source Transformations Can Corrupt Output Code
The early-return rewrite injects return None immediately after an outer if, but the comment says it is for the failed condition even though the inserted return executes when the condition is true. This inverts behavior and can cause premature exits, skipped logic, and broken program behavior, making it a direct unsafe code transformation vulnerability in a refactoring tool.
The skill advertises code-analysis and code-simplification workflows, including commands that read input files and write transformed output, but it does not declare any explicit tool scope such as permissions or allowed-tools. In an agent environment, missing scope boundaries can let the skill be invoked with broader file read/write capabilities than intended, increasing the risk of unintended code modification or access to unrelated files.
The trigger description is broad enough to match very common requests such as simplifying, refactoring, optimizing, or improving code quality. Over-broad activation can cause the skill to run in contexts the user did not intend, which is riskier here because the skill also describes automated code transformation and file-handling behavior.
整个技能描述和规范均以中文固定呈现,且未说明这是面向特定中文环境的受限技能,也没有提供用户可选择其他语言的机制。按政策,若技能在语言上施加强制约束,应提供用户选择或明确、合理的场景限定。
The documentation explicitly presents an automatic simplify mode and output-writing mode but does not warn that user code may be changed, nor does it instruct the user to review diffs or back up files first. This creates a tangible integrity risk: users may apply transformations that alter behavior, remove edge-case handling, or overwrite source code without adequate review.
The file title and the full troubleshooting content are written in Chinese, and the document does not indicate that language selection is optional or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
The simplify() method claims to simplify code based on prior analysis and generated suggestions, but when apply_changes=True it performs hard-coded source rewrites regardless of whether those rewrites were validated as applicable. In a code-modification skill, silent semantic changes are dangerous because they can corrupt user code, introduce logic bugs, or alter control flow while presenting the output as a safe simplification.
This markdown file is written entirely in Chinese and the title explicitly labels it as best practices in Chinese, but there is no indication that the skill or reference is region-specific or that users may opt into another language. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.
This code file contains natural-language content in Chinese, beginning with the comment at L009 and continuing in multiple comments/docstrings below, while other user-facing text is in English. Under the policy rule, forcing a specific language or mixed locale without user opt-in or documented justification can violate language/locale expectations for maintainers or users.