T09 · Insecure Skill Coding Practices
- Location
scripts/step_executor.py:194- Finding
Path Traversal in Step Definitions Allows Arbitrary Local File Reads and Writes
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a plausible task workflow tool, but it needs Review because its execution and backup code can handle local files and remote backups without enough scoping or user control.
Review before installing. Keep backup, Git backup, email, and progress background reporting disabled unless you explicitly need them; use a non-sensitive test workspace first; do not run imported or untrusted project step files; and avoid configuring a remote Git repository until the package adds path containment, secret exclusions, destination allowlisting, and explicit confirmation prompts.
scripts/step_executor.py:194Path Traversal in Step Definitions Allows Arbitrary Local File Reads and Writes
scripts/backup_manager.py:236Git Backup Can Exfiltrate Sensitive Project Files to an Arbitrary Repository
Automatic recovery logic, smart retries, and the ability to modify execution configuration to enable real execution substantially increase operational risk compared with a planning-oriented workflow. A skill that can escalate from simulation to real actions, especially via config changes, may execute unintended side effects if the transition is not explicit and controlled.
Automatic recovery logic, smart retries, and the ability to modify execution configuration to enable real execution substantially increase operational risk compared with a planning-oriented workflow. A skill that can escalate from simulation to real actions, especially via config changes, may execute unintended side effects if the transition is not explicit and controlled.
Automatic recovery logic, smart retries, and the ability to modify execution configuration to enable real execution substantially increase operational risk compared with a planning-oriented workflow. A skill that can escalate from simulation to real actions, especially via config changes, may execute unintended side effects if the transition is not explicit and controlled.
Automatic recovery logic, smart retries, and the ability to modify execution configuration to enable real execution substantially increase operational risk compared with a planning-oriented workflow. A skill that can escalate from simulation to real actions, especially via config changes, may execute unintended side effects if the transition is not explicit and controlled.
Automatic recovery logic, smart retries, and the ability to modify execution configuration to enable real execution substantially increase operational risk compared with a planning-oriented workflow. A skill that can escalate from simulation to real actions, especially via config changes, may execute unintended side effects if the transition is not explicit and controlled.
Automatic recovery logic, smart retries, and the ability to modify execution configuration to enable real execution substantially increase operational risk compared with a planning-oriented workflow. A skill that can escalate from simulation to real actions, especially via config changes, may execute unintended side effects if the transition is not explicit and controlled.
Automatic recovery logic, smart retries, and the ability to modify execution configuration to enable real execution substantially increase operational risk compared with a planning-oriented workflow. A skill that can escalate from simulation to real actions, especially via config changes, may execute unintended side effects if the transition is not explicit and controlled.
The code can clone, commit, and push backups to an external Git repository, which gives the skill a durable off-host persistence and exfiltration mechanism. Because the skill's stated purpose is workflow/task decomposition rather than remote storage, this capability is unusually dangerous in context and could expose source code, logs, outputs, or secrets.
The skill advertises code-driven behavior including filesystem access, shell usage, and possible network activity, but declares no explicit tool scope or permissions boundaries. In an agent environment, this can cause overbroad authority and make it harder for users or orchestrators to constrain risky operations before execution.
The documentation mentions project creation, backup-related structures, and execution behavior, but does not prominently warn users about filesystem modifications or potential system impact. In an agent setting, insufficient notice undermines informed consent and can lead to unexpected writes, persistence, or state changes.
The auto-trigger rules use vague criteria like complex keywords, long estimated duration, or user request, which can cause the skill to activate in situations broader than intended. For a skill that can create files, run workflows, and potentially use shell/network capabilities, ambiguous triggering increases the chance of unreviewed side effects.
The manifest’s user-facing natural-language fields, including the skill name and multiple descriptions, are written entirely in Chinese with no indication that users can choose another language or that the skill is intended only for a Chinese-speaking region. This creates a language/locale policy concern because the skill presentation appears to enforce one language by default.
The configuration defines natural-language trigger/classification keywords only in Chinese, which can enforce a specific language behavior without any visible opt-in or justification. This creates a locale-policy concern because users operating in other languages may be subject to hidden language constraints.
The workflow includes API calling and API call logging without warning that task content, system context, or generated outputs may be sent to external services and recorded in logs. Because this workflow is designed to decompose and execute arbitrary user tasks, logged or transmitted content could include sensitive data, secrets, or proprietary information, increasing privacy and data-exposure risk.
The workflow explicitly prescribes local and cloud backups but provides no notice, consent, data-classification rules, or exclusions for sensitive content. In a task-execution workflow that may process user inputs, generated documents, logs, and deliverables, this can cause unintended retention and third-party disclosure of confidential or regulated data.
The skill is described as a task decomposition/execution workflow, yet this file adds a subsystem for archiving entire project directories and state. That scope expansion increases access to data unrelated to the stated purpose and broadens the blast radius if the skill is used in sensitive environments.
The module docstring and other user-facing text are entirely in Chinese, which imposes a specific language on users. Under the policy, language constraints should be optional or clearly justified as region-specific; this file provides neither.
The module docstring claims support for incremental backup, and backup_project accepts backup_type values including incremental and state_only, but the method always generates a full manifest over project_dir.rglob('*') and archives/copies all files regardless of backup_type. This is an active intent-code divergence because the documentation promises differentiated backup behavior that the code does not implement.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
tmp_path = Path(tmpdir)
# 克隆仓库
subprocess.run(['git', 'clone', git_repo, tmp_path],
capture_output=True, check=True)
# 切换到指定分支
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
capture_output=True, check=True)
# 切换到指定分支
subprocess.run(['git', '-C', tmp_path, 'checkout',
self.config['git_branch']], capture_output=True, check=True)
# 复制项目文件到仓库
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
ignore=shutil.ignore_patterns(*self.config['exclude_patterns']))
# 添加并提交
subprocess.run(['git', '-C', tmp_path, 'add', '.'],
capture_output=True, check=True)
commit_msg = f"备份: {project_dir.name} - {datetime.now().isoformat()}"
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
capture_output=True, check=True)
commit_msg = f"备份: {project_dir.name} - {datetime.now().isoformat()}"
subprocess.run(['git', '-C', tmp_path, 'commit', '-m', commit_msg],
capture_output=True, check=True)
# 推送
This call pushes complete project backups to a configured remote repository, creating an external exfiltration path for potentially sensitive files, logs, outputs, and execution state. In the context of a task workflow skill, remote persistence is not clearly justified and materially increases the chance of unintended data disclosure.
capture_output=True, check=True)
# 推送
subprocess.run(['git', '-C', tmp_path, 'push', 'origin',
self.config['git_branch']], capture_output=True, check=True)
logger.info(f"Git备份成功: {git_repo}")
This code file contains natural-language strings and documentation that are exclusively in Chinese, including the module docstring and subsequent user-facing output. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale restriction is explicitly documented and justified, which is not present here.
The file implements outbound email reporting and local persistence of report contents, which exceeds the skill's declared scope of task decomposition/execution. Scope expansion matters because it introduces data egress and retention behavior that users or integrators may not expect, increasing the chance of silent leakage of task content or metadata.
No suspicious patterns detected.