registry  /  @youdie006/swapdex  /  0.1.3

@youdie006/swapdex@0.1.3

Switch between multiple Claude Code and Codex login accounts, locally and safely.

AI Security Review

scanned 2d ago · by lpm-firewall-ai

The package has install-time network download and native binary installation, but the inspected JavaScript does not show concrete malicious behavior. Residual risk is the opaque downloaded binary that later runs via the CLI shim.

Static reason
One or more suspicious static signals were detected.
Trigger
npm install runs postinstall; user invoking swapdex runs bin/swapdex.js
Impact
Opaque native executable can access local credentials when user invokes the account-switching tool
Mechanism
version-pinned GitHub release binary download and CLI exec shim
Attack narrative
On install, install.js selects a supported platform, downloads a version-pinned release archive from GitHub, extracts a native swapdex binary into the package bin directory, and chmods it executable. The published JS shim later executes that binary with user arguments. The package source inspected here does not itself exfiltrate data or mutate agent control surfaces, but the binary payload is not present for source review.
Rationale
Static source inspection found a risky install-time binary downloader for a credential/account management CLI, but no confirmed malicious logic in the package JS. Because the executable payload is opaque and installed during lifecycle, this should warn rather than block absent concrete attack behavior.
Evidence
package.jsoninstall.jsbin/swapdex.jsbin/swapdexos.tmpdir()/swapdex-${target}.tar.gz
Network endpoints1
github.com/youdie006/swapdex/releases/download/v0.1.3/swapdex-${target}.tar.gz

Decision evidence

public snapshot
AI called this Suspicious at 74.0% confidence as Dangerous Capability with medium false-positive risk.
Evidence for warning
  • package.json defines postinstall: node install.js
  • install.js downloads a platform-specific tar.gz from GitHub releases and extracts bin/swapdex during npm install
  • bin/swapdex.js invokes the downloaded native binary with forwarded argv/stdio
Evidence against
  • No source code for the downloaded native binary is included in the npm package
  • install.js download URL is version-pinned to github.com/youdie006/swapdex/releases/download/v0.1.3
  • No credential harvesting or exfiltration logic appears in inspected JS source; package purpose is credential/account switching
  • No AI-agent config, MCP, shell startup, VCS hook, or autostart files are written by inspected source
Behavioral surface
Source
ChildProcessFilesystemNetwork
Supply chain
UrlStrings
ManifestNo manifest risk signals triggered.
scanned 2 file(s), 3.12 KB of source, external domains: github.com

Source & flagged code

2 flagged · loading source
package.jsonView file
scripts.postinstall = node install.js
High
Install Time Lifecycle Scripts

Package defines install-time lifecycle scripts.

package.jsonView on unpkg
scripts.postinstall = node install.js
Medium
Ambiguous Install Lifecycle Script

Install-time lifecycle script is not statically allowlisted and needs review.

package.jsonView on unpkg

Findings

1 High2 Medium3 Low
HighInstall Time Lifecycle Scriptspackage.json
MediumAmbiguous Install Lifecycle Scriptpackage.json
MediumNetwork
LowScripts Present
LowFilesystem
LowUrl Strings