registry  /  @nalvietnam/avatar-cli  /  3.16.6

@nalvietnam/avatar-cli@3.16.6

⚠ Under review

AI harness CLI for NAL Vietnam engineering

Static Scan Results

scanned 3h ago · by rust-scanner

Static analysis flagged 16 finding(s) at 93.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.; previous stored version diff introduced dangerous source

Decision evidence

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

Source & flagged code

7 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
matchType = previous_version_dangerous_delta matchedPackage = @nalvietnam/avatar-cli@3.15.4 matchedIdentity = npm:QG5hbHZpZXRuYW0vYXZhdGFyLWNsaQ:3.15.4 similarity = 0.500 summary = stored previous version shares package body but lacks this dangerous source file
Critical
Previous Version Dangerous Delta

This package version adds a dangerous source file absent from the previous stored version; route for source-aware review.

dist/index.jsView on unpkg
7`),plain:t=>process.stdout.write(`${t} L8: `)}});var Et={};tt(Et,{atomicSwapDir:()=>qt,copyDirRecursive:()=>Mn,downloadFile:()=>On,ensureDir:()=>C,extractTarballToDir:()=>Ln,pathExists:()=>f,readJson:()=>A,readText:()=>H,re... L9: `,n)}async function Mn(t,e,n=[]){await C(e);let r=await M.readdir(t,{withFileTypes:!0});for(let o of r){if(n.includes(o.name))continue;let s=Se(t,o.name),a=Se(e,o.name);if(o.isDire...
High
Child Process

Package source references child process execution.

dist/index.jsView on unpkg · L7
9`,n)}async function Mn(t,e,n=[]){await C(e);let r=await M.readdir(t,{withFileTypes:!0});for(let o of r){if(n.includes(o.name))continue;let s=Se(t,o.name),a=Se(e,o.name);if(o.isDire... L10: `).filter(l=>l.trim().length>0)):r(new Error(`tar list exit ${c}: ${a.trim()}`))})});if(e.length>ho)throw new Error(`Tarball c\xF3 ${e.length} entries, v\u01B0\u1EE3t gi\u1EDBi h\u... L11: `),r=$o(n,Eo),o=$o(n,Ro);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(` ... L22: `});function zt(t){return t.length===0||t.startsWith("-")}function Ee(t){if(Dc.test(t))throw new Error(`Git URL ch\u1EE9a k\xFD t\u1EF1 kh\xF4ng h\u1EE3p l\u1EC7 (metachar/control-... L23: `),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... L24: `),new Qt(rr(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 Qt,or=R(()=>{"use strict";n... L25: `);let s=rr(o);throw s==="name-exists"?new ir(e):s==="no-permission"?new Nt("no-permission",`Kh\xF4ng c\xF3 quy\u
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 · L9
1// @nalvietnam/avatar-cli — built with tsup L2: var ic=Object.defineProperty;var R=(t,e)=>()=>(t&&(e=t(t=0)),e);var tt=(t,e)=>{for(var n in e)ic(t,n,{get:e[n],enumerable:!0})};var Tt,co,be,Bt=R(()=>{"use strict";Tt=".claude/avat... L3: `),success:t=>process.stdout.write(`${p.green("\u2713")} ${t} ... L7: `),plain:t=>process.stdout.write(`${t} L8: `)}});var Et={};tt(Et,{atomicSwapDir:()=>qt,copyDirRecursive:()=>Mn,downloadFile:()=>On,ensureDir:()=>C,extractTarballToDir:()=>Ln,pathExists:()=>f,readJson:()=>A,readText:()=>H,re... L9: `,n)}async function Mn(t,e,n=[]){await C(e);let r=await M.readdir(t,{withFileTypes:!0});for(let o of r){if(n.includes(o.name))continue;let s=Se(t,o.name),a=Se(e,o.name);if(o.isDire... L10: `).filter(l=>l.trim().length>0)):r(new Error(`tar list exit ${c}: ${a.trim()}`))})});if(e.length>ho)throw new Error(`Tarball c\xF3 ${e.length} entries, v\u01B0\u1EE3t gi\u1EDBi h\u...
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 ic=Object.defineProperty;var R=(t,e)=>()=>(t&&(e=t(t=0)),e);var tt=(t,e)=>{for(var n in e)ic(t,n,{get:e[n],enumerable:!0})};var Tt,co,be,Bt=R(()=>{"use strict";Tt=".claude/avat... L3: `),success:t=>process.stdout.write(`${p.green("\u2713")} ${t} ... L7: `),plain:t=>process.stdout.write(`${t} L8: `)}});var Et={};tt(Et,{atomicSwapDir:()=>qt,copyDirRecursive:()=>Mn,downloadFile:()=>On,ensureDir:()=>C,extractTarballToDir:()=>Ln,pathExists:()=>f,readJson:()=>A,readText:()=>H,re... L9: `,n)}async function Mn(t,e,n=[]){await C(e);let r=await M.readdir(t,{withFileTypes:!0});for(let o of r){if(n.includes(o.name))continue;let s=Se(t,o.name),a=Se(e,o.name);if(o.isDire... L10: `).filter(l=>l.trim().length>0)):r(new Error(`tar list exit ${c}: ${a.trim()}`))})});if(e.length>ho)throw new Error(`Tarball c\xF3 ${e.length} entries, v\u01B0\u1EE3t gi\u1EDBi h\u... L11: `),r=$o(n,Eo),o=$o(n,Ro);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(` ... L24: `),new Qt(rr(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}
Medium
Install Persistence

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

dist/index.jsView on unpkg · L1

Findings

1 Critical4 High5 Medium6 Low
CriticalPrevious Version Dangerous Deltadist/index.js
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
LowHigh Entropy Strings
LowUrl Strings
LowNo License