python-refactor

Pass

Audited by Gen Agent Trust Hub on Aug 26, 2026

Risk Level: SAFECOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONEXTERNAL_DOWNLOADSPROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The scripts analyze_multi_metrics.py and analyze_with_flake8.py utilize subprocess.run to invoke external analysis tools including flake8, radon, and complexipy for code quality measurement.
  • [REMOTE_CODE_EXECUTION]: The benchmark_changes.py script employs dynamic module loading via importlib to execute and time functions within the code being refactored. This behavior is standard for performance benchmarking utilities that need to compare two versions of a software component.
  • [EXTERNAL_DOWNLOADS]: The skill documentation and plugin guides suggest the installation of numerous third-party Python packages and linting plugins (such as ruff, radon, wily, and flake8-bugbear) from official registries to support the refactoring workflow.
  • [PROMPT_INJECTION]: The skill processes user-provided source code as its primary data input, which creates an attack surface for indirect prompt injection. Malicious instructions could potentially be embedded within the code's comments or docstrings to influence the agent's behavior during the analysis or refactoring phases.
  • Ingestion points: Reads the user-provided codebase for analysis (Phase 1) and execution (Phase 3).
  • Boundary markers: None explicitly implemented for separating code comments from agent instructions.
  • Capability inventory: Includes file read/write, subprocess execution, and dynamic Python module execution.
  • Sanitization: Relies on static analysis (AST-based) for initial checks, but does not sanitize the content for injection patterns.
Audit Metadata
Risk Level
SAFE
Analyzed
Aug 26, 2026, 12:06 PM
Security Audit — agent-trust-hub — python-refactor