registry  /  @sreetej510/pi-usage  /  0.1.8

@sreetej510/pi-usage@0.1.8

Pi extension that reports provider usage/rate-limit budgets (Codex, Anthropic OAuth, etc.) via /usage, with an optional statusline widget.

Static Scan Results

scanned 3h ago · by rust-scanner

Static analysis flagged 9 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
EnvironmentVarsNetwork
Supply chain
HighEntropyStringsMinifiedUrlStrings
ManifestNo manifest risk signals triggered.
scanned 1 file(s), 32.9 KB of source, external domains: api.anthropic.com, chatgpt.com

Source & flagged code

2 flagged · loading source
dist/index.jsView file
1import{homedir as gr}from"node:os";import{join as xr}from"node:path";var yt="usage",Oe="openai-codex",Ie="anthropic",Ae="https://chatgpt.com/backend-api/wham/usage",At="https://cha... L2: `)}function Ot(e,r){let t=Er(e,r);if(!t)return"usage unavailable";let n=[Mr(t)];return t.primary&&n.push(`${v(t.primary.usedPercent).toFixed(0)}% 5h`),t.secondary&&n.push(`${v(t.se... ... L11: `);for(let t of e.credits){let n=t.status?` [${t.status}]`:"",o=t.grantedAt?`granted ${tt(t.grantedAt)}`:void 0,i=t.expiresAt?`expires ${tt(t.expiresAt)}`:void 0,d=[o,i].filter(Boo... L12: `)}function nt(e){let r=e.expiresAt?`expires ${tt(e.expiresAt)}`:"no expiry shown";return`${e.id} \u2014 ${r}`}function tt(e,r=!0){let t=new Date(e);if(Number.isNaN(t.getTime()))re... L13: `),d}notify(r){let t=this.child;t?.stdin.writable&&t.stdin.write(`${JSON.stringify({method:r})} L14: `)}dispose(){for(let[t,n]of this.pending)n.reject(new Error(`codex app-server request ${t} cancelled.`));this.pending.clear();let r=this.child;r&&(r.stdin.end(),r.killed||r.kill(),...
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 · L1
1import{homedir as gr}from"node:os";import{join as xr}from"node:path";var yt="usage",Oe="openai-codex",Ie="anthropic",Ae="https://chatgpt.com/backend-api/wham/usage",At="https://cha... L2: `)}function Ot(e,r){let t=Er(e,r);if(!t)return"usage unavailable";let n=[Mr(t)];return t.primary&&n.push(`${v(t.primary.usedPercent).toFixed(0)}% 5h`),t.secondary&&n.push(`${v(t.se... ... L9: L10: `)}function Ze(e){let r=e.trimStart();if(r==="")return[...je];let t=/\s$/.test(r),n=r.trimEnd().split(/\s+/).filter(Boolean),o=n.at(-1);if(o==="--timeout"&&t||o==="--consume-banked... L11: `);for(let t of e.credits){let n=t.status?` [${t.status}]`:"",o=t.grantedAt?`granted ${tt(t.grantedAt)}`:void 0,i=t.expiresAt?`expires ${tt(t.expiresAt)}`:void 0,d=[o,i].filter(Boo... L12: `)}function nt(e){let r=e.expiresAt?`expires ${tt(e.expiresAt)}`:"no expiry shown";return`${e.id} \u2014 ${r}`}function tt(e,r=!0){let t=new Date(e);if(Number.isNaN(t.getTime()))re... L13: `),d}notify(r){let t=this.child;t?.stdin.writable&&t.stdin.write(`${JSON.stringify({method:r})}
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

Findings

2 High3 Medium4 Low
HighSame File Env Network Executiondist/index.js
HighCommand Output Exfiltrationdist/index.js
MediumNetwork
MediumEnvironment Vars
MediumStructural Risk Force Deep Review
LowNon Install Lifecycle Scripts
LowScripts Present
LowHigh Entropy Strings
LowUrl Strings