Workers AI
Provides guidance on using Workers AI for AI inference, model selection, and embedding generation on Cloudflare's serverless platform.
Install this skill
Security score
The Workers AI skill was audited on May 15, 2026 and we found 13 security issues across 2 threat categories. Review the findings below before installing.
Categories Tested
Security Issues
Template literal with variable interpolation in command context
| 225 | id: `${docId}-chunk-${i}`, |
Template literal with variable interpolation in command context
| 265 | content: `Context:\n${context}\n\nQuestion: ${question}` |
Template literal with variable interpolation in command context
| 299 | content: `Rate the relevance of this passage to the question on a scale of 0-10:\n\nQuestion: ${question}\n\nPassage: ${candidate.metadata.text}\n\nRating (just the number):` |
Template literal with variable interpolation in command context
| 323 | content: `Context:\n${context}\n\nQuestion: ${question}` |
Template literal with variable interpolation in command context
| 407 | const cacheKey = `ai:${hash(prompt)}`; |
Template literal with variable interpolation in command context
| 489 | const history = await env.KV.get(`chat:${sessionId}`, 'json') || []; |
Template literal with variable interpolation in command context
| 499 | await env.KV.put(`chat:${sessionId}`, JSON.stringify(history), { |
Template literal with variable interpolation in command context
| 511 | content: `Analyze this document and extract:\n1. Main topics\n2. Key entities\n3. Sentiment\n\nDocument: ${documentText}` |
Template literal with variable interpolation in command context
| 526 | content: `Write a blog post about ${topic}. Format:\n# Title\n## Introduction\n## Main Points\n## Conclusion` |
Template literal with variable interpolation in command context
| 539 | content: `Extract the following from this email and return as JSON:\n- Name\n- Email\n- Company\n- Message\n\nEmail: ${emailText}\n\nJSON:` |
External URL reference
| 581 | - Workers AI overview: https://developers.cloudflare.com/workers-ai/ |
External URL reference
| 582 | - Models: https://developers.cloudflare.com/workers-ai/models/ |
External URL reference
| 583 | - AI Gateway: https://developers.cloudflare.com/ai-gateway/ |