The automatically triggered postinstall deletes a consumer project’s .npmrc, which may contain user-managed registry configuration or credentials and is unrelated to the package’s framework setup. This is a concrete, unrequested destructive action, so the package should be blocked.
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; previous stored version diff introduced dangerous source
Trigger
Automatic npm postinstall when the consumer directory is recognized as a Drishti app.
Mechanism
The hook calls ensureConsumerPackage, which unlinks INIT_CWD/.npmrc if it exists.
Attack narrative
During npm installation, the package’s postinstall hook recognizes a Drishti app in the consumer directory, updates its package manifest, and deletes that directory’s .npmrc without confirmation. This can remove user-managed registry settings or authentication configuration. The source shows no transmission of the file’s contents.
Evidence
package.jsonscripts/postinstall.jsINIT_CWD/.npmrcINIT_CWD/package.json