postgres-pro
Fail
Audited by Gen Agent Trust Hub on Feb 17, 2026
Risk Level: HIGHCOMMAND_EXECUTIONCREDENTIALS_UNSAFEEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION] (HIGH): The skill's documentation (EXAMPLES.md and REFERENCE.md) frequently instructs the agent to use
sudofor high-risk operations, such assudo rm -rf /var/lib/postgresql/14/main/*andsudo systemctl stop postgresql. Granting an AI agent the ability to execute these commands with elevated privileges presents a high risk of privilege escalation and accidental or intentional system destruction. - [COMMAND_EXECUTION] (MEDIUM): The provided Python script
scripts/backup_pg.pyis vulnerable to SQL injection in the_create_databasemethod. It uses an f-string to interpolate thedatabasevariable directly into a SQL statement:f"CREATE DATABASE {database};". If an attacker can control the database name, they can execute arbitrary SQL. Furthermore, the use ofsubprocess.runwith formatted strings for file paths and database names across several methods creates a surface for command and argument injection. - [CREDENTIALS_UNSAFE] (LOW): The backup script and documentation handle database credentials. While the script uses the
PGPASSWORDenvironment variable to pass secrets to PostgreSQL utilities (which is safer than command-line arguments), it still processes raw passwords and includes placeholders likepassword="your_password"which could lead to accidental exposure. - [EXTERNAL_DOWNLOADS] (LOW): The skill references and suggests the installation of several external PostgreSQL extensions (e.g.,
pg_cron,pg_partman,pgvector). These represent third-party dependencies that are not inherently malicious but increase the attack surface of the target environment.
Recommendations
- AI detected serious security threats
Audit Metadata