T09 · Insecure Skill Coding Practices
- Location
engine/router.js:217- Finding
Unbounded Schedule Parameters Allow Resource-Exhaustion Denial of Service
- Content
View full analysis
- Remediation
View remediation
max ) { throw new TypeError( `${name} must be an integer between ${min} and ${max}` ); } return candidate; } async function runDecisionEngine(request) { try { if (!request || typeof request !== 'object' || Array.isArray(request)) { throw new TypeError('Request must be an object'); } const totalWeeks = requireBoundedInteger( request.goal?.timeframe?.totalWeeks, 'totalWeeks', 1, 260, 12 ); const hoursPerWeek = requireBoundedInteger( request.goal?.timeframe?.hoursPerWeek, 'hoursPerWeek', 1, 168, 10 ); const phases = generatePhases(request, totalWeeks, hoursPerWeek); // Continue constructing the response. } catch (error) { return { success: false, error: error instanceof Error ? error.message : 'Invalid learning request' }; ...[truncated 280 chars]
