T08 · Insecure Dependencies
- Location
scripts/check_and_launch.py:82- Finding
Unpinned Dependency Installation and Mutable Kubernetes Manifest Recommendation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a disclosed disaster-recovery GUI, but it needs Review because it can perform high-impact infrastructure actions and has avoidable command, install, and local metadata protection risks.
Install only if you understand and trust the infrastructure contexts it will use. Run it as a normal user, review the active Kubernetes context and rclone/rsync/Coriolis targets before actions, avoid unreviewed curl-to-kubectl commands, prefer a virtual environment with pinned dependencies, and restrict ~/.dr_backup_gui permissions because it stores operational metadata in plaintext.
scripts/check_and_launch.py:82Unpinned Dependency Installation and Mutable Kubernetes Manifest Recommendation
scripts/dr_backup_gui.py:39Sensitive Profiles and Operational Logs Lack Explicit Owner-Only Permissions
scripts/dr_backup_gui.py:240Unsanitized SSH Identity Path Is Embedded in Rsync Remote-Shell Command
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## 工具详情
### Velero(需 kubeconfig)
备份:指定命名空间、K8s 资源类型,TTL 保留策略
恢复:支持命名空间映射(旧集群 → 新集群)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## 工具详情
### Velero(需 kubeconfig)
备份:指定命名空间、K8s 资源类型,TTL 保留策略
恢复:支持命名空间映射(旧集群 → 新集群)
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
"""Run a command asynchronously, call on_done(str_output) when done."""
def worker():
try:
env = env or os.environ.copy()
p = subprocess.run(
cmd, capture_output=True, text=True, cwd=cwd, env=env,
timeout=3600,
The skill instructs users to run local Python scripts and describes capabilities that inherently require shell execution and file access, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization gap where an agent or reviewer cannot easily constrain what the skill is permitted to access, increasing the risk of unintended command execution, file modification, or environment data exposure.
This code embeds user-facing tool descriptions and status messages in Chinese, and all runtime output is presented in Chinese without offering a language selection or documenting that the skill is region-specific. That is a natural-language policy concern because it enforces a specific locale for users regardless of preference.
Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.
def check_py_pkg(name: str) -> bool:
try:
__import__(name.lower().replace("-", "_"))
return True
except ImportError:
return False
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def check_tool(name: str, cmd: list) -> bool:
try:
r = subprocess.run(cmd, capture_output=True, timeout=10)
return r.returncode == 0
except Exception:
return False
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def install_deps():
print("正在安装 Python 依赖...")
subprocess.run([sys.executable, "-m", "pip", "install", "PyQt6", "--quiet"])
print("✅ PyQt6 已安装")
print()
print("=" * 55)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def worker():
try:
env = env or os.environ.copy()
p = subprocess.run(
cmd, capture_output=True, text=True, cwd=cwd, env=env,
timeout=3600,
)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def discover_clusters(self):
try:
result = subprocess.run(
["kubectl", "config", "get-contexts", "-o", "name"],
capture_output=True, text=True,
)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def list_remotes(self):
try:
result = subprocess.run(
["rclone", "listremotes"], capture_output=True, text=True,
)
if result.returncode == 0:
The application persistently stores profiles, jobs, and config data as plaintext JSON under the user's home directory without a general warning or any file-permission hardening. In a DR/backup tool, those records can contain infrastructure identifiers, remote endpoints, namespace mappings, paths, and SSH-related settings that materially aid lateral movement or environment reconnaissance if local access is obtained.
Across the application, user-facing strings, confirmations, and status text are presented in Chinese only. This imposes a locale/language choice on all users without opt-in or a documented region-specific justification, which matches the language policy violation criteria.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def _open_config_dir(self):
import platform
if platform.system() == "Darwin":
subprocess.run(["open", CONFIG_DIR])
elif platform.system() == "Linux":
subprocess.run(["xdg-open", CONFIG_DIR])
else:
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
if platform.system() == "Darwin":
subprocess.run(["open", CONFIG_DIR])
elif platform.system() == "Linux":
subprocess.run(["xdg-open", CONFIG_DIR])
else:
subprocess.run(["explorer", CONFIG_DIR])
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
elif platform.system() == "Linux":
subprocess.run(["xdg-open", CONFIG_DIR])
else:
subprocess.run(["explorer", CONFIG_DIR])
def _show_about(self):
QMessageBox.about(self, "关于 DR Backup GUI",
No suspicious patterns detected.