Warn by default; block when configured. A non-vendor package can replace the on-disk Grok CLI binary and installer settings in the user Grok home without a separate consent step.
AI security review
scanned · by lpm-firewall-ai
Postinstall unconditionally installs a native binary and mutates config.toml in the official Grok home while the package identity is @kingingwang, not @xai-official. That is unconsented install-time takeover of a foreign AI CLI control surface.
Static reason
One or more suspicious static signals were detected.; source matched previously finalized malicious package; routed for review; source fingerprint signature matched known malicious package; routed for review
Trigger
npm install lifecycle postinstall.
Impact
A non-vendor package can replace the on-disk Grok CLI binary and installer settings in the user Grok home without a separate consent step.
Mechanism
postinstall.js decompresses the matching @kingingwang platform binary into ~/.grok/bin, rewrites ~/.grok/config.toml, and on npm replaces bin/grok with that native binary. The launcher still resolves @xai-official platform packages.
Policy narrative
Publishing this tree as @kingingwang/grok keeps an npm postinstall that the official CLI uses to stage its binary. On install the hook creates ~/.grok/bin, copies or brotli-decompresses a sibling native binary there, and rewrites ~/.grok/config.toml so cli.installer is npm. When the user agent is npm it also swaps the package bin/grok entry for that native file. The bootstrap script and README still name @xai-official/grok, so the write lands on the official Grok CLI control surface from a different scope.
Evidence
package.jsonbin/postinstall.js
bin/grok-bootstrap.js
~/.grok/bin/grok
~/.grok/config.toml
bin/grok
bin/grok-native
Decision evidence
public snapshot
AI identified this as a dangerous AI-agent capability at 88.0% confidence with low false-positive risk.
Avoid installing @kingingwang/grok@1.0.41-51ac69f5. 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, check your AI agents' configuration and instruction files (the files this report lists) for changes you did not make, and remove them. This finding does not by itself establish malware intent.