T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:13
- Finding
- Unpinned Remote Repository Is Downloaded and Executed Locally## Vulnerability Details **File Location**: `SKILL.md`, lines 13–15 **Vulnerability Type**: Remote payload retrieval and supply-chain execution **Risk Level**: High ### Vulnerable Code ```bash git clone https://github.com/geminimir/stripemeter && cd stripemeter cp .env.example .env && docker compose up -d && pnpm -r build pnpm db:migrate && pnpm dev ``` ### Technical Analysis The quick-start workflow clones the mutable default branch of an external Git repository and immediately executes content obtained from it. No immutable commit or release tag, checksum, cryptographic signature, or provenance verification is specified. The subsequent commands create several execution channels for remotely controlled content: - `docker compose up -d` processes downloaded Compose configuration and starts referenced images. - `pnpm -r build` may execute package lifecycle and build scripts. - `pnpm db:migrate` runs downloaded migration logic with database access. - `pnpm dev` starts the downloaded application. The external repository and its dependencies are not included in the audited artifact, so their safety cannot be established from this project. The effective payload may also change after this Skill has been reviewed. ### Attack Path 1. An attacker compromises the referenced repository, its maintainer account, a dependency, or a container image. 2. The attacker places malicious logic in a package lifecycle script, build command, migration, application startup path, Compose configuration, or referenced image. 3. A user follows the documented quick-start instructions and clones the current default branch. 4. Docker or pnpm executes the attacker-controlled content without an integrity or provenance check. 5. The malicious process accesses resources available to the user's account or containers, potentially including environment files, Stripe credentials, database credentials, Redis credentials, source code, and reachable services. ### Impact Assessment Successful ...[truncated 727 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the repository to a reviewed, immutable commit hash rather than relying on its default branch: ```bash git clone https://github.com/geminimir/stripemeter cd stripemeter git checkout --detach VERIFIED_COMMIT_SHA ``` 2. Publish the expected commit identifier through a trusted channel and verify signed commits or release tags. 3. Pin container images by immutable digest and verify image signatures or attestations before startup. 4. Require a committed lockfile and install dependencies with frozen-lockfile enforcement. 5. Audit package lifecycle scripts, migration files, Dockerfiles, Compose files, volume mounts, capabilities, and network exposure before execution. 6. Run the stack under a dedicated, unprivileged account and use rootless containers where possible. 7. Do not mount the Docker socket, broad host directories, SSH agents, cloud credentials, or unrelated secrets into containers. 8. Supply narrowly scoped development credentials only after the downloaded source has been verified. 9. Separate build, migration, and startup steps so users can review each stage before execution.
