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.runto execute system commands and database utilities. It also generates and executes shell scripts that orchestrate operations with tools such aspg_dump,mysqldump,mongodump,sqlite3,gpg, andopenssl. - [PRIVILEGE_ESCALATION]: The
scripts/backup_scheduler.pyutility usessudo crontab -uto 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.,
PGPASSWORDandMYSQL_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
Bashexecution and the Python scripts utilizesubprocess.runto interact with the system shell. - Sanitization: The template interpolation logic in
scripts/backup_script_generator.pyandscripts/restore_script_generator.pydoes not perform shell-escaping or validation on parameters likehostordatabase, allowing an attacker to inject arbitrary shell commands if these values are manipulated.
Audit Metadata