T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:6
- Finding
- Unpinned Third-Party CLI Installation Allows Supply-Chain Code Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 6 and 13 **Vulnerability Type**: Unpinned executable dependency from external sources **Risk Level**: Medium ### Vulnerable Code ```json "install":[ { "id":"brew", "kind":"brew", "formula":"porteden/tap/porteden", "bins":["porteden"], "label":"Install porteden (brew)" }, { "id":"go", "kind":"go", "module":"github.com/porteden/cli/cmd/porteden@latest", "bins":["porteden"], "label":"Install porteden (go)" } ] ``` ```markdown If `porteden` is not installed: `brew install porteden/tap/porteden` (or `go install github.com/porteden/cli/cmd/porteden@latest`). ``` ### Technical Analysis The Skill instructs users or agents to install and execute the third-party `porteden` CLI from either an external Homebrew tap or a GitHub Go module selected with the mutable `@latest` version. The instructions do not pin an audited release, immutable commit, artifact checksum, or cryptographic signature. As a result, the executable installed when the Skill is invoked can differ from the implementation that existed when the Skill was reviewed. This creates a supply-chain trust boundary through which a compromised upstream repository, maintainer account, release workflow, or Homebrew tap could distribute attacker-controlled code. This is especially security-sensitive because the installed CLI is subsequently instructed to: - Receive a Microsoft account token through `porteden auth login --token <key>`. - Read `PE_API_KEY` from the environment. - access credentials persisted in the system keyring. - Read private calendar subjects, bodies, locations, organizers, and attendee identities. - Create, update, delete, and respond to calendar events. Network access to Microsoft 365 or a calendar service is necessary for the declared calendar functionality. However, the reviewed project contains only the Skill instructions and not the CLI implementation, so the CLI's act ...[truncated 1955 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with a specifically audited semantic version or immutable Git commit, for example: ```sh go install github.com/porteden/cli/cmd/porteden@vX.Y.Z ``` 2. Pin the Homebrew formula to a reviewed release rather than implicitly accepting future tap changes. 3. Publish expected SHA-256 hashes for release artifacts and verify them before execution. 4. Require cryptographically signed releases and verify signatures against a documented maintainer key. 5. Record the approved CLI version in Skill metadata so automated installers can enforce it. 6. Document all network endpoints contacted by the CLI, including whether calendar data passes through a third-party service rather than going directly to Microsoft Graph. 7. Document and enforce the minimum Microsoft Graph scopes required for each operation. 8. Avoid passing tokens in command-line arguments because they can be exposed through shell history or process listings. Prefer protected standard input, an operating-system credential broker, or an interactive authentication flow. 9. Run the CLI with minimal operating-system privileges and a narrowly scoped environment that excludes unrelated secrets. 10. Establish a controlled update process in which each new CLI version is reviewed, its checksum is updated, and security-sensitive behavior is retested before the Skill adopts it. ]]>
