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.md to 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 requests library in tests), and execute shell commands (running pytest).
  • Sanitization: The code generator in scripts/generate_pytest_tests.py utilizes the repr() 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.py creates executable Python code by formatting strings with parsed endpoint data.
  • Execution: The scripts/run.sh script automates the process of parsing input, generating the test file, and then executing it using python3 -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.sh executes Python scripts and the pytest module. The README.md and references/setup-and-ci.md files provide instructions for installing dependencies and running the automation pipeline.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 14, 2026, 01:44 AM