automating-database-backups

Warn

Audited by Gen Agent Trust Hub on Sep 9, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONCREDENTIALS_UNSAFEPRIVILEGE_ESCALATIONPERSISTENCEINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
  • [COMMAND_EXECUTION]: The skill utilizes Python's subprocess.run to execute system commands and database utilities. It also generates and executes shell scripts that orchestrate operations with tools such as pg_dump, mysqldump, mongodump, sqlite3, gpg, and openssl.
  • [PRIVILEGE_ESCALATION]: The scripts/backup_scheduler.py utility uses sudo crontab -u to modify crontab entries for specific system users, which represents a privilege escalation vector necessary for its automation features.
  • [PERSISTENCE]: The skill is designed to create and manage persistent cron jobs on the host system, ensuring that generated backup scripts run on a recurring schedule.
  • [DYNAMIC_EXECUTION]: The skill dynamically assembles executable shell scripts at runtime by interpolating user-provided configuration into predefined bash templates.
  • [CREDENTIALS_UNSAFE]: The documentation and generated examples suggest insecure patterns for credential management, including storing database passwords in environment variables and potentially in crontab blocks (e.g., PGPASSWORD and MYSQL_PWD).
  • [INDIRECT_PROMPT_INJECTION]: The skill ingests untrusted configuration data that is used to generate executable scripts, creating a vulnerability surface for shell injection.
  • Ingestion points: User-supplied connection details (host, database name, username) and schedule parameters provided to the generation scripts as documented in SKILL.md.
  • Boundary markers: The generated bash templates lack boundary markers or delimiters to isolate user-provided strings from executable logic.
  • Capability inventory: The skill environment allows Bash execution and the Python scripts utilize subprocess.run to interact with the system shell.
  • Sanitization: The template interpolation logic in scripts/backup_script_generator.py and scripts/restore_script_generator.py does not perform shell-escaping or validation on parameters like host or database, allowing an attacker to inject arbitrary shell commands if these values are manipulated.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 9, 2026, 03:41 AM