validating-api-contracts
Warn
Audited by Gen Agent Trust Hub on Sep 4, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONPRIVILEGE_ESCALATIONINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
- [DYNAMIC_EXECUTION]: The script
scripts/generate_pact_tests.pycontains logic in thegenerate_scriptmethod to create new shell scripts from string templates provided via the--contentcommand-line argument. This allows for the generation of arbitrary executable files at runtime based on agent-provided data.- [PRIVILEGE_ESCALATION]: Thegenerate_scriptfunction inscripts/generate_pact_tests.pyexplicitly callschmod(0o755)on the files it creates. Granting execution permissions to dynamically generated scripts is a privilege escalation vector.- [INDIRECT_PROMPT_INJECTION]: The skill is designed to ingest and process external API documentation (OpenAPI) and contract files (Pact JSON). These external sources are untrusted and could contain malicious instructions meant to subvert the agent's logic during validation or generation tasks. - Ingestion points: External OpenAPI YAML/JSON files and Pact contract files defined in the configuration or provided as input.
- Boundary markers: The skill does not implement delimiters or specific instructions to the model to ignore embedded commands within the processed API data.
- Capability inventory: The skill has access to file writing, shell execution (via the
Bashtool and generated scripts), and network operations for publishing to a Pact Broker. - Sanitization: There is no evidence of input validation or content sanitization in the script that generates the executable output.- [COMMAND_EXECUTION]: The skill instructions and documentation describe the use of external CLI tools, including
pact-brokerandopenapi-diff, to perform core tasks like contract publication and schema comparison.
Audit Metadata