T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:49
- Finding
- Unpinned Third-Party Swift Package Creates a Supply-Chain Execution Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 49–51 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```markdown 5. If the project doesn't depend on SFSymbolsKit yet, add it: `.package(url: "https://github.com/WikipediaBrown/SFSymbolsKit.git", from: "1.0.0")` then `import SFSymbolsKit`. ``` ### Technical Analysis The Skill instructs the agent to add a Swift package hosted in a personal GitHub repository. The Swift Package Manager requirement `from: "1.0.0"` accepts later semantically compatible releases rather than pinning the dependency to an audited immutable commit or exact version. Consequently, the code ultimately retrieved and built can differ from the code reviewed when this Skill was published. Package resolution and compilation create a remote code supply-chain path beyond the Skill's core read-only task of validating SF Symbol names using the bundled `symbols.json` manifest. The repository is not proven to be malicious, and the Skill does not directly execute a download command. The vulnerability is the unsafe trust and versioning model: repository compromise, maintainer-account compromise, or publication of a malicious compatible release could introduce attacker-controlled source or build behavior. ### Attack Path 1. A user asks the Skill to generate or validate an SF Symbol accessor. 2. The target project does not already depend on SFSymbolsKit. 3. Following `SKILL.md`, the agent modifies the project manifest to add the remote package with `from: "1.0.0"`. 4. An attacker compromises the repository or publishes a malicious semantically compatible release. 5. Swift Package Manager resolves and downloads that mutable release. 6. The development environment builds the retrieved package and may execute package build or plugin behavior where supported. 7. Malicious dependency code can become part of the application or operate within the privileges available to the buil ...[truncated 690 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Use the bundled `symbols.json` manifest for validation and search operations without installing any package. 2. Require explicit user approval before modifying `Package.swift` or adding a network-fetched dependency. 3. If the package is necessary for generated application code, pin it to a reviewed immutable commit: ```swift .package( url: "https://github.com/WikipediaBrown/SFSymbolsKit.git", revision: "<audited-full-commit-hash>" ) ``` 4. Alternatively, use an exact, reviewed release rather than a compatible version range, and commit `Package.resolved` to preserve the reviewed resolution. 5. Verify release provenance, repository ownership, commit signatures, and checksums where available. 6. Restrict dependency resolution and builds in CI using sandboxing, minimal filesystem permissions, network controls, and narrowly scoped secrets. 7. Establish an update-review process so dependency revisions are scanned and approved before adoption. ]]>
