T08 · Insecure Dependencies
- Location
scripts/opencli.sh:4- Finding
Execution of Unverified External and PATH-Resolved OpenCLI Programs
- Content
View full analysis
/dev/null 2>&1; then exec "$(command -v opencli)" "$@" fi ``` The associated documentation in `SKILL.md:35-37` states that the external source repository is automatically synchronized with `origin/main`: ```markdown **自动同步:** 本地 source repo 由 cron job `每周二技能升级检查`(每周二 09:00)自动同步 origin/main。无需手动更新。 ``` ### Technical Analysis The wrapper delegates execution to code that is not included in the audited skill package. The preferred entrypoint, `/Users/ShiXin/Documents/Workspace/github-project/opencli/dist/main.js`, is validated only with a file-existence check. Its integrity, ownership, permissions, version, and cryptographic digest are not verified before it is executed by Node.js. The documentation further indicates that the external repository is automatically synchronized from the mutable `origin/main` branch. Consequently, the executable behavior can change after the skill has been reviewed. A compromised upstream repository, source-control account, synchronization process, or local checkout could introduce arbitrary JavaScript that the wrapper would subsequently execute. If the source entrypoint is unavailable, the wrapper executes the first `opencli` program resolved through the invoking process's `PATH`. It does not verify that this executable comes from an approved location or trusted owner. An attacker who can influence `PATH` or place an executable in an earlier searched directory could therefore substitute a malicious program. Arguments are forwarded safely as `"$@"`; the issue is not shell com ...[truncated 1963 chars]- Remediation
View remediation
