T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:20
- Finding
- Unpinned Third-Party Code Retrieval and Installation<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:20-24` - `SKILL.md:157-162` - `scripts/setup_careerforge.sh:17-19` - `references/cli_usage.md:90-91` **Vulnerability Type**: Unpinned remote payload retrieval and insecure dependency installation **Risk Level**: High ### Vulnerable Code `SKILL.md:20-24`: ```bash cd /root/.openclaw/workspace git clone https://github.com/alon-mini/CareerForge-cli.git careerforge-cli cd careerforge-cli npm install ``` `SKILL.md:157-162`: ```bash # Download CareerForge CLI from GitHub git clone https://github.com/alon-mini/CareerForge-cli.git careerforge-cli # Initialize CareerForge cd careerforge-cli && npm install ``` `scripts/setup_careerforge.sh:17-19`: ```bash # Install dependencies echo "📦 Installing dependencies..." npm install ``` `references/cli_usage.md:90-91`: ```bash - Ensure Playwright is installed: `npm install` - Install browser binaries: `npx playwright install chromium` ``` ### Technical Analysis The skill instructs users to clone the mutable default branch of an external GitHub repository and immediately run `npm install`. No reviewed commit hash, signed release, checksum, vendored source, or other integrity constraint is specified. The effective code executed during installation can therefore change after this skill has been reviewed. In particular, npm lifecycle hooks such as `preinstall`, `install`, and `postinstall` can execute arbitrary commands under the privileges of the user running the setup. The external repository's package manifest and lockfile are not included in the audited project, so their dependency graph, lifecycle scripts, and integrity cannot be verified from this artifact. The `npx playwright install chromium` instruction presents an additional supply-chain concern. Depending on the local environment and npm configuration, `npx` may retrieve tooling that is not already installed. The instruction does not pin or verify the Playwright package version. This finding ...[truncated 1865 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the external repository to a specific, reviewed commit hash instead of cloning and executing its mutable default branch: ```bash git clone https://github.com/alon-mini/CareerForge-cli.git careerforge-cli cd careerforge-cli git checkout --detach <reviewed-commit-hash> ``` 2. Verify the checked-out commit or release using a trusted signature or a separately distributed cryptographic checksum before installation. 3. Include a reviewed dependency lockfile and use deterministic installation: ```bash npm ci ``` 4. Audit all direct and transitive dependencies, as well as `preinstall`, `install`, and `postinstall` scripts, before allowing lifecycle execution. 5. Where compatible with the dependency set, initially install without lifecycle scripts: ```bash npm ci --ignore-scripts ``` Run only individually reviewed setup steps afterward. 6. Avoid implicit package retrieval through `npx`. Install a pinned, reviewed Playwright version from the lockfile and invoke its local binary with remote package installation disabled. 7. Prefer vendoring the reviewed CLI source into the skill or publishing a signed, immutable release artifact whose digest is validated during setup. 8. Run dependency installation and CV generation in a restricted container or sandbox with: - No unnecessary host filesystem access. - No access to unrelated credentials. - Restricted outbound network access. - A non-privileged operating-system account. - Resume and API-key access granted only when required. 9. Add automated dependency scanning, lockfile integrity checks, and periodic review of the pinned upstream revision before updating it. ]]>
