generating-unit-tests
Pass
Audited by Gen Agent Trust Hub on Sep 9, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTIONCOMMAND_EXECUTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill is designed to read and analyze untrusted source code to generate unit tests. This creates a surface where malicious instructions embedded in the source code (such as within comments or string literals) could potentially influence the agent's behavior during the test generation or execution phases.
- Ingestion points: Untrusted source files are located via
Globand read using theReadtool as specified in the instructions. - Boundary markers: The instructions do not define clear delimiters or include warnings for the agent to ignore instructions embedded within the source code being analyzed.
- Capability inventory: The skill uses
Bash,Write, andEdittools. Specifically, the instructions direct the agent to 'Run the generated tests to verify they pass', which involves executing code derived from the untrusted input. - Sanitization: There are no explicit sanitization or validation steps mentioned for the content extracted from source files before it is interpolated into test templates.
- [DYNAMIC_EXECUTION]: The skill follows a pattern of generating scripts and then executing them. The instructions explicitly command the agent to 'Run the generated tests to verify they pass'. While this is the intended purpose of the skill, executing dynamically generated code based on external inputs carries a risk if the generation logic is compromised.
- [COMMAND_EXECUTION]: The skill utilizes shell commands via
Bash(restricted totest:unit-*patterns in the frontmatter) to execute test suites likepytestornpm testand to run a bundledtest_runner.shscript.
Audit Metadata