registry  /  @nalvietnam/avatar-cli  /  3.15.4

@nalvietnam/avatar-cli@3.15.4

AI harness CLI for NAL Vietnam engineering

Static Scan Results

scanned 6d ago · by rust-scanner

Static analysis flagged 16 finding(s) at 72.0% confidence. This version is warn-only unless an AI or security-team review confirms malicious behavior.

Static reason
One or more suspicious static signals were detected.

Decision evidence

public snapshot
Behavioral surface
Source
ChildProcessEnvironmentVarsFilesystemNetwork
Supply chain
HighEntropyStringsMinifiedObfuscatedUrlStrings
Manifest
NoLicense
scanned 4 file(s), 174 KB of source, external domains: accounts.google.com, ai.nal.vn, api.anthropic.com, cli.github.com, github.com, oauth2.googleapis.com, qpdbkewtpkkbcrptnlos.supabase.co, www.npmjs.com

Source & flagged code

6 flagged · loading source
package.jsonView file
scripts.postinstall = node ./bin/postinstall.js
High
Install Time Lifecycle Scripts

Package defines install-time lifecycle scripts.

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

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

package.jsonView on unpkg
dist/index.jsView file
1// @nalvietnam/avatar-cli — built with tsup L2: var ha=Object.defineProperty;var L=(t,e)=>()=>(t&&(e=t(t=0)),e);var Y=(t,e)=>{for(var n in e)ha(t,n,{get:e[n],enumerable:!0})};var xt={};Y(xt,{atomicSwapDir:()=>Dt,copyDirRecursive... L3: `,n)}async function dn(t,e,n=[]){await S(e);let r=await N.readdir(t,{withFileTypes:!0});for(let o of r){if(n.includes(o.name))continue;let s=mn(t,o.name),a=mn(e,o.name);if(o.isDire...
High
Child Process

Package source references child process execution.

dist/index.jsView on unpkg · L1
22`),plain:t=>process.stdout.write(`${t} L23: `)}});import{spawnSync as ic}from"child_process";function be(){let t=ic("gh",["api","user","--jq",".login"],{encoding:"utf8",stdio:["ignore","pipe","pipe"],timeout:1e4});if(t.signa... L24: `),new Kt(Mn(a),`T\u1EA1o repo ${o} th\u1EA5t b\u1EA1i.`)}return i.success(`\u0110\xE3 t\u1EA1o: git@github.com:${o}.git`),`git@github.com:${o}.git`}var Kt,Ln=L(()=>{"use strict";N... L25: `);let s=Mn(o);throw s==="name-exists"?new Gn(e):s==="no-permission"?new $t("no-permission",`Kh\xF4ng c\xF3 quy\u1EC1n t\u1EA1o repo ${e}. Ki\u1EC3m tra \u0111\u0103ng nh\u1EADp \u... L26: `),r=Ja("git",["credential","approve"],{input:n,encoding:"utf8",stdio:["pipe","pipe","pipe"]});return r.status===0?{ok:!0}:{ok:!1,error:(r.stderr||"").trim()||(r.error?.message??"g... L27: Ki\u1EC3m tra: \u0111ang login \u0111\xFAng GitHub account ch\u01B0a? (gh auth status)`);break;case"network":i.dim(" \u2192 L\u1ED7i m\u1EA1ng (m\u1EA5t k\u1EBFt n\u1ED1i / DNS / ...
High
Same File Env Network Execution

A single source file combines environment access, network access, and code or shell execution; review context before blocking.

dist/index.jsView on unpkg · L22
1// @nalvietnam/avatar-cli — built with tsup L2: var ha=Object.defineProperty;var L=(t,e)=>()=>(t&&(e=t(t=0)),e);var Y=(t,e)=>{for(var n in e)ha(t,n,{get:e[n],enumerable:!0})};var xt={};Y(xt,{atomicSwapDir:()=>Dt,copyDirRecursive... L3: `,n)}async function dn(t,e,n=[]){await S(e);let r=await N.readdir(t,{withFileTypes:!0});for(let o of r){if(n.includes(o.name))continue;let s=mn(t,o.name),a=mn(e,o.name);if(o.isDire... L4: `).filter(c=>c.trim().length>0)):n(new Error(`tar list exit ${a}: ${s.trim()}`))})})}function Sa(t,e){if(t.startsWith("/")||t.startsWith("~"))return!1;let n=mn(e,t),r=jr(e,n);retur... ... L16: `});var ut={};Y(ut,{REPOS_MANIFEST_RELATIVE:()=>io,addRepoToManifest:()=>he,readReposManifest:()=>fe,removeRepoFromManifest:()=>za,repoNameExists:()=>we});import{join as qa}from"pa... L17: `),await o.add("."),await o.commit("chore: initial commit (avatar add repo \u2014 d\u1EF1 \xE1n m\u1EDBi)").catch(()=>{}),await o.addRemote("origin",t.url).catch(()=>{}),await o.pu... L18: `),success:t=>process.stdout.write(`${p.green("\u2713")} ${t}
High
Command Output Exfiltration

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

dist/index.jsView on unpkg · L1
1// @nalvietnam/avatar-cli — built with tsup L2: var ha=Object.defineProperty;var L=(t,e)=>()=>(t&&(e=t(t=0)),e);var Y=(t,e)=>{for(var n in e)ha(t,n,{get:e[n],enumerable:!0})};var xt={};Y(xt,{atomicSwapDir:()=>Dt,copyDirRecursive... L3: `,n)}async function dn(t,e,n=[]){await S(e);let r=await N.readdir(t,{withFileTypes:!0});for(let o of r){if(n.includes(o.name))continue;let s=mn(t,o.name),a=mn(e,o.name);if(o.isDire... L4: `).filter(c=>c.trim().length>0)):n(new Error(`tar list exit ${a}: ${s.trim()}`))})})}function Sa(t,e){if(t.startsWith("/")||t.startsWith("~"))return!1;let n=mn(e,t),r=jr(e,n);retur... L5: `),r=zr(n,Jr),o=zr(n,Yr);if(r!==-1&&o!==-1&&r<o){let s=n.slice(0,r),a=n.slice(o+1);return{content:[...s,e.trimEnd(),...a].join(` ... L16: `});var ut={};Y(ut,{REPOS_MANIFEST_RELATIVE:()=>io,addRepoToManifest:()=>he,readReposManifest:()=>fe,removeRepoFromManifest:()=>za,repoNameExists:()=>we});import{join as qa}from"pa... L17: `),await o.add("."),await o.commit("chore: initial commit (avatar add repo \u2014 d\u1EF1 \xE1n m\u1EDBi)").catch(()=>{}),await o.addRemote("origin",t.url).catch(()=>{}),await o.pu... L18: `),success:t=>process.stdout.write(`${p.green("\u2713")} ${t} ... L2
Medium
Install Persistence

Source writes installer persistence such as shell profile or service configuration.

dist/index.jsView on unpkg · L1

Findings

4 High5 Medium7 Low
HighInstall Time Lifecycle Scriptspackage.json
HighChild Processdist/index.js
HighSame File Env Network Executiondist/index.js
HighCommand Output Exfiltrationdist/index.js
MediumAmbiguous Install Lifecycle Scriptpackage.json
MediumNetwork
MediumEnvironment Vars
MediumInstall Persistencedist/index.js
MediumStructural Risk Force Deep Review
LowNon Install Lifecycle Scripts
LowScripts Present
LowFilesystem
LowObfuscated
LowHigh Entropy Strings
LowUrl Strings
LowNo License