未固定版本的 npx 命令可执行随后发布的包代码
原文依据:1 处清单建议在 CI 中运行 `npx liarjs`,但没有固定包版本或完整性值。npx 在本地缺少该包时通常会获取并执行注册表当前解析到的版本,因此未来的包更新、账号劫持或依赖污染会改变实际执行的代码。
受影响的包代码会以 CI 或开发者进程的权限运行,可能读取工作区、环境变量和 CI 凭据,或修改构建产物。
`npx liarjs` 是无人值守 CI 中的主动执行指令,却没有版本号或完整性校验。若环境中未预装该包,npx 通常会从注册表取得并执行当前解析版本;包更新或供应链受损时,执行内容可能改变并接触 CI 可访问的文件或凭据。用户可要求固定版本、锁定依赖,并限制该步骤的网络与凭据权限。
| 10 | Whole-stack coherence | [whoer.net](https://whoer.net), [pixelscan.net](https://pixelscan.net) | IP, timezone and locale disagree at a glance || 11 | Consistency rules in CI | `npx liarjs` ([liarjs.dev](https://liarjs.dev)) | Any of ~40 open-source cross-layer rules fail - this is the one that runs unattended |Checks 1, 3 and 7 are the ones worth wiring into CI: they are cheap, deterministic, and they catch the defects that actually recur.