bats-testing-patterns

Pass

Audited by Gen Agent Trust Hub on Oct 29, 2026

Risk Level: SAFEEXTERNAL_DOWNLOADSCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [EXTERNAL_DOWNLOADS]: The skill provides instructions to install the Bats framework from official sources including the 'bats-core' GitHub repository and the npm registry.
  • [COMMAND_EXECUTION]: The implementation playbook includes numerous shell command patterns used for setup, teardown, and test execution, such as 'mktemp', 'rm -rf', 'chmod', and the Bats 'run' command.
  • [DYNAMIC_EXECUTION]: The skill utilizes dynamic execution patterns for testing purposes:
  • It creates temporary executable stubs using heredocs ('cat <<EOF') to mock external commands.
  • It dynamically sources scripts under test using calculated paths (e.g., 'source "${BATS_TEST_DIRNAME}/../bin/script.sh"').
  • [INDIRECT_PROMPT_INJECTION]: The skill describes patterns for ingesting external data into the test environment:
  • Ingestion points: The skill reads test fixtures and input files from the file system (e.g., 'tests/fixtures/input.txt').
  • Boundary markers: None identified in the provided patterns.
  • Capability inventory: Includes file system read/write, environment variable manipulation, and shell command execution via the 'run' command.
  • Sanitization: No explicit sanitization of fixture content is shown; however, the documentation includes a warning that dynamic stub interpolation should only use trusted data to avoid shell code injection.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 29, 2026, 10:25 AM