@twing/cli@1.3.1
AI Security Review
scanned 11d ago · by lpm-firewall-aiThe package's postinstall mutates machine-wide configuration for several AI-agent harnesses when installed globally, without a separate consent gate for those integrations. This is unconsented lifecycle mutation of broad agent control surfaces, so it warrants blocking.
Decision evidence
public snapshot- package.json runs postinstall.cjs during installation.
- The postinstall proceeds when npm reports a global install; that gate does not ask separately before wiring agent settings.
- Machine setup writes Claude resolver wiring and installs OpenCode and Codex hooks.
- The setup modifies machine-wide Claude, OpenCode, and Codex configuration, causing these harnesses to load twing hooks.
- dist/enforce-hooks.js and dist/init.js describe repository setup paths; they do not gate the machine-wide postinstall behavior.
- The postinstall exits for installs that are neither global nor passed --machine-setup.
- The OpenCode installer leaves a same-named plugin alone when it is not recognized as twing's.
Source & flagged code
7 flagged · loading sourcePackage defines install-time lifecycle scripts.
package.jsonView on unpkgInstall-time lifecycle script is not statically allowlisted and needs review.
package.jsonView on unpkgPackage source references child process execution.
dist/opencode-adapter.jsView on unpkg · L12Findings
Affected versions and remediation
This report applies to @twing/cli@1.3.1.
See all versions of @twing/cli for other recorded verdicts.
- Avoid installing @twing/cli@1.3.1. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.
Evidence last updated: .
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.