api-test-pytest
Pass
Audited by Gen Agent Trust Hub on Oct 14, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTIONCOMMAND_EXECUTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill is designed to ingest and parse untrusted data from multiple sources (OpenAPI, Postman, curl, etc.), creating a potential surface for indirect prompt injection attacks where malicious instructions could be embedded in the API definitions.
- Ingestion points: Data enters through
scripts/parse_api_sources.py, which handles a wide variety of external formats including JSON, YAML, XML/WSDL, and shell scripts. - Boundary markers: The skill relies on natural language instructions in
prompts/api-test-pytest.mdto scope the AI's extraction, but lacks programmatic boundary markers or strict input validation in the data processing scripts. - Capability inventory: The skill possesses the ability to write files (generated tests), perform network requests (via the
requestslibrary in tests), and execute shell commands (runningpytest). - Sanitization: The code generator in
scripts/generate_pytest_tests.pyutilizes therepr()function to safely interpolate values into the generated Python code, which significantly mitigates the risk of code injection into the test files. - [DYNAMIC_EXECUTION]: The skill dynamically generates Python test scripts based on the parsed API documentation and executes them.
- Evidence:
scripts/generate_pytest_tests.pycreates executable Python code by formatting strings with parsed endpoint data. - Execution: The
scripts/run.shscript automates the process of parsing input, generating the test file, and then executing it usingpython3 -m pytest. - [COMMAND_EXECUTION]: The skill includes shell scripts and instructions for executing commands on the host system to run the generated test suites.
- Evidence:
scripts/run.shexecutes Python scripts and thepytestmodule. TheREADME.mdandreferences/setup-and-ci.mdfiles provide instructions for installing dependencies and running the automation pipeline.
Audit Metadata