code-quality-workflow
Pass
Audited by Gen Agent Trust Hub on Sep 10, 2026
Risk Level: SAFECOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/check_patch_scope.pyusessubprocess.runto executegitcommands. This functionality is used to analyze repository state, calculate line churn, and identify untracked files for budget enforcement. The commands use fixed argument lists (e.g.,git diff --numstat) and are executed within a validated repository path. - [DYNAMIC_EXECUTION]: The test suite in
tests/test_scripts.pyutilizes theimportliblibrary to dynamically load the skill's utility scripts (merge_audit_reports.pyandcheck_patch_scope.py) for validation. This is a local execution pattern used strictly for unit testing the skill's own components. - [INDIRECT_PROMPT_INJECTION]: The skill represents a surface for indirect prompt injection because it is designed to ingest and analyze untrusted source code and JSON audit reports. The skill incorporates multiple defensive layers to mitigate this risk, including a mandatory gating process, strict patch budgets, and explicit 'read-only' instructions for the agent until user authorization is granted.
- Ingestion points: External data enters the context via source code files during the
AUDITstate and JSON report files processed byscripts/merge_audit_reports.py. - Boundary markers: The skill instructions define clear state transitions and include a 'Non-negotiable rules' section that prohibits unauthorized edits. The
audit-and-sweep.mdreference provides a 'Slice prompt' that explicitly instructs the agent not to edit files. - Capability inventory: The skill is capable of executing
gitcommands and writing to the local filesystem (in theCHANGEstate). These capabilities are restricted by thecheck_patch_scope.pybudget validator. - Sanitization: The scripts use standard JSON parsing and text normalization, relying on the workflow's structural gates rather than content sanitization to prevent accidental instruction following.
Audit Metadata