Loading npm security reports…
Loading npm security reports…
@stacksjs/ts-cloud@0.16.73: Install hook abuse – flagged | LPM Firewall
npm / Install hook abuse / @stacksjs/ts-cloud / 0.16.73
@stacksjs/ts-cloud@0.16.73 A lightweight, performant infrastructure-as-code library and CLI for deploying both server-based (EC2) and serverless applications.
Flagged — allowed with a warning
Allowed by default policy, but 31 findings warrant review before installing.
AI security reviewscanned on Oct 29, 2026, 19:41 UTC · by lpm-firewall-ai The package's own install behavior does not show a clear attack, but its runtime dependency runs a postinstall command that may set up persistent Git hooks unrelated to XML parsing. This merits a warning rather than a malicious verdict because the hook tool's exact effects are not established by the available source.
Static reason
High-risk behavior combination matched malicious policy.
Trigger
Installing this package when its @stacksjs/ts-xml dependency's postinstall script runs.
Impact
This may install persistent Git hooks that run commands on later commits; the source does not establish exactly where the hook tool writes them.
Mechanism
The dependency runs `bunx git-hooks` and includes configuration for commit-time linting, auto-restaging, and a commit-msg hook.
Evidence
.lpm-dependency-evidence-af86473d-797e-4b15-9f4d-0f686e3f3a89/0/npm-linux/package.json package.json
public snapshot
Evidence for warning
The package depends on @stacksjs/ts-xml at runtime. That dependency runs `bunx git-hooks` from its postinstall script. The dependency configures pre-commit linting with auto-restaging and a commit-msg hook, so installation may set up persistent Git hooks. The package's own prepublishOnly script runs a build. Evidence against
I found no confirmed credential exfiltration or unrelated collector in the examined package code. The flagged shell and notification code is consistent with configured infrastructure deployment features. Behavioral surface
Source Child process · Crypto · Dynamic require · Environment variables · Eval · Filesystem · Network · Shell · Web socket
Supply chain High entropy strings · Minified · Possible obfuscation · URL strings
Manifest No manifest risk signals triggered.
Scanned 126 files · 7.63 MB of source
50 external domains referenced
127.0.0.1 169.254.169.254 169.254.170.2 acme-staging-v02.api.letsencrypt.org acme-v02.api.letsencrypt.org analytics.stacksjs.com api.bitbucket.org api.cloudflare.com api.github.com api.godaddy.com api.hetzner.cloud api.machines.dev api.ote-godaddy.com api.porkbun.com api.telegram.org aws.amazon.com awscli.amazonaws.com bitbucket.org bun.sh caddyserver.com cloudfront.amazonaws.com console.aws.amazon.com cve.mitre.org deb.nodesource.com deno.land dl.cloudsmith.io fcm.googleapis.com fonts.googleapis.com gitea.com github.com gitlab.com iid.googleapis.com in-toto.io json-schema.org local.invalid localtunnel.dev media.invalid my.1password.com nodejs.org oauth2.googleapis.com raw.githubusercontent.com route53.amazonaws.com rpm.nodesource.com rpms.remirepo.net s3.amazonaws.com secretsmanager.us-east-1.amazonaws.com slsa.dev sqs.us-east-1.amazonaws.com stacksjs.com sts.amazonaws.com Findings8 critical · 10 high · 7 medium · 6 low Source & flagged code23 flagged Critical Critical secret
Package contains a critical-looking secret pattern.
dist/bin/chunk-maes42nn.js View on unpkg · L134 Critical Secret pattern
RSA private key in dist/bin/chunk-maes42nn.js
dist/bin/chunk-maes42nn.js View on unpkg · L134 Shared code excerpt · 2 findings · 3 lines 134 patternName = private_key_rsa
severity = critical
line = 134
Critical Secret pattern
EC private key in dist/bin/chunk-maes42nn.js
dist/bin/chunk-maes42nn.js View on unpkg · L134 Code excerpt · 3 lines 134 patternName = private_key_ec
severity = critical
line = 134
Critical Secret pattern
OpenSSH private key in dist/bin/chunk-maes42nn.js
dist/bin/chunk-maes42nn.js View on unpkg · L134 Code excerpt · 3 lines 134 patternName = private_key_openssh
severity = critical
line = 134
High Child process
Package source references child process execution.
dist/chunk-1np2k92z.js View on unpkg · L123 Code excerpt · 3 lines 123 `)){if(!r.startsWith("TSCLOUD_SYSTEMD\t"))continue;let[,a,u,f,h,b,S,y,k,R,D,O,M,z]=r.split("\t");if(!a||!/^[A-Za-z0-9_.@:-]+\.service$/.test(a))continue;t.push({unit:a,load:u,activ...
124 [output truncated]`}function Sd(e){return{success:!1,instanceCount:0,perInstance:[],error:e instanceof Error?e.message:String(e)}}function jn(e){return` '${e.replaceAll("' ",`'" '"' `)...
125 `).filter(Boolean).slice(-a).map((k)=>{let R=/^(\d{4}-\d{2}-\d{2}T\S+)\s+(.*)$/.exec(k);return{timestamp:R?.[1],message:R?.[2]??k}});return{workloadId:e,provider:r.provider,lines:y...
Low Weak crypto
Package source references weak cryptographic algorithms.
dist/chunk-1np2k92z.js View on unpkg · L1 Code excerpt · 5 lines Critical Same file environment network execution
A single source file combines environment access, network access, and code or shell execution with blocking evidence.
dist/bin/chunk-0sa000g6.js View on unpkg · L128 Code excerpt · 7 lines 128 const { readFileSync, writeFileSync } = require ('node:fs' )
129 const currentPath = process.env.TS_CLOUD_RPX_CURRENT_FRAGMENT
130 const candidatePath = process.env.TS_CLOUD_RPX_CANDIDATE_FRAGMENT
⋯
137 writeFileSync (candidatePath, JSON.stringify (candidate, null , 2 ) + '\\n' , { mode: 0o600 })
138 `.trim();return[` __tsc_fragment_candidate="$(mktemp " ${e}.candidate.XXXXXX")" `,` cat > "$__tsc_fragment_candidate" << [ -f ${...
High Eval
Package source references dynamic code evaluation.
dist/ui/_stx/runtime.dbee66d1.js View on unpkg · L1 Code excerpt · 1 line 1 if (!window.__stx_early_mounts)window.__stx_early_mounts=[];if (!window.__stx_early_destroys)window.__stx_early_destroys=[];if (!window.onMount)window.onMount=function (fn){window.__st...
dist/ui/_stx/router.229f89ab.js#virtual:normalized:round1 View file Medium Dynamic require
Package source references dynamic require/import behavior.
dist/ui/_stx/router.229f89ab.js#virtual:normalized:round1 View on unpkg · L3 Code excerpt · 2 lines 3 `+newBlocks.join(`
4 `);return null};function getContainer(){return document.querySelector(containerSel)||document.querySelector("[data-stx-content]")||document.querySelector("main")};var layoutCache={...
High Credential redirect persistence
Manifest-reachable source sends a prompted API credential to a fixed unofficial gateway and persists the redirection.
dist/bin/cli.js View on unpkg Scanner record · 4 lines Manifest-reachable source captures an API credential, sends it to a fixed unofficial gateway, and persists that redirection in agent or shell configuration.
dist/bin/cli.jsimport{C,Wt,n,r,a,_r,e,u,i,s,I,d,Wo,c,Sn,Ee,na,ia,oa,sa,f}from"./chunk-1c91h57k.js";import{ma,H,Fr,A,U,Xo,l,o,T,fa,ha,ya,$e,ze,ot,Yo,wn,Fi,An,Zo,Ca,Ta,Ea,wa,Ra,j,b,M,st,N,ye,ts,Ge,...
`),_i.exit(R.exitCode??2)}async runMatchedCommand(){let{args:R,options:t,matchedCommand:m}=this;if(!m||!m.commandAction)return;m.checkUnknownOptions(),m.checkOptionValue(),m.checkR...
3. Run 'cloud deploy' to deploy your infrastructure`,"green")}),R.command("init:server","Initialize server-based (EC2) project").action(async()=>{i("Initializing Server-Based Proje...
`));let z=k.service.plan({projectId:k.controlPlane.project.id,scope:rr(k,m
High Trigger reachable command output exfiltration
A manifest entrypoint or package-local install chain reaches command-output exfiltration behavior.
dist/bin/cli.js View on unpkg · L355 Code excerpt · 4 lines Trigger-reachable command-output exfiltration chain: manifest.bin -> dist/bin/cli.js
High Cloud metadata access
Source reaches cloud instance metadata or link-local credential endpoints.
dist/chunk-e32qtz2d.js View on unpkg · L1 Code excerpt · 10 lines 1 import {k,na}from "./chunk-928z0h9b.js" ;import {hn,it}from "./chunk-tdhm38cg.js" ;var Nm={};hn (Nm,{default :()=>Rr,handler:()=>At});var Bm={};hn (Bm,{default :()=>Pr,handler:()=>Ct});var E...
2 ${this .convertToYAML (u,i+1 )}`;else if(Array.isArray(u)){o+=` ${s}${c}:
⋯
5 `}else o+=` ${s}${c}: ${u}
6 `}return o}}var x={Ref:(n)=>({Ref:n}),GetAtt:(n,i)=>({"Fn::GetAtt":[n,i]}),Sub:(n,i)=>{if(i)return{"Fn::Sub":[n,i]};return{"Fn::Sub":n}},Join:(n,i)=>({"Fn::Join":[n,i]}),Select:(n,...
Critical Trigger reachable dangerous capability
A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.
dist/chunk-f4h7bn7y.js View on unpkg · L1 Code excerpt · 5 lines Trigger-reachable chain: manifest.module -> dist/index.js -> dist/chunk-f4h7bn7y.js
1 import {il,Q,l,g,C,Ye,Ji,w,ce,m,de,ln,Pt,kt,pr,mr,Zi}from "./chunk-e32qtz2d.js" ;import {o}from "./chunk-1y1b1jy0.js" ;import {U,jr,d}from "./chunk-78xspqp6.js" ;import {po,dd,Cp,Ep,B,rr,j,z...
2 `),a=Math.max(1,s-12),c=Math.min(i.length,s+2),u=i.slice(a-1,c).map((f,h)=>{let S=a+h,v=/^[A-Z_][A-Z0-9_]*=/.test(f)?f.replace(/=.*/,"=<redacted>"):f;return` ${String (S).padStart (...
⋯
10 `)}\r
11 `,c=Xi(a);return{host:` mta-sts.${t} v=STSv1; id=${c} policy = ${JSON. (e.body)} port: ${...
dist/bin/chunk-9362t52n.js#virtual:normalized:round1 View file High Semantic analysis limited
A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.
dist/bin/chunk-9362t52n.js#virtual:normalized:round1 View on unpkg Scanner record · 1 line stage = ast_semantic_analysis; reason = ast_parse_error; limitedFiles = 9
Medium Secret pattern
Hardcoded password in dist/bin/chunk-efafd6hw.js
dist/bin/chunk-efafd6hw.js View on unpkg · L6 Code excerpt · 3 lines 6 patternName = generic_password
severity = medium
line = 6
↓
Package metadata 8 findings
Medium Network
Medium Environment variables
Medium Structural risk force deep review
Low Non install lifecycle scripts
import {nl,Q,l,sl,K,g,ce,m,lr,cl,Xi,Vo,gl,fl,hl,$l,pn,ns,Ar,Ml,Fl,ql,jl}from "./chunk-e32qtz2d.js" ;import {be,nr,x,ir,s,Li,So,Wr,Td,wd,ae,c,Co,Je,Jr,Rd,vo,Dd,Xr,To,sr,Yr,Fi,cr,Gi,Vi,X...
2 `);for(let O of D)if(O.trim()&&!O.includes(h))console.error(this.formatConsoleMessage({timestamp:u,message:Nt.gray(` ${O}`),level:e,showTimestamp:!1}))}break}}else if(!Gt()){if(co...
59 `;for(let a of e)r+=` | \`${a.key}\` | ${a.type} | ${a.description} | \`${a.example}\` |
60 `;return r}}function RI(e,t,r={}){return Kh(e,t,r,new WeakMap)}function Kh(e,t,r,a){let{arrayMergeMode:u="replace",skipNullish:f=!1,customMerger:h}=r;if(t===null||t===void 0)return...
61 VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`,[a,e.actorId,t,r??null,e.emailVerified&&r?u:null,e.passwordHash,e.requiresPasswordUpgrade?1:0,u,u
'${r}'
`,t,r,'chmod 0600 "$__tsc_fragment_candidate"',`
if
139 `),N=["[Unit]",` Description=Issue/renew rpx gateway TLS certs for ${m} (${B})`,` After=network-online.target ${we}`,"Wants=network-online.target","","[Service]","Type=oneshot",` Exec...
140 `),I=["[Unit]",` Description=Daily rpx gateway TLS cert issuance/renewal for ${m}`,"","[Timer]","OnCalendar=*-
Critical Credential exfiltration
Source appears to send environment or credential material to an external endpoint.
dist/bin/chunk-0sa000g6.js View on unpkg · L1 Critical Command output exfiltration
Source executes local commands and sends command output to an external endpoint.
dist/bin/chunk-0sa000g6.js View on unpkg · L1 Medium Install persistence
Source writes installer persistence such as shell profile or service configuration.
dist/bin/chunk-0sa000g6.js View on unpkg · L1 Shared code excerpt · 3 findings · 6 lines 1 import {p}from "./chunk-9cj1fm00.js" ;import {pa,R,A,ne,jr,ga,Jo,le,U,T,Zt,Vr}from "./chunk-27t4ve22.js" ;import {v}from "./chunk-rg6r03q3.js" ;import {Q}from "./chunk-whryzwb7.js" ;import {g}f...
2 `),o=Math.max(1,s-12),a=Math.min(i.length,s+2),c=i.slice(o-1,a).map((l,u)=>{let d=o+u,m=/^[A-Z_][A-Z0-9_]*=/.test(l)?l.replace(/=.*/,"=<redacted>"):l;return` ${String (d).padStart (...
⋯
8 ${Ha (a)}`:c}),s=r.length-n.length,i=s>0?[` (+${s} more instance${s===1 ?"" :"s" } failed)`]:[];return[t,...n,...i].join(`
9 `)}function Ua(e){return` /etc/ts-cloud/${e}-upgrade.env`}function Ma(e){return` ${e}-upgrade`}function go(e){if(!e||e.length===0)return[];let t=["mkdir -p /etc/ts-cloud"],r=[];for(l...
10 $ (free -m | awk '/^Mem:/{total=$2; used=$3} /^Swap:/{print total, used, $2, $3}' )
11 EOF`,'DISK_PCT=0;
High Shell
Package source references shell execution.
dist/bin/chunk-0sa000g6.js View on unpkg · L8 Code excerpt · 3 lines 8 ${Ha (a)}`:c}),s=r.length-n.length,i=s>0?[` (+${s} more instance${s===1 ?"" :"s" } failed)`]:[];return[t,...n,...i].join(`
9 `)}function Ua(e){return` /etc/ts-cloud/${e}-upgrade.env`}function Ma(e){return` ${e}-upgrade`}function go(e){if(!e||e.length===0)return[];let t=["mkdir -p /etc/ts-cloud"],r=[];for(l...
10 $ (free -m | awk '/^Mem:/{total=$2; used=$3} /^Swap:/{print total, used, $2, $3}' )
High Cross file remote execution context
Source spawns a local helper that also contains network and dynamic execution context; review data flow before blocking.
dist/bin/chunk-0sa000g6.js View on unpkg · L1 Code excerpt · 4 lines Cross-file remote execution chain: dist/bin/chunk-0sa000g6.js spawns dist/bin/chunk-27t4ve22.js; helper contains network access plus dynamic code execution.
1 import {p}from "./chunk-9cj1fm00.js" ;import {pa,R,A,ne,jr,ga,Jo,le,U,T,Zt,Vr}from "./chunk-27t4ve22.js" ;import {v}from "./chunk-rg6r03q3.js" ;import {Q}from "./chunk-whryzwb7.js" ;import {g}f...
2 `),o=Math.max(1,s-12),a=Math.min(i.length,s+2),c=i.slice(o-1,a).map((l,u)=>{let d=o+u,m=/^[A-Z_][A-Z0-9_]*=/.test(l)?l.replace(/=.*/,"=<redacted>"):l;return` ${String (d).padStart (...
⋯
8 ${Ha (a)}`:c}),s=r.length-n.length,i=s>0?[` (+${s} more instance${s===1 ?"" :"s" } failed)`]:[];return[t,...n,...i].join(`
9 `)}function Ua(e){return` /etc/ts-cloud/${e}-upgrade.env`}function Ma(e){return` ${e}-upgrade`}function go(e){if(!e||e.length===0)return[];
355 Total: ${fn (se)} across ${ne.length} service${ne.length===1 ?"" :"s" }`),X.lastCacheAgeSeconds!==null)e(` (cached, ${X.lastCacheAgeSeconds}s old — pass --no-cache to refresh)`);if((ne....
356 S3 has spend but listBuckets returned 0 . The buckets are likely owned by a different account in your AWS Organization (consolidated billing rolls up to the payer account, but ListB...
357 Wrote ${le}`)}}),R.command("cost:cache:clear","Wipe the local Cost Explorer response cache").option("--all","Wipe entries for every profile (default: just the current profile)").ac...
⋯
362 Known monthly savings: ${k.savingsAvailable?fn (P):"unavailable (enable CUR resource IDs)" }`)}for(let P of k.inventory.warnings)a(P)}cat
7 `),n.summary.totalChanges===0)return i.push(` No changes detected.
60 HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \\
61 CMD curl -f http://localhost:${o}${u} || exit 1
64 CMD ["bun" , "run" , "${s}" ]
65 `,A}static generateDockerBuildCommands(n){let{repositoryUri:i,t
`,body:a,id:c,txt:`
`}}var _g=8461;function Fh(e,t=_g){return[`
const
stringify
`,"Bun.serve({",`
12 `)}var Ot={php:"php.net",nginx:"nginx.org",composer:"getcomposer.org",mysql:"mysql.com",mariadb:"mariadb.com/server",postgres:"post
High Trigger reachable credential exfiltration
A manifest entrypoint or package-local install chain reaches credential exfiltration behavior.
dist/chunk-f4h7bn7y.js View on unpkg · L1 Code excerpt · 5 lines Trigger-reachable credential exfiltration chain: manifest.module -> dist/index.js -> dist/chunk-f4h7bn7y.js
1 import {il,Q,l,g,C,Ye,Ji,w,ce,m,de,ln,Pt,kt,pr,mr,Zi}from "./chunk-e32qtz2d.js" ;import {o}from "./chunk-1y1b1jy0.js" ;import {U,jr,d}from "./chunk-78xspqp6.js" ;import {po,dd,Cp,Ep,B,rr,j,z...
2 `),a=Math.max(1,s-12),c=Math.min(i.length,s+2),u=i.slice(a-1,c).map((f,h)=>{let S=a+h,v=/^[A-Z_][A-Z0-9_]*=/.test(f)?f.replace(/=.*/,"=<redacted>"):f;return` ${String (S).padStart (...
⋯
10 `)}\r
11 `,c=Xi(a);return{host:` mta-sts.${t}`,body:a,id:c,txt:` v=STSv1; id=${c}`}}var _g=8461;function Fh(e,t=_g){return[` const policy = ${JSON.stringify (e.body)}`,"Bun.serve({",` port: ${...
12 `)}var Ot={php:"php.net",nginx:"nginx.org",composer:"getcomposer.org",mysql:"mysql.com",mariadb:"mariadb.co
High Trigger reachable persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
dist/chunk-f4h7bn7y.js View on unpkg · L1 Code excerpt · 5 lines Trigger-reachable persistence chain: manifest.module -> dist/index.js -> dist/chunk-f4h7bn7y.js
1 import {il,Q,l,g,C,Ye,Ji,w,ce,m,de,ln,Pt,kt,pr,mr,Zi}from "./chunk-e32qtz2d.js" ;import {o}from "./chunk-1y1b1jy0.js" ;import {U,jr,d}from "./chunk-78xspqp6.js" ;import {po,dd,Cp,Ep,B,rr,j,z...
2 `),a=Math.max(1,s-12),c=Math.min(i.length,s+2),u=i.slice(a-1,c).map((f,h)=>{let S=a+h,v=/^[A-Z_][A-Z0-9_]*=/.test(f)?f.replace(/=.*/,"=<redacted>"):f;return` ${String (S).padStart (...
⋯
10 `)}\r
11 `,c=Xi(a);return{host:` mta-sts.${t}`,body:a,id:c,txt:` v=STSv1; id=${c}`}}var _g=8461;function Fh(e,t=_g){return[` const policy = ${JSON.stringify (e.body)}`,"Bun.serve({",` port: ${...
12 `)}var Ot={php:"php.net",nginx:"nginx.org",composer:"getcomposer.org",mysql:"mysql.com",mariadb:"mariadb.com/server",po
Medium Secret pattern
Hardcoded password in dist/chunk-f4h7bn7y.js
dist/chunk-f4h7bn7y.js View on unpkg · L17 Code excerpt · 3 lines 17 patternName = generic_password
severity = medium
line = 17