repository-cleanup

Pass

Audited by Gen Agent Trust Hub on Oct 19, 2026

Risk Level: SAFECREDENTIALS_UNSAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [CREDENTIALS_UNSAFE]: The script scripts/prune-merged-worktrees.sh parses local environment files (.env, .env.testing) to extract DB_PASSWORD and DB_USERNAME. These credentials are used locally to authenticate with PostgreSQL or MySQL instances to manage maintenance tasks. While the skill does not exfiltrate these secrets, handling raw credentials in scripts is a sensitive operation.
  • [COMMAND_EXECUTION]: The skill performs destructive operations, including removing Git worktrees and dropping local databases. However, the skill implements significant guardrails:
  • Human-in-the-Loop: The instructions explicitly require the agent to present all candidates to the user and only proceed with items selected by name.
  • Validation Logic: The cleanup script verifies that any item requested for removal was previously identified as a 'stale' candidate in the same execution run, preventing the agent from arbitrarily deleting non-stale resources.
  • [INDIRECT_PROMPT_INJECTION]: The skill ingests untrusted data from the repository environment and external APIs.
  • Ingestion points: Data is gathered from git branch names, Git stash contents, and GitHub Pull Request titles/metadata via the gh CLI.
  • Boundary markers: The skill uses a structured 'Selection Form' to clearly separate the discovery phase from the execution phase, ensuring user oversight.
  • Capability inventory: The skill possesses the ability to delete directory trees and drop database schemas.
  • Sanitization: The prune-merged-worktrees.sh script validates database names against a strict alphanumeric regex (^[A-Za-z0-9_]+$) before including them in SQL statements, effectively preventing SQL injection.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 19, 2026, 07:06 PM