generating-swift-package-docs
Pass
Audited by Gen Agent Trust Hub on Sep 15, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/generate_docs.pyexecutes external CLI tools using thesubprocess.runfunction. It callsgit describeandgit tagto determine package versions within the dependency directories, and it runs theinterfazzleCLI tool to generate documentation from Swift modules located in the XcodeDerivedDatadirectory. Although the commands are constructed using list arguments to prevent shell injection, the skill relies on the integrity of external tools when processing files from third-party dependencies. - [INDIRECT_PROMPT_INJECTION]: The skill is vulnerable to indirect prompt injection because it ingests untrusted content from external Swift packages.
- Ingestion points: The script reads
Package.resolvedandPackage.swiftfiles, and extracts content fromREADME.md,README.txt, orREADME.markdownfiles found in the package source. - Boundary markers: While the generated output uses markdown headers (e.g.,
# Package README) to delimit sections, it lacks specific instructions to the agent to disregard any commands or prompts embedded in that content. - Capability inventory: The skill performs file system operations (read/write) and executes subprocesses based on information gathered from these external files.
- Sanitization: The content from README files and package manifests is processed and presented to the agent in its raw form, allowing potentially malicious instructions in a dependency to influence agent behavior.
Audit Metadata