registry  /  usrcp-imessage  /  0.2.2

usrcp-imessage@0.2.2

iMessage capture+reader adapter for USRCP — macOS-only, shells out to steipete/imsg for chat.db access

AI Security Review

scanned 2h ago · by lpm-firewall-ai

No confirmed malicious attack surface. The package is a macOS iMessage adapter that, when user-run, reads allowlisted iMessage chats via imsg, stores events in USRCP ledger/stream, and calls Anthropic for summaries/replies.

Static reason
High-risk behavior combination matched malicious policy.
Trigger
npm install runs native rebuild; user running usrcp-imessage starts message capture
Impact
Privacy-sensitive runtime behavior is documented and user-configured; install hook is noisy but scoped to native dependency rebuild.
Mechanism
package-aligned local adapter with Anthropic LLM calls
Rationale
Static inspection shows a documented iMessage/USRCP adapter with scoped install-time native rebuild cleanup and user-invoked runtime capture/reply behavior. No unconsented AI-agent control-surface mutation, persistence, credential exfiltration, or remote code execution was found.
Evidence
package.jsondist/index.jsdist/setup.jsdist/config.jsdist/capture.jsdist/stream-capture.jsdist/llm.jsREADME.mdnode_modules/better-sqlite3/buildnode_modules/usrcp-core/node_modules/better-sqlite3/buildnode_modules/usrcp-stream/node_modules/better-sqlite3/build~/.usrcp/imessage-config.json
Network endpoints2
console.anthropic.com/account/keys@anthropic-ai/sdk API

Decision evidence

public snapshot
AI called this Clean at 86.0% confidence as Benign with low false-positive risk.
Evidence for block
  • package.json postinstall deletes better-sqlite3 build dirs and runs npm rebuild at install time
  • dist/index.js spawns imsg watch and can send replies via imsg send at runtime
  • dist/setup.js validates Anthropic API keys and runtime dist/llm.js sends message content to Anthropic API
Evidence against
  • postinstall is limited to better-sqlite3 native rebuild paths under node_modules; no foreign AI-agent or persistence surface writes found
  • dist/index.js only starts watcher when run as CLI entrypoint, not on import
  • iMessage capture/reply is gated by local config allowlisted_chats and user setup
  • Config writes are package-aligned via usrcp-adapter-kit imessage-config.json; no credential harvesting beyond prompted Anthropic key
  • No suspicious remote payload loading, eval/vm, broad filesystem harvesting, or hardcoded exfiltration endpoints found
Behavioral surface
Source
ChildProcessEnvironmentVars
Supply chain
UrlStrings
ManifestNo manifest risk signals triggered.
scanned 7 file(s), 48.8 KB of source, external domains: console.anthropic.com

Source & flagged code

3 flagged · loading source
package.jsonView file
scripts.postinstall = node -e "const fs=require(\"fs\"); for (const p of [\"node_modules/better-sqlite3/build\",\"node_modules/usrcp-core/node_modules/better-sqlite3/build\",\"node_modules/usrcp-stream/...
Critical
Red Install Lifecycle Script

Install-time lifecycle script matches a deterministic static-gate block pattern.

package.jsonView on unpkg
scripts.postinstall = node -e "const fs=require(\"fs\"); for (const p of [\"node_modules/better-sqlite3/build\",\"node_modules/usrcp-core/node_modules/better-sqlite3/build\",\"node_modules/usrcp-stream/...
High
Install Time Lifecycle Scripts

Package defines install-time lifecycle scripts.

package.jsonView on unpkg
dist/setup.jsView file
197package = usrcp-imessage; repositoryIdentity = usrcp; dependency = @anthropic-ai/sdk L197: try { L198: const { default: Anthropic } = await import("@anthropic-ai/sdk"); L199: const client = new Anthropic({ apiKey });
High
Copied Package Dependency Bridge

Package metadata claims a different repository identity while copied source loads a runtime dependency bridge.

dist/setup.jsView on unpkg · L197

Findings

1 Critical2 High2 Medium2 Low
CriticalRed Install Lifecycle Scriptpackage.json
HighInstall Time Lifecycle Scriptspackage.json
HighCopied Package Dependency Bridgedist/setup.js
MediumEnvironment Vars
MediumStructural Risk Force Deep Review
LowScripts Present
LowUrl Strings