الصلاحيات المفرطة والمعالجة غير السليمة للمخرجات
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
limit what the model can do and what its output can do.
الموضوعات المخطط لها
- Excessive agency: too many tools, too much permission, no approval for side effects. Apply the least privilege from MID-069.
- Improper output handling: model output used as HTML, SQL, shell, or a URL without validation.
- Render output as plain text or sanitized markdown; never execute it; validate structured output against a schema.
- Limit the effect of a successful attack, since you cannot rule it out.
تفاصيل المخطط المبدئي
عرض عملي
a tool set before and after: refund(any order) becomes request_refund(order of this user), which creates a pending request.
اختبر فهمك
Name one rule for model output in a web page.
أظهر الإجابة
Escape or sanitize it; never render it as raw HTML.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.