حدود هذا الفحص
ما الذي يطلبه تَحَصَّنْ؟
يقرأ رؤوس الاستجابة النهائية، ومع CSP قد يقرأ أيضاً سياسة report-only أو وسم meta داخل HTML من دون تشغيل الصفحة.
متى تنطبق القاعدة؟
- An HTML response can be inspected for enforcing, report-only, or meta-delivered CSP.
متى لا تنطبق؟
- No HTML policy context is available for the observed response.
اختبار الاستغلال
لم يُختبر
ما الذي يرصده؟
يقرأ السياسات الفعلية والتقريرية والوسمية، ثم يفسر توجيهات السكربت والأسلوب والكائنات والقاعدة والنماذج والتضمين ضمن محلل محدود.
العبارات التقنية التالية مرتبطة بكتالوج المنهجية وإصدار القاعدة، لذلك تُعرض باتجاه LTR مع شرح عربي محيط بها.
- Bounded CSP response header
- CSP report-only header
- Presence of a meta CSP
- Parsed directive-specific source categories and fallback paths
ماذا تثبت الملاحظة؟
- Whether a policy was observed and how script, style, object, base, form, and framing directives resolve within the bounded parser.
ماذا تعني نتيجة الاجتياز؟
تعني أن الشرط المسمى اجتاز على الاستجابة المرصودة فقط. لا تصف أمان الموقع كله ولا تختبر المسارات الأخرى.
ماذا تعني نتيجة المراجعة؟
تعني وجود حقيقة أو إشارة تحتاج إلى قراءة الدليل وسياق التطبيق. لا تعني تلقائياً وجود ثغرة قابلة للاستغلال.
توضيحات تمنع المبالغة
- CSP ضابط دفاع في العمق؛ غيابها لا يثبت وجود XSS.
- في حقن السكربت، توجيهات script-src ومسارات fallback أهم من style-src 'unsafe-inline'؛ السماح بالأنماط المضمّنة لا يثبت تنفيذ JavaScript مضمّن.
- وجود XSS فعلي يحتاج مسار حقن يمكن التحكم به وسياق تطبيق يسمح بالتنفيذ، ولم يختبر تَحَصَّنْ ذلك.
الأثر المحتمل
قد تقل قدرة المتصفح على احتواء أثر عيب حقن منفصل عندما تكون ضوابط السكربت غائبة أو واسعة؛ السياسة وحدها لا تنشئ عيب الحقن.
الشروط اللازمة لحدوث ضرر
- وجود مسار هجوم أو قدرة متصفح منفصلة تستطيع السياسة الحد من أثرها.
- أن تكون السياسة أو غيابها ذا صلة بنوع الصفحة وبنية التطبيق.
ما لم يُختبر أو يُثبت
- That XSS exists
- That an observed policy is effective for every script and route
- That browser execution was tested
قيود القاعدة
- The bounded static parser does not execute a browser, validate every CSP grammar edge case, combine policies across routes, or prove that an injection path exists.
الإجراء المقترح
دراسة تعزيز الحماية
- Review CSP in application context and prefer an enforcing policy with explicit script controls.
الفائدة المتوقعة
- Can limit the impact of a separate injection flaw without claiming that such a flaw exists.
أمثلة تمنع التفسير الخاطئ
A policy contains style-src 'unsafe-inline' while script-src uses nonces.
Inline styles must not be described as proof that inline JavaScript can execute; directive context matters.
No CSP is present on the observed page.
This is a defense-in-depth opportunity, not evidence that the page contains an exploitable injection path.
مراجع للتعلم
هذه المراجع تشرح المفهوم ولا تدخل وحدها في قرار القاعدة، ولا تثبت ثغرة أو امتثالاً.
- Content Security Policy Level 3Web standard · مرجع تعليمي فقطhttps://www.w3.org/TR/CSP3/يفتح في نافذة جديدة
- Content Security PolicyMDN · مرجع تعليمي فقطhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSPيفتح في نافذة جديدة
- Secure Headers ProjectOWASP · مرجع تعليمي فقطhttps://owasp.org/www-project-secure-headers/index.htmlيفتح في نافذة جديدة
- Test Other HTTP Security Header MisconfigurationsOWASP WSTG · مرجع تعليمي فقطhttps://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/02-Configuration_and_Deployment_Management_Testing/14-Test_Other_HTTP_Security_Header_Misconfigurationsيفتح في نافذة جديدة