Back to skill

Security audit

predictive-scaler

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local forecasting utility whose behavior matches its stated purpose, with one availability hardening issue around unbounded prediction sizes.

This appears safe to install as a local utility, but do not expose its prediction APIs directly to untrusted users without adding finite positive integer limits for horizon/steps and reasonable maximum input sizes.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
index.js:221
Finding

Unbounded Prediction Horizon Enables Synchronous Denial of Service

Content
View full analysis
Math.max(0, Math.min(1, x))); // Check minimum data points if (normalizedData.length < opts.minDataPoints) { return { error: `Insufficient data: need at least ${opts.minDataPoints} points, got ${normalizedData.length}`, recommendation: { action: ScalingAction.UNKNOWN, reason: 'Need more historical data' } }; } // Calculate predictions using multiple methods const linearResult = predictLinear(normalizedData, opts.horizon); const expResult = predictExponential(normalizedData, opts.horizon, opts.smoothingFactor); ``` Both prediction functions use the unchecked value as a synchronous loop bound: ```javascript function predictLinear(data, steps) { const { slope, intercept, r2 } = linearRegression(data); const predictions = []; for (let i = 0; i < steps; i++) { predictions.push(intercept + slope * (data.length + i)); } return { predictions, confidence: Math.max(0, Math.min(1, r2)) }; } ``` ```javascript function predictExponential(data, steps, factor = DEFAULT_OPTIONS.smoothingFactor) { const ema = exponentialMovingAverage(d ...[truncated 2826 chars]
Remediation
View remediation
MAX_PREDICTION_STEPS ) { throw new RangeError( `Prediction steps must be an integer between 1 and ${MAX_PREDICTION_STEPS}` ); } } function predictLinear(data, steps) { validatePredictionSteps(steps); const { slope, intercept, r2 } = linearRegression(data); const predictions = []; for (let i = 0; i < steps; i++) { predictions.push(intercept + slope * (data.length + i)); } return { predictions, confidence: Math.max(0, Math.min(1, r2)) }; } function predictExponential( data, steps, factor = DEFAULT_OPTIONS.smoothingFactor ) { validatePredictionSteps(steps); // Continue with prediction logic. } ``` The main `predict` function should validate `opts.horizon` before invoking either prediction method, while the validation inside each exported lower-level function should remain as defense in depth. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.