registry  /  justcode-cli  /  0.1.6

justcode-cli@0.1.6

JustCode - an interactive terminal coding assistant CLI

AI Security Review

scanned 1d ago · by lpm-firewall-ai

The package is a thin npm launcher that retrieves and executes a remote prebuilt JustCode binary. Static JS inspection finds no direct malware, but the binary payload is staged outside the package and lacks checksum verification.

Static reason
One or more suspicious static signals were detected.
Trigger
npm postinstall or first justcode CLI run
Impact
Remote release binary gains execution as the CLI user; behavior cannot be verified from the package source alone.
Mechanism
download-and-spawn platform binary
Attack narrative
On install, postinstall calls ensureBinary, which builds a GitHub Releases URL from package.json and downloads the current platform executable into dist-bin, chmods it executable, and renames it into place. If install scripts are skipped, the bin launcher performs the same download on first run, then spawns that binary with user arguments.
Rationale
No concrete malicious behavior is present in the inspected package source, but the package stages an unpinned executable payload at install/runtime, so source-only review cannot establish the actual executed code is benign. This is a warning-level staged payload risk rather than a publish-blocking AI-agent hijack or confirmed malware.
Evidence
package.jsonscripts/postinstall.mjsscripts/lib/download-binary.mjsscripts/lib/platform.mjsbin/justcode.mjsdist-bin/justcode-${os}-${arch}${ext}dist-bin/justcode-${os}-${arch}${ext}.download
Network endpoints1
github.com/kingeke/justcode/releases/download/${tag}/${assetName()}

Decision evidence

public snapshot
AI called this Suspicious at 83.0% confidence as Dangerous Capability with medium false-positive risk.
Evidence for warning
  • package.json runs postinstall: node scripts/postinstall.mjs
  • scripts/lib/download-binary.mjs downloads a platform executable from GitHub Releases during postinstall or first CLI run
  • bin/justcode.mjs spawns the downloaded executable with inherited stdio
  • Downloaded binary is not integrity-pinned or bundled for static inspection
Evidence against
  • No source writes to foreign AI-agent control surfaces such as Claude/Codex/Cursor configs
  • No credential/env harvesting or exfiltration logic found in inspected JS files
  • Network destination is derived from the package's declared GitHub repository and version
  • postinstall supports JUSTCODE_SKIP_DOWNLOAD and does not fail install on download failure
  • prepare git hooksPath script is not part of the published files evidence and no .githooks files are present
Behavioral surface
Source
ChildProcessEnvironmentVarsFilesystemNetworkShell
Supply chain
UrlStrings
ManifestNo manifest risk signals triggered.
scanned 4 file(s), 5.59 KB of source, external domains: github.com

Source & flagged code

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

Package defines install-time lifecycle scripts.

package.jsonView on unpkg
scripts.postinstall = node scripts/postinstall.mjs
Medium
Ambiguous Install Lifecycle Script

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

package.jsonView on unpkg

Findings

1 High3 Medium4 Low
HighInstall Time Lifecycle Scriptspackage.json
MediumAmbiguous Install Lifecycle Scriptpackage.json
MediumNetwork
MediumEnvironment Vars
LowNon Install Lifecycle Scripts
LowScripts Present
LowFilesystem
LowUrl Strings