org-branch-cleanup
Pass
Audited by Gen Agent Trust Hub on Sep 14, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/org_branch_cleanup.pyexecutes the GitHub CLI (gh) viasubprocess.run. This is a core feature for managing repository branches. The implementation correctly passes arguments as a list, which prevents shell injection vulnerabilities. - [INDIRECT_PROMPT_INJECTION]: The skill processes external data from GitHub, including branch names and pull request metadata. This creates an indirect prompt injection surface where malicious branch names could theoretically influence the agent's behavior. However, the script mitigates technical risks by using URL encoding for branch names in all API calls.
- Ingestion points: The
query_repository_branchesfunction inscripts/org_branch_cleanup.pyreads data from the GitHub API. - Boundary markers: The skill workflow relies on structured audit logs and explicit human-in-the-loop confirmation before any destructive actions are taken.
- Capability inventory: The skill has the ability to delete GitHub branches using
gh api -X DELETEcalls. - Sanitization: Branch names are URL-encoded via
urllib.parse.quotein theencoded_branchhelper function before use in command arguments. - [DYNAMIC_EXECUTION]: The test script
scripts/test_org_branch_cleanup.pyusesimportlib.utilto dynamically load the main cleanup script for unit testing. This is a standard Python pattern for testing standalone scripts and is restricted to loading a local file within the skill's own directory. The file also uses an inline__import__('json')call within a test case, which is a benign use of dynamic importing.
Audit Metadata