registry  /  usrcp-discord  /  0.2.1

usrcp-discord@0.2.1

Discord capture+reader adapter for USRCP — vision-proof cross-channel memory

AI Security Review

scanned 3d ago · by lpm-firewall-ai

No confirmed malicious attack surface was established by source inspection. The install hook rebuilds a native dependency and runtime behavior is a Discord adapter that captures/replies to messages using configured credentials.

Static reason
High-risk behavior combination matched malicious policy.
Trigger
npm install postinstall; user running usrcp-discord
Impact
Potential install fragility from rebuild; expected Discord/Anthropic network activity during runtime
Mechanism
native dependency rebuild and user-configured Discord bot runtime
Rationale
The high-risk primitives are either lifecycle native rebuild maintenance or explicit runtime adapter behavior and are not paired with credential harvesting, hidden exfiltration, persistence, or install-time payload execution. The package should not be blocked based on the inspected sources.
Evidence
package.jsondist/index.jsnode_modules/better-sqlite3/buildnode_modules/usrcp-core/node_modules/better-sqlite3/buildnode_modules/usrcp-stream/node_modules/better-sqlite3/build~/.usrcp/discord-config.json
Network endpoints2
Discord API via discord.jsAnthropic API via @anthropic-ai/sdk

Decision evidence

public snapshot
AI called this Clean at 82.0% confidence as Benign with medium false-positive risk.
Evidence for block
  • package.json defines a postinstall that deletes better-sqlite3 build directories and runs npm rebuild better-sqlite3.
  • dist/index.js uses execSync only for user-invoked --reset-config to run 'usrcp setup --adapter=discord'.
  • dist/index.js logs into Discord using configured token and reads USRCP_PASSPHRASE for the local ledger.
Evidence against
  • No import-time execution: dist/index.js calls main only when require.main === module.
  • Network use is package-aligned: discord.js bot login/replies and Anthropic SDK use configured user credentials.
  • Config and credentials are loaded from local USRCP config/env for declared Discord adapter behavior.
  • No code found that harvests arbitrary files, exfiltrates secrets, persists, or mutates AI-agent control surfaces in inspected entrypoint/manifest.
Behavioral surface
Source
ChildProcessEnvironmentVarsNetwork
Supply chain
UrlStrings
ManifestNo manifest risk signals triggered.
scanned 7 file(s), 39.8 KB of source, external domains: console.anthropic.com, discord.com

Source & flagged code

5 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/index.jsView file
15exports.resolveMode = resolveMode; L16: const node_child_process_1 = require("node:child_process"); L17: const discord_js_1 = require("discord.js");
High
Child Process

Package source references child process execution.

dist/index.jsView on unpkg · L15
dist/setup.jsView file
46exports.runDiscordSetup = runDiscordSetup; L47: const https = __importStar(require("node:https")); L48: const node_child_process_1 = require("node:child_process"); L49: const config_js_1 = require("./config.js"); ... L55: return new Promise((resolve) => { L56: process.stderr.write(prompt); L57: const stdin = process.stdin;
High
Command Output Exfiltration

Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.

dist/setup.jsView on unpkg · L46
169package = usrcp-discord; repositoryIdentity = usrcp; dependency = @anthropic-ai/sdk L169: try { L170: const { default: Anthropic } = await import("@anthropic-ai/sdk"); L171: 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 · L169

Findings

1 Critical4 High3 Medium2 Low
CriticalRed Install Lifecycle Scriptpackage.json
HighInstall Time Lifecycle Scriptspackage.json
HighChild Processdist/index.js
HighCommand Output Exfiltrationdist/setup.js
HighCopied Package Dependency Bridgedist/setup.js
MediumNetwork
MediumEnvironment Vars
MediumStructural Risk Force Deep Review
LowScripts Present
LowUrl Strings