registry  /  @youdie006/swapdex  /  0.1.5

@youdie006/swapdex@0.1.5

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

AI Security Review

scanned 2h ago · by lpm-firewall-ai

The npm package installs an opaque platform binary from a package-owned GitHub release at postinstall, then exposes a JS shim that runs it on user command. Source JS does not show exfiltration or malicious install-time execution, but the reviewed npm tarball does not contain the binary source.

Static reason
One or more suspicious static signals were detected.
Trigger
npm install runs postinstall; user later runs swapdex CLI
Impact
Unverified native binary can later access local Claude/Codex credential files as part of the advertised account-switching function.
Mechanism
postinstall remote binary download and CLI shim execution
Rationale
This is not confirmed malicious from source inspection: the risky behavior is a disclosed, package-aligned native binary installer and user-invoked credential switcher, with no JS exfiltration or stealth behavior. Because install-time remote binary delivery leaves an opaque payload outside the reviewed tarball, it warrants a warning rather than clean or block.
Evidence
package.jsoninstall.jsbin/swapdex.jsREADME.mdbin/swapdexos.tmpdir()/swapdex-${target}.tar.gz
Network endpoints1
github.com/youdie006/swapdex/releases/download/v${version}/swapdex-${target}.tar.gz

Decision evidence

public snapshot
AI called this Suspicious at 86.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 tar.gz from GitHub releases during install
  • install.js extracts archive with tar into bin/ and chmods bin/swapdex executable
  • bin/swapdex.js later spawns the downloaded native binary with user argv
  • README describes managing Claude/Codex credential files containing refresh tokens
Evidence against
  • install.js fetch URL is package-aligned: github.com/youdie006/swapdex/releases
  • Downloaded binary is not executed during postinstall; only extracted and chmodded
  • No source-level credential harvesting or exfiltration endpoint is present in JS files
  • README discloses local credential switching and plaintext local store behavior
  • No obfuscation, eval/vm/Function, persistence, or AI-agent config mutation found in package 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