tier-management

Warn

Audited by Socket on Aug 6, 2026

2 alerts found:

AnomalySecurity
AnomalyLOW
scripts/check-user-balance.sh

No direct evidence of overt malware (e.g., backdoor/persistence/exfiltration to arbitrary domains) is present in this fragment. The dominant risks are (a) potential SQL injection/query manipulation via unsanitized USER_QUERY interpolation into an executed SQL command, (b) exposure of sensitive user data (including email) to stdout, and (c) runtime decryption/export of a Polar API token plus execution via npx/tsx (supply-chain/operational risk). Error suppression (2>/dev/null) further reduces detection capability.

Confidence: 66%Severity: 62%
SecurityMEDIUM
scripts/sync-d1-polar-balances.ts

No clear evidence of covert malware (no exfiltration/persistence/backdoor observed), but this module is security-critical due to high-impact, injection-prone design: it constructs D1 SQL via string interpolation with untrusted userId and executes it using execSync with `npx wrangler`. If an attacker can influence the stdin JSON, this can enable unauthorized database manipulation and potentially unsafe command/argument behavior. Logs also expose user identifiers and balance values. Require strict stdin validation and replace dynamic SQL/shell command construction with parameterized queries and safe exec argument handling.

Confidence: 78%Severity: 86%
Audit Metadata
Analyzed At
Aug 6, 2026, 04:54 PM
Package URL
pkg:socket/skills-sh/aiagentskills%2Fskills%2Ftier-management%2F@4ea91eeda14d76182433ee7a60f3aa8f16d36195f05cc1c46174abbc924d9110
Security Audit — socket — tier-management