T09 · Insecure Skill Coding Practices
- Location
scripts/sync.py:31- Finding
Overlapping synchronization paths can cause source deletion or recursive directory growth
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This file-management skill is mostly purpose-aligned, but it can delete or move local files and has under-documented destructive edge cases users should review before installing.
Install only if you are comfortable reviewing previews carefully and limiting use to test folders or explicit paths first. Do not run deduplicate.py without --scan-only unless you intend to delete or move files, avoid sync operations where source and target overlap, and do not use --no-confirm or scheduled --execute examples until you have verified the exact file effects.
scripts/sync.py:31Overlapping synchronization paths can cause source deletion or recursive directory growth
scripts/deduplicate.py:84Deduplication deletion does not enforce the documented explicit execution gate
The skill description claims broad capabilities that are not actually implemented, including deduplication, batch renaming, synchronization, and size-based organization. This mismatch is dangerous because users or orchestration systems may trust the advertised behavior and authorize risky file actions under false assumptions, increasing the chance of misuse, unsafe routing, or execution of incomplete workflows.
Referenced artifact was not completely inspected
python scripts/sync.py <source> <target> --mirror
Referenced artifact was not completely inspected
python scripts/sync.py <source> <target> --mirror
Referenced artifact was not completely inspected
python scripts/sync.py <source> <target> --mirror
Referenced artifact was not completely inspected
python scripts/sync.py <source> <target> --mirror
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
help='转换为大写')
parser.add_argument('--execute', action='store_true',
help='执行重命名 (默认仅预览)')
parser.add_argument('--no-confirm', action='store_true',
help='跳过确认')
args = parser.parse_args()
The skill advertises and demonstrates file-modifying operations such as organize, rename, deduplicate, and sync, but it does not declare any explicit tool scope or permissions boundary. In an agent environment, missing scope declarations can allow broader-than-intended file write behavior and make dangerous operations harder to constrain or audit.
The trigger description is very broad and can match many ordinary file-related requests, causing the skill to activate in contexts where file modification is unnecessary or unsafe. For a file-management skill with write/delete semantics, overbroad activation increases the risk of accidental invocation and unintended destructive operations.
文件描述和标题均以中文表述该技能面向用户的交互方式,但未声明这是区域性工具,也未说明可根据用户偏好切换语言。根据语言/locale 政策,若技能隐含强制特定语言而无用户选择或正当说明,属于自然语言策略问题。
The guidance '中文文件名(某些系统兼容性问题)' is natural-language advice that discourages Chinese filenames globally, effectively imposing a language/locale preference without user opt-in. The text does not limit this recommendation to specific environments or offer a contextual choice, so it conflicts with the policy against forcing a specific language or locale.
The backup examples use --mirror --execute, which can imply deletions or one-way synchronization effects, but the surrounding documentation does not warn users about the risk of overwriting or removing files. Because this is a markdown file, safety-affecting behaviors should be accompanied by a clear warning about impact to user data.
The scheduled command organize.py ~/Downloads --by-type --execute --move will automatically relocate files from the user's Downloads folder, but the markdown does not disclose the risk of unintended file moves or workflow disruption. This is a user-data-affecting automation and should include a warning before users adopt it.
The module docstring presents the tool only in Chinese, and the rest of the user-facing CLI help and status text follow the same pattern. This imposes a specific language on users without opt-in or justification, which matches the locale/language policy violation criteria.
The argparse description, help text, examples, confirmation prompt, and runtime status messages are all hardcoded in Chinese. Because the file does not provide a user language choice or document a justified region-specific constraint, this is a natural-language policy issue.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
help='转换为大写')
parser.add_argument('--execute', action='store_true',
help='执行重命名 (默认仅预览)')
parser.add_argument('--no-confirm', action='store_true',
help='跳过确认')
args = parser.parse_args()
This is a natural-language policy issue because the skill presents its purpose and operation exclusively in Chinese, with no opt-in or alternative locale. For a general-purpose file organization script, that effectively imposes a language choice on users rather than offering one.
These strings control how users understand potentially impactful file operations, but they are available only in one language. Because the script is not documented as region-specific and offers no locale selection, this violates the language/locale policy constraint.
This code file contains natural-language text in the module docstring and CLI help/output that is only in Chinese. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.
This code file contains natural-language text only in Chinese (for example, the module docstring and function docstring), which can indicate a language/locale constraint without any user choice or documented regional justification. The policy for this review flags language or locale restrictions when the skill does not explicitly offer opt-in or explain why a fixed language is required.
No suspicious patterns detected.