Kashif passive web checks
Every rule of the passive web scanner (184 rules), with its default severity and the range a finding may take, its default confidence, and its mappings to CWE, the OWASP Web Security Testing Guide (WSTG v4.2 checklist ids), OWASP ASVS 4.0.3 and OWASP ASVS 5.0.0 ("—" means no matching requirement). The mappings are Kashif's analyst mapping. The last column names the remediation snippets, listed after the tables.
كل قواعد الفحص السلبي للمواقع، مع الخطورة الافتراضية ومداها، ودرجة الثقة، والربط بـ CWE وWSTG وASVS 4.0.3 وASVS 5.0.0، ومقتطفات الإصلاح لكل قاعدة.
- Severity: critical, high, medium, low or info. A range means the rule sets the severity from context.
- Confidence:
certain= deterministic protocol fact;firm= probably real;tentative= may exist, high false-positive chance.--web-sensitivity strictreports certain only,defaultcertain and firm,paranoideverything, including the rules marked paranoid only. - Stability: rule ids never change meaning and are never reused (1.x contract).
Contents
- A. Transport, redirects, HSTS · النقل والتوجيه وHSTS
- B. Content-Security-Policy · سياسة أمان المحتوى (CSP)
- C. Framing, MIME, referrer, permissions, isolation, caching and other headers · التضمين ونوع المحتوى والإحالة والصلاحيات والعزل والتخزين المؤقت وترويسات أخرى
- D. CORS · مشاركة الموارد بين المصادر (CORS)
- E. Cookies · الكوكيز
- F. Page content and client-side code · محتوى الصفحة والكود في المتصفح
- G. Information disclosure · كشف المعلومات
- H. TLS and certificates · TLS والشهادات
- I. Components and technologies · المكونات والتقنيات
- J. Exposure, well-known files, deep probe · الملفات المكشوفة والملفات المعروفة والفحص العميق
- K. Scan meta · معلومات الفحص
- Remediation snippets · مقتطفات الإصلاح
A. Transport, redirects, HSTS · النقل والتوجيه وHSTS
| Id | Check | الفحص | Severity | Confidence | CWE | WSTG | ASVS 4.0.3 | ASVS 5.0.0 | Fix |
|---|---|---|---|---|---|---|---|---|---|
WEB000 | Site served over plain HTTP (1.0) | الموقع يُقدَّم عبر HTTP غير مشفّر | High (Info) | certain | CWE-319 | WSTG-CRYP-03 | 9.1.1 | 12.2.1 | S-REDIR, S-TLS |
WEB101 | First HTTP redirect does not go to HTTPS | أول توجيه من HTTP لا يذهب إلى HTTPS | Medium | certain | CWE-319 | WSTG-CONF-07 | 9.1.1 | 12.2.1 | S-REDIR |
WEB102 | HTTP→HTTPS redirect changes host on the first hop | التوجيه الأول إلى HTTPS يغيّر المضيف | Low | certain | CWE-319 | WSTG-CONF-07 | 14.4.5 | 3.4.1 | S-REDIR |
WEB103 | Redirect or refresh downgrades HTTPS to HTTP | توجيه يخفّض الاتصال من HTTPS إلى HTTP | High | certain (tentative) | CWE-319 | WSTG-CRYP-03 | 9.1.1 | 12.2.1 | S-REDIR |
WEB104 | Redirect chain too long or looping | سلسلة توجيه طويلة أو دائرية | Info (Low) | certain | CWE-319 | WSTG-CONF-02 | — | — | S-REDIR |
WEB105 | Temporary redirect used for HTTP→HTTPS | توجيه مؤقت من HTTP إلى HTTPS | Info | certain | CWE-319 | WSTG-CONF-07 | — | — | S-REDIR |
WEB106 | Redirect response carries a full page | استجابة التوجيه تحمل صفحة كاملة | Low | firm | CWE-698 | WSTG-INFO-05 | — | — | S-ERR |
WEB-strict-transport-security | Missing Strict-Transport-Security (1.0) | ترويسة HSTS مفقودة | Medium (Info) | firm | CWE-319 | WSTG-CONF-07 | 14.4.5 | 3.4.1 | S-HSTS |
WEB110 | HSTS disabled by max-age=0 | HSTS معطَّلة بالقيمة max-age=0 | Medium | certain | CWE-319 | WSTG-CONF-07 | 14.4.5 | 3.4.1 | S-HSTS |
WEB111 | HSTS max-age too short | مدة HSTS قصيرة | Medium (Low, Info) | certain | CWE-319 | WSTG-CONF-07 | 14.4.5 | 3.4.1 | S-HSTS |
WEB112 | HSTS header invalid (ignored by browsers) | ترويسة HSTS غير صالحة فيتجاهلها المتصفح | Medium | certain | CWE-319 | WSTG-CONF-07 | 14.4.5 | 3.4.1 | S-HSTS |
WEB113 | Multiple HSTS headers | أكثر من ترويسة HSTS | Low (Info) | certain | CWE-319 | WSTG-CONF-07 | 14.4.5 | 3.4.1 | S-HSTS |
WEB114 | HSTS without includeSubDomains | HSTS بلا includeSubDomains | Info (Low) | certain | CWE-319 | WSTG-CONF-07 | 14.4.5 | 3.4.1 | S-HSTS |
WEB115 | HSTS preload requested but requirements not met | طلب الإدراج المسبق لـ HSTS غير مستوفٍ للشروط | Low (Info) | certain (firm) | CWE-319 | WSTG-CONF-07 | — | 3.7.4 | S-HSTS |
WEB116 | HSTS where browsers ignore it | HSTS في موضع يتجاهلها المتصفح | Info | certain | CWE-319 | WSTG-CONF-07 | — | — | S-HSTS |
WEB117 | HTTPS hop without HSTS before redirecting | قفزة HTTPS بلا HSTS قبل التوجيه | Low | certain | CWE-319 | WSTG-CONF-07 | 14.4.5 | 3.4.1 | S-HSTS |
WEB118 | Basic/Digest authentication over plain HTTP | مصادقة Basic أو Digest عبر HTTP غير مشفّر | Medium (High) | certain | CWE-523 | WSTG-ATHN-01 | 9.1.1 | 12.2.1 | S-REDIR |
WEB119 | Compression on HTTPS pages that carry secrets (BREACH precondition) | ضغط HTTP على صفحات حساسة (شرط BREACH) | Info (Low) | tentative | CWE-200 | WSTG-CRYP-01 | — | — | S-BREACH |
B. Content-Security-Policy · سياسة أمان المحتوى (CSP)
| Id | Check | الفحص | Severity | Confidence | CWE | WSTG | ASVS 4.0.3 | ASVS 5.0.0 | Fix |
|---|---|---|---|---|---|---|---|---|---|
WEB-content-security-policy | Missing Content-Security-Policy (1.0) | ترويسة CSP مفقودة | Medium (Low) | firm | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB040 | CSP allows inline scripts ('unsafe-inline') (1.0) | سياسة CSP تسمح بسكربتات inline ('unsafe-inline') | Medium | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB041 | CSP allows 'unsafe-eval' (1.0) | سياسة CSP تسمح بـ 'unsafe-eval' | Medium | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB042 | CSP lets scripts load from any source (1.0) | سياسة CSP تسمح بتحميل السكربتات من أي مصدر | Medium | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB043 | CSP does not restrict plugins (object-src) (1.0) | سياسة CSP لا تقيّد الإضافات (object-src) | Low (Info) | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB200 | CSP only in report-only mode | سياسة CSP في وضع التقرير فقط وغير مُطبَّقة | Medium | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB201 | CSP syntax errors | أخطاء صياغة في سياسة CSP | Low (Medium, Info) | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB202 | Duplicate CSP directive ignored | توجيه مكرر في سياسة CSP يُتجاهَل | Low | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB203 | 'strict-dynamic' without a nonce or hash | 'strict-dynamic' بلا nonce أو hash | Medium | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB204 | CSP base-uri missing or broad | التوجيه base-uri مفقود أو واسع في سياسة CSP | Medium (Info) | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB205 | CSP form-action missing or broad (form hijacking) | التوجيه form-action مفقود أو واسع في سياسة CSP (اختطاف النماذج) | Medium (Info) | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB206 | CSP frame-ancestors allows any site | التوجيه frame-ancestors في سياسة CSP يسمح بالتضمين من أي موقع | Medium | certain | CWE-1021 | WSTG-CLNT-09 | 14.4.7 | 3.4.6 | S-FRAME |
WEB207 | CSP directive ignored in a meta tag | توجيه في سياسة CSP لا يعمل داخل وسم meta | Medium (Low) | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP, S-FRAME |
WEB208 | Meta CSP placed after scripts or styles | وسم meta لسياسة CSP يأتي بعد سكربتات أو أنماط | Low | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB209 | CSP allowlists a host that can bypass it (JSONP/AngularJS) | سياسة CSP تسمح بمضيف يمكن تجاوزها عبره (JSONP أو AngularJS) | Medium (Low) | firm | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB210 | CSP allows 'unsafe-hashes' | سياسة CSP تسمح بـ 'unsafe-hashes' | Medium | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB211 | CSP allows insecure http: sources on an HTTPS page | سياسة CSP تسمح بمصادر http: غير آمنة في صفحة HTTPS | Medium (Low) | certain | CWE-319 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB212 | CSP nonce is static (reused across responses) | قيمة nonce ثابتة لا تتغيّر | Medium | certain (firm) | CWE-330 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB213 | CSP nonce too short | قيمة nonce قصيرة | Medium (Info) | certain | CWE-330 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB214 | CSP allows inline styles | سياسة CSP تسمح بأنماط inline | Info | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB215 | CSP reporting not configured | لا يوجد إعداد للإبلاغ عن مخالفات سياسة CSP | Info (Low) | certain | CWE-778 | WSTG-CONF-12 | — | 3.4.7 | S-CSP |
WEB216 | Deprecated CSP directive | توجيه متقادم في سياسة CSP | Info | certain | CWE-693 | WSTG-CONF-12 | — | — | S-CSP |
WEB217 | Obsolete X-Content-Security-Policy / X-WebKit-CSP | ترويسة CSP قديمة | Info (Low) | certain | CWE-693 | WSTG-CONF-12 | — | — | S-CSP |
WEB218 | Allowlist-only CSP (no nonce/hash) | سياسة CSP قائمة على المضيفين فقط | Info | certain | CWE-693 | WSTG-CONF-12 | 14.4.3 | 3.4.3 | S-CSP |
WEB219 | Trusted Types not required (paranoid only) | سياسة CSP لا تشترط Trusted Types | Info | certain | CWE-79 | WSTG-CLNT-01 | — | — | S-CSP |
C. Framing, MIME, referrer, permissions, isolation, caching and other headers · التضمين ونوع المحتوى والإحالة والصلاحيات والعزل والتخزين المؤقت وترويسات أخرى
| Id | Check | الفحص | Severity | Confidence | CWE | WSTG | ASVS 4.0.3 | ASVS 5.0.0 | Fix |
|---|---|---|---|---|---|---|---|---|---|
WEB-x-frame-options | Missing X-Frame-Options / frame-ancestors (1.0) | لا حماية من Clickjacking | Medium (Low) | firm | CWE-1021 | WSTG-CLNT-09 | 14.4.7 | 3.4.6 | S-FRAME |
WEB300 | X-Frame-Options value is ineffective | قيمة X-Frame-Options غير فعّالة | Medium (Low) | certain | CWE-1021 | WSTG-CLNT-09 | 14.4.7 | 3.4.6 | S-FRAME |
WEB301 | Conflicting or duplicated X-Frame-Options | قيم X-Frame-Options متعارضة أو مكررة | Low (Info) | certain | CWE-1021 | WSTG-CLNT-09 | 14.4.7 | 3.4.6 | S-FRAME |
WEB302 | X-Frame-Options in a meta tag (ignored) | X-Frame-Options داخل وسم meta (مُهمَل) | Low | certain | CWE-1021 | WSTG-CLNT-09 | 14.4.7 | 3.4.6 | S-FRAME |
WEB-x-content-type-options | Missing X-Content-Type-Options (1.0) | ترويسة X-Content-Type-Options مفقودة | Low | firm | CWE-693 | WSTG-CONF-14 | 14.4.4 | 3.4.4 | S-XCTO |
WEB303 | X-Content-Type-Options has an invalid value | قيمة X-Content-Type-Options غير صالحة | Low | certain | CWE-693 | WSTG-CONF-14 | 14.4.4 | 3.4.4 | S-XCTO |
WEB-referrer-policy | Missing Referrer-Policy (1.0) | ترويسة Referrer-Policy مفقودة | Info | certain | CWE-200 | WSTG-CONF-14 | 14.4.6 | 3.4.5 | S-REF |
WEB304 | Referrer-Policy leaks URLs to other sites | سياسة Referrer تسرّب الروابط لمواقع أخرى | Medium (Low) | certain | CWE-200 | WSTG-CONF-14 | 14.4.6 | 3.4.5 | S-REF |
WEB-permissions-policy | Missing Permissions-Policy (1.0) | ترويسة Permissions-Policy مفقودة | Info | certain | CWE-693 | WSTG-CONF-14 | — | — | S-PP |
WEB305 | Permissions-Policy is invalid (whole header ignored) | Permissions-Policy غير صالحة فتُتجاهَل كليًا | Medium (Low, Info) | certain | CWE-693 | WSTG-CONF-14 | — | — | S-PP |
WEB306 | Powerful feature allowed for every origin | ميزة حساسة مسموحة لكل المواقع | Low | certain | CWE-693 | WSTG-CONF-14 | — | — | S-PP |
WEB307 | Deprecated Feature-Policy header | ترويسة Feature-Policy متقادمة | Info (Low) | certain | CWE-693 | WSTG-CONF-14 | — | — | S-PP |
WEB308 | Cross-Origin-Opener-Policy missing or invalid | ترويسة COOP مفقودة أو غير صالحة | Info (Low) | certain | CWE-1021 | WSTG-CONF-14 | — | 3.4.8 | S-ISO |
WEB309 | Cross-Origin-Embedder-Policy invalid | ترويسة COEP غير صالحة | Low (Info) | certain | CWE-693 | WSTG-CONF-14 | — | — | S-ISO |
WEB310 | Cross-Origin-Resource-Policy invalid or missing on private data | ترويسة CORP غير صالحة أو مفقودة لبيانات خاصة | Low (Info) | certain (tentative) | CWE-693 | WSTG-CONF-14 | — | 3.5.8 | S-ISO |
WEB311 | X-XSS-Protection enables the legacy XSS auditor | X-XSS-Protection يفعّل المدقق القديم | Info | certain | CWE-693 | WSTG-CONF-14 | — | — | S-DEPR |
WEB312 | Deprecated security header | ترويسة أمان متقادمة | Info | certain | CWE-693 | WSTG-CONF-14 | — | — | S-DEPR |
WEB313 | Content-Type missing, multiple or wrong | نوع المحتوى مفقود أو مكرر أو خاطئ | Low | certain (firm) | CWE-345 | WSTG-CONF-14 | 14.4.1 | 3.2.1 | S-XCTO |
WEB314 | HTML without a declared charset, or conflicting charsets | صفحة HTML بلا ترميز محدد أو بترميزات متعارضة | Info | certain | CWE-436 | WSTG-CONF-14 | 14.4.1 | 3.2.1 | S-XCTO |
WEB315 | Sensitive response can be cached | استجابة حساسة قابلة للتخزين المؤقت | Medium (High, Low) | firm (certain) | CWE-525 | WSTG-ATHN-06 | 8.2.1 | 14.3.2 | S-CACHE |
WEB316 | X-Permitted-Cross-Domain-Policies allows all | X-Permitted-Cross-Domain-Policies تسمح بالكل | Low (Info) | certain | CWE-942 | WSTG-CONF-14 | — | — | S-DEPR |
WEB317 | Clear-Site-Data misconfigured | ترويسة Clear-Site-Data بإعداد خاطئ | Low | certain | CWE-693 | WSTG-SESS-06 | 8.2.3 | 14.3.1 | S-CACHE |
WEB318 | Security headers dropped on error responses | ترويسات الأمان تسقط من صفحات الخطأ | Info | certain | CWE-693 | WSTG-CONF-14 | 14.4.1 | 3.4.1 | S-HSTS, S-CSP, S-FRAME, S-XCTO |
D. CORS · مشاركة الموارد بين المصادر (CORS)
| Id | Check | الفحص | Severity | Confidence | CWE | WSTG | ASVS 4.0.3 | ASVS 5.0.0 | Fix |
|---|---|---|---|---|---|---|---|---|---|
WEB320 | Any website can read authenticated responses (Origin reflected with credentials) | أي موقع يستطيع قراءة الاستجابات الموثقة (إعادة Origin مع السماح ببيانات الاعتماد) | High | certain | CWE-942 | WSTG-CLNT-07 | 14.5.3 | 3.4.2 | S-CORS |
WEB321 | Origin reflected without credentials | أصل الطلب يُعاد دون السماح ببيانات الاعتماد | Low (Medium) | certain | CWE-942 | WSTG-CLNT-07 | 14.5.3 | 3.4.2 | S-CORS |
WEB322 | CORS trusts the "null" origin | CORS يثق بالأصل null | Medium (High) | certain | CWE-942 | WSTG-CLNT-07 | 14.5.3 | 3.4.2 | S-CORS |
WEB323 | ACAO * combined with credentials (invalid) | ACAO * مع بيانات الاعتماد (تركيبة غير صالحة) | Low | certain | CWE-942 | WSTG-CLNT-07 | 14.5.3 | 3.4.2 | S-CORS |
WEB324 | Reflected ACAO without Vary: Origin | إعادة الأصل بلا Vary: Origin | Low | certain | CWE-942 | WSTG-CLNT-07 | 14.5.3 | 3.4.2 | S-CORS |
WEB325 | Invalid ACAO value | قيمة ACAO غير صالحة | Low | certain | CWE-942 | WSTG-CLNT-07 | 14.5.3 | 3.4.2 | S-CORS |
WEB326 | CORS trusts an http:// origin on an https site | CORS يثق بأصل http على موقع https | Low | certain | CWE-942 | WSTG-CLNT-07 | 14.5.3 | 3.4.2 | S-CORS |
WEB327 | Public CORS on a response with session data | CORS عام على استجابة تحوي بيانات جلسة | Low | tentative | CWE-942 | WSTG-CLNT-07 | 14.5.3 | 3.4.2 | S-CORS |
E. Cookies · الكوكيز
| Id | Check | الفحص | Severity | Confidence | CWE | WSTG | ASVS 4.0.3 | ASVS 5.0.0 | Fix |
|---|---|---|---|---|---|---|---|---|---|
WEB020 | Cookie without Secure flag (1.0) | كوكي بلا علامة Secure | High (Medium, Low, Info) | certain (tentative) | CWE-614 | WSTG-SESS-02 | 3.4.1 | 3.3.1 | S-COOKIE |
WEB021 | Session cookie without HttpOnly (1.0) | كوكي جلسة بلا HttpOnly | Medium (Info) | firm (certain, tentative) | CWE-1004 | WSTG-SESS-02 | 3.4.2 | 3.3.4 | S-COOKIE |
WEB022 | Cookie without SameSite (1.0) | كوكي بلا SameSite | Low (Info) | certain (tentative) | CWE-1275 | WSTG-SESS-02 | 3.4.3 | 3.3.2 | S-COOKIE |
WEB400 | SameSite=None without Secure (cookie rejected) | SameSite=None بلا Secure (يرفضها المتصفح) | Medium | certain | CWE-1275 | WSTG-SESS-02 | 3.4.3 | 3.3.2 | S-COOKIE |
WEB401 | Cookie prefix rules broken (cookie rejected) | قواعد بادئة الكوكي مخالفة (يرفضها المتصفح) | Medium | certain | CWE-614 | WSTG-SESS-02 | 3.4.4 | 3.3.1 | S-COOKIE |
WEB402 | Invalid SameSite value | قيمة SameSite غير صالحة | Low | certain | CWE-1275 | WSTG-SESS-02 | 3.4.3 | 3.3.2 | S-COOKIE |
WEB403 | Partitioned without Secure (cookie rejected) | Partitioned بلا Secure (يرفضها المتصفح) | Medium | certain | CWE-614 | WSTG-SESS-02 | — | 3.3.1 | S-COOKIE |
WEB404 | Cookie scoped too broadly or to a foreign domain | نطاق الكوكي واسع أو لا يطابق المضيف | Low | certain (tentative) | CWE-565 | WSTG-SESS-02 | 3.4.5 | 3.3.3 | S-COOKIE |
WEB405 | Long-lived session cookie | كوكي جلسة طويلة العمر | Low (Info) | certain (tentative) | CWE-613 | WSTG-SESS-02 | — | — | S-COOKIE |
WEB406 | Same cookie set more than once in one response | الكوكي نفسها تُضبط أكثر من مرة | Low | certain | CWE-436 | WSTG-SESS-02 | — | — | S-COOKIE |
WEB407 | Session cookie sent on cross-site requests (SameSite=None) | كوكي الجلسة تُرسل في الطلبات عبر المواقع | Low (Info) | certain (tentative) | CWE-1275 | WSTG-SESS-02 | 3.4.3 | 3.3.2 | S-COOKIE |
WEB408 | Cookie too large (ignored by browsers) | كوكي كبيرة جدًا (يتجاهلها المتصفح) | Low | certain | CWE-436 | WSTG-SESS-02 | — | 3.3.5 | S-COOKIE |
WEB409 | Session cookie without the __Host- prefix (paranoid only) | كوكي جلسة بلا البادئة __Host- | Info | certain (tentative) | CWE-614 | WSTG-SESS-02 | 3.4.4 | 3.3.3 | S-COOKIE |
WEB410 | Secure cookie set over HTTP (the browser drops it) | كوكي بسمة Secure تُضبط عبر HTTP (يرفضها المتصفح) | Low | certain | CWE-614 | WSTG-SESS-02 | — | — | S-COOKIE |
WEB411 | Load-balancer cookie reveals an internal address | كوكي موازن الحمل تكشف عنوانًا داخليًا | Low | certain | CWE-200 | WSTG-SESS-02 | — | — | S-COOKIE |
WEB412 | Sensitive data in a cookie value | بيانات حساسة في قيمة الكوكي | Medium (Low) | firm | CWE-315 | WSTG-SESS-02 | 3.5.3 | 14.3.3 | S-COOKIE |
WEB413 | Session cookie issued over plain HTTP | كوكي جلسة تُصدَر عبر HTTP غير مشفّر | High (Low) | certain (tentative) | CWE-319 | WSTG-SESS-02 | 3.4.1 | 3.3.1 | S-COOKIE |
WEB414 | Session token exposed in page content (HttpOnly bypassed) | رمز الجلسة مكشوف داخل محتوى الصفحة | Low | certain | CWE-1004 | WSTG-SESS-02 | 3.4.2 | 3.3.4 | S-COOKIE |
F. Page content and client-side code · محتوى الصفحة والكود في المتصفح
| Id | Check | الفحص | Severity | Confidence | CWE | WSTG | ASVS 4.0.3 | ASVS 5.0.0 | Fix |
|---|---|---|---|---|---|---|---|---|---|
WEB050 | Mixed content on an HTTPS page (1.0) | محتوى مختلط في صفحة HTTPS | Medium (Low, Info) | certain | CWE-319 | WSTG-CRYP-03 | 9.1.1 | 12.2.1 | S-MIXED |
WEB051 | Form submits over plain HTTP (1.0) | نموذج يُرسل عبر HTTP | High (Medium) | certain | CWE-319 | WSTG-ATHN-01 | 9.1.1 | 12.2.1 | S-MIXED |
WEB052 | Password field on non-HTTPS page (1.0) | حقل كلمة مرور في صفحة غير HTTPS | High | certain | CWE-523 | WSTG-ATHN-01 | 9.1.1 | 12.2.1 | S-REDIR |
WEB053 | External script or stylesheet without Subresource Integrity (1.0) | سكربت أو ملف أنماط خارجي بلا SRI | Low (Info) | certain | CWE-353 | WSTG-CONF-14 | 14.2.3 | 3.6.1 | S-SRI |
WEB500 | SRI without crossorigin: the browser blocks the file | SRI بلا crossorigin: المتصفح يحجب الملف | Low | certain | CWE-353 | — | 14.2.3 | 3.6.1 | S-SRI |
WEB501 | SRI value malformed or weak | قيمة SRI تالفة أو ضعيفة | Low | certain | CWE-353 | — | 14.2.3 | 3.6.1 | S-SRI |
WEB502 | SRI-protected resource loaded over HTTP | مورد محمي بـ SRI يُحمَّل عبر HTTP | Medium | certain | CWE-319 | WSTG-CRYP-03 | 9.1.1 | 12.2.1 | S-MIXED |
WEB503 | SRI hash does not match the served file | تجزئة SRI لا تطابق الملف المقدَّم | Medium | firm | CWE-353 | — | 14.2.3 | 3.6.1 | S-SRI |
WEB504 | HTTP page posts a form to HTTPS (MITM can change it) | صفحة HTTP ترسل نموذجًا إلى HTTPS | Low | certain | CWE-319 | WSTG-ATHN-01 | 9.1.1 | 12.2.1 | S-REDIR |
WEB505 | Link gives the opened site control of this page (reverse tabnabbing) | رابط يمنح الموقع المفتوح تحكمًا بهذه الصفحة | Low | certain | CWE-1022 | WSTG-CLNT-14 | — | — | S-HTML |
WEB506 | Script from a known malicious or compromised CDN | سكربت من شبكة توزيع معروفة بأنها خبيثة أو مخترقة | High | certain (firm) | CWE-829 | — | 10.3.2 | 15.2.4 | S-SRI |
WEB507 | Signs of compromise (cryptominer, injected loader, defacement) | مؤشرات اختراق (معدِّن عملات، محمّل مزروع، تشويه) | High | firm | CWE-506 | — | — | — | S-INCIDENT |
WEB508 | Password field blocks password managers or paste | حقل كلمة المرور يمنع مدير كلمات المرور أو اللصق | Info | certain | CWE-521 | WSTG-ATHN-05 | — | 6.2.7 | S-HTML |
WEB509 | Login form sends the password in the URL (GET) | نموذج الدخول يرسل كلمة المرور في الرابط (GET) | High (Low) | certain (tentative) | CWE-598 | WSTG-ATHN-01 | 8.3.1 | 14.2.1 | S-HTML |
WEB510 | Session id in URLs | معرّف الجلسة في الروابط | Medium | certain | CWE-598 | WSTG-SESS-04 | 3.1.1 | 14.2.1 | S-COOKIE |
WEB511 | Sensitive data in URLs | بيانات حساسة في الروابط | Low | tentative | CWE-598 | WSTG-SESS-04 | 8.3.1 | 14.2.1 | S-HTML |
WEB512 | Redirect-style parameter with an absolute URL (possible open redirect, not tested) | معامل توجيه بعنوان كامل (احتمال توجيه مفتوح، لم يُختبَر) | Info | tentative | CWE-601 | WSTG-CLNT-04 | 5.1.5 | 3.7.2 | S-HTML |
WEB513 | File upload form (attack-surface inventory) | نموذج رفع ملفات (حصر لسطح الهجوم) | Info | certain | CWE-434 | WSTG-BUSL-08 | 12.5.2 | 5.3.1 | S-HTML |
WEB514 | Quirks mode with relative stylesheet (path-relative style import precondition) | وضع quirks مع ملف أنماط نسبي | Info | firm | CWE-436 | — | — | — | S-HTML |
WEB515 | Inline event handlers or javascript: URLs block a strict CSP (paranoid only) | معالجات أحداث مضمّنة تعيق سياسة CSP صارمة | Info | certain | CWE-693 | WSTG-CONF-12 | — | — | S-CSP |
WEB516 | State-changing form without an anti-CSRF token (paranoid only) | نموذج يغيّر الحالة بلا رمز مضاد لـ CSRF | Info | tentative | CWE-352 | WSTG-SESS-05 | 4.2.2 | 3.5.1 | S-COOKIE |
WEB517 | Page loads code from a host or bucket that does not exist (hijackable) | الصفحة تحمّل كودًا من مضيف أو حاوية تخزين غير موجودة (قابلة للاستيلاء) | High (Medium, Low, Info) | firm (tentative) | CWE-829 | WSTG-CONF-10 | 14.2.3 | 15.2.4 | S-SRI |
WEB518 | Password form submits to another site | نموذج كلمة المرور يُرسَل إلى موقع آخر | Low (Medium) | firm | CWE-201 | WSTG-ATHN-01 | — | 14.2.1 | S-HTML |
WEB519 | Third-party script from a mutable (unpinned) package-CDN URL | سكربت خارجي من رابط CDN غير مثبّت الإصدار | Low | certain | CWE-829 | WSTG-CONF-14 | 14.2.3 | 15.2.4 | S-SRI |
WEB520 | DOM-based XSS flow in page script | تدفق DOM XSS في سكربت الصفحة | Medium | firm (tentative) | CWE-79 | WSTG-CLNT-01 | 5.3.3 | 3.2.2 | S-HTML |
WEB521 | DOM-based open redirect in page script | توجيه مفتوح عبر DOM في سكربت الصفحة | Low | firm (tentative) | CWE-601 | WSTG-CLNT-04 | 5.1.5 | 3.7.2 | S-HTML |
WEB522 | postMessage handler without origin check | معالج postMessage بلا تحقق من المصدر | Low | tentative (firm) | CWE-346 | WSTG-CLNT-11 | — | 3.5.5 | S-HTML |
G. Information disclosure · كشف المعلومات
| Id | Check | الفحص | Severity | Confidence | CWE | WSTG | ASVS 4.0.3 | ASVS 5.0.0 | Fix |
|---|---|---|---|---|---|---|---|---|---|
WEB010 | Server header reveals version (1.0) | ترويسة Server تكشف الإصدار | Low (Info) | certain | CWE-497 | WSTG-INFO-02 | 14.3.3 | 13.4.6 | S-BANNER |
WEB011 | X-Powered-By reveals the stack (1.0) | ترويسة X-Powered-By تكشف التقنية | Low (Info) | certain | CWE-497 | WSTG-INFO-08 | 14.3.3 | 13.4.6 | S-BANNER |
WEB055 | Directory listing enabled (1.0) | عرض فهرس المجلدات مفعّل | Medium | certain | CWE-548 | WSTG-CONF-04 | 4.3.2 | 13.4.3 | S-DIRLIST |
WEB056 | Stack trace or detailed error in response (1.0) | أثر استثناء أو خطأ تفصيلي في الاستجابة | Medium | firm (tentative) | CWE-209 | WSTG-ERRH-02 | 7.4.1 | 16.5.1 | S-ERR |
WEB600 | Header reveals backend software or version | ترويسة تكشف برمجيات الخلفية أو إصدارها | Low (Info) | certain | CWE-497 | WSTG-INFO-02 | 14.3.3 | 13.4.6 | S-BANNER |
WEB601 | Debug or profiler header exposed | ترويسة تصحيح أو تحليل أداء مكشوفة | Medium | certain | CWE-489 | WSTG-ERRH-02 | 14.3.2 | 13.4.2 | S-ERR |
WEB602 | Source map exposed | خريطة المصدر (source map) مكشوفة | Low (Info) | certain | CWE-540 | WSTG-INFO-05 | 14.3.2 | 13.4.7 | S-DOTFILES |
WEB603 | Internal IP address disclosed | كشف عنوان IP داخلي | Low | firm (tentative) | CWE-200 | WSTG-INFO-05 | — | — | S-BANNER |
WEB604 | ETag reveals inode numbers | ترويسة ETag تكشف أرقام inode | Info | certain | CWE-200 | WSTG-INFO-02 | — | — | S-BANNER |
WEB605 | Framework debug mode enabled | وضع التصحيح للإطار مفعّل | High (Critical) | certain | CWE-489 | WSTG-ERRH-02 | 14.3.2 | 13.4.2 | S-ERR |
WEB606 | Database error message disclosed | كشف رسالة خطأ قاعدة البيانات | Medium | firm | CWE-209 | WSTG-ERRH-01 | 7.4.1 | 16.5.1 | S-ERR |
WEB607 | Server file path disclosed in an error | كشف مسار ملف في الخادم ضمن رسالة خطأ | Low | tentative | CWE-209 | WSTG-ERRH-01 | 7.4.1 | 16.5.1 | S-ERR |
WEB608 | Server-side source code disclosed | كشف الكود المصدري من جهة الخادم | Medium | firm | CWE-540 | WSTG-CONF-03 | 12.5.1 | 13.4.7 | S-DOTFILES |
WEB609 | Secret or private key in client-side code | سرّ أو مفتاح خاص في الكود المقدَّم للمتصفح | Critical (High, Low) | firm (certain, tentative) | CWE-798 | WSTG-INFO-05 | 2.10.4 | 13.3.1 | S-SECRET |
WEB610 | Serialized object in a response or cookie | كائن مُسلسَل في استجابة أو كوكي | Medium | firm | CWE-502 | — | 1.5.2 | 1.5.2 | S-SECRET |
WEB611 | ViewState without integrity protection | ViewState بلا حماية سلامة | High (Medium) | firm (tentative) | CWE-642 | — | — | — | S-ERR |
WEB612 | Password hash disclosed | كشف تجزئة كلمة مرور | Medium | firm | CWE-200 | WSTG-INFO-05 | — | — | S-SECRET |
WEB613 | Payment card number in a page | رقم بطاقة دفع في الصفحة | Medium (Info) | firm | CWE-359 | WSTG-INFO-05 | — | 14.2.6 | S-SECRET |
WEB614 | Sensitive HTML comment (paranoid only) | تعليق HTML حساس | Info | tentative | CWE-615 | WSTG-INFO-05 | — | — | S-HTML |
WEB615 | OpenSSL version vulnerable to Heartbleed (from banner) | إصدار OpenSSL عرضة لـ Heartbleed (من الترويسة) | High | tentative | CWE-119 | WSTG-CRYP-01 | 9.1.2 | 12.1.2 | S-TLS |
WEB616 | Server version shown on error pages | إصدار الخادم يظهر في صفحات الخطأ | Low | certain | CWE-497 | WSTG-INFO-02 | 14.3.3 | 13.4.6 | S-BANNER |
WEB617 | Default server page or parked domain | صفحة الخادم الافتراضية أو نطاق مركون | Low (Info) | certain | CWE-1188 | WSTG-CONF-02 | 14.2.2 | — | S-DOTFILES |
WEB619 | Image metadata reveals a GPS location | بيانات صورة تكشف موقعًا جغرافيًا | Low | certain | CWE-200 | WSTG-INFO-05 | — | 14.2.8 | S-HTML |
H. TLS and certificates · TLS والشهادات
| Id | Check | الفحص | Severity | Confidence | CWE | WSTG | ASVS 4.0.3 | ASVS 5.0.0 | Fix |
|---|---|---|---|---|---|---|---|---|---|
WEB030 | Server accepts TLS 1.0 / 1.1 (1.0) | الخادم يقبل TLS 1.0 أو 1.1 | Medium | certain | CWE-327 | WSTG-CRYP-01 | 9.1.3 | 12.1.1 | S-TLS |
WEB070 | TLS certificate expired (1.0) | شهادة TLS منتهية | High | certain | CWE-298 | WSTG-CRYP-01 | 9.1.1 | 12.2.2 | S-TLS |
WEB071 | TLS certificate expires soon (1.0) | شهادة TLS تقترب من الانتهاء | Medium (Low) | certain | CWE-298 | WSTG-CRYP-01 | — | 12.2.2 | S-TLS |
WEB072 | TLS certificate does not validate (1.0) | شهادة TLS لا تجتاز التحقق | High | certain | CWE-295 | WSTG-CRYP-01 | 9.1.1 | 12.2.2 | S-TLS |
WEB700 | Certificate does not match the host name | الشهادة لا تطابق اسم المضيف | High | certain | CWE-297 | WSTG-CRYP-01 | 9.1.1 | 12.2.2 | S-TLS |
WEB701 | Certificate not publicly trusted (self-signed or private CA) | شهادة غير موثوقة عامة | High | certain (tentative) | CWE-295 | WSTG-CRYP-01 | 9.1.1 | 12.2.2 | S-TLS |
WEB702 | Incomplete certificate chain | سلسلة الشهادات ناقصة | Medium | firm (tentative) | CWE-295 | WSTG-CRYP-01 | 9.1.1 | 12.2.2 | S-TLS |
WEB703 | Chain sent in wrong order or with extra certificates | سلسلة بترتيب خاطئ أو بشهادات زائدة | Info (Low) | certain (tentative) | CWE-295 | WSTG-CRYP-01 | — | — | S-TLS |
WEB704 | SSLv2 or SSLv3 accepted | الخادم يقبل SSLv2 أو SSLv3 | Critical (High) | certain | CWE-327 | WSTG-CRYP-01 | 9.1.3 | 12.1.1 | S-TLS |
WEB705 | TLS 1.2 not supported / TLS 1.3 not supported | لا دعم لـ TLS 1.2 أو 1.3 | High (Low) | certain | CWE-327 | WSTG-CRYP-01 | 9.1.3 | 12.1.1 | S-TLS |
WEB706 | Weak cipher suites offered | مجموعات تشفير ضعيفة مسموحة | High (Medium, Low) | certain | CWE-327 | WSTG-CRYP-01 | 9.1.2 | 12.1.2 | S-TLS |
WEB707 | Weak certificate key | مفتاح الشهادة ضعيف | Critical (High, Info) | certain | CWE-326 | WSTG-CRYP-01 | 9.1.2 | 12.1.2 | S-TLS |
WEB708 | Weak certificate signature | توقيع الشهادة ضعيف | High (Medium) | certain | CWE-327 | WSTG-CRYP-01 | 9.1.2 | 12.1.2 | S-TLS |
WEB709 | Certificate lifetime beyond CA/Browser Forum limits | مدة صلاحية الشهادة تتجاوز الحد | Low | certain | CWE-295 | WSTG-CRYP-01 | — | 12.2.2 | S-TLS |
WEB710 | Weak Diffie-Hellman parameters | معاملات Diffie-Hellman ضعيفة | High (Medium) | certain | CWE-326 | WSTG-CRYP-01 | 9.1.2 | 12.1.2 | S-TLS |
WEB711 | TLS compression enabled (CRIME) | ضغط TLS مفعّل (CRIME) | High | certain | CWE-200 | WSTG-CRYP-01 | 9.1.2 | 12.1.2 | S-TLS |
WEB712 | Secure renegotiation not supported | لا دعم لإعادة التفاوض الآمنة | Low | certain | CWE-757 | WSTG-CRYP-01 | 9.1.2 | 12.1.2 | S-TLS |
WEB713 | Certificate Transparency requirements not met | متطلبات شفافية الشهادات غير مستوفاة | Medium (Low) | firm (tentative) | CWE-295 | WSTG-CRYP-01 | — | 12.2.2 | S-TLS |
WEB714 | OCSP stapling problem | مشكلة في تدبيس OCSP | High (Medium, Info) | certain | CWE-299 | WSTG-CRYP-01 | — | 12.1.4 | S-TLS |
WEB715 | TLS configuration differs between servers | إعداد TLS مختلف بين الخوادم | Low | certain | CWE-1188 | WSTG-CRYP-01 | — | 12.1.1 | S-TLS |
WEB716 | Server negotiates a higher version than offered | الخادم يفاوض إصدارًا أعلى مما طُلب | Low | certain | CWE-757 | WSTG-CRYP-01 | — | — | S-TLS |
WEB717 | Certificate names problem | مشكلة في أسماء الشهادة | Info | certain | CWE-297 | WSTG-CRYP-01 | — | — | S-TLS |
WEB718 | Not conformant with Mozilla TLS guidelines 6.0 | غير مطابق لإرشادات Mozilla لـ TLS | Info | certain | CWE-327 | WSTG-CRYP-01 | 9.1.2 | 12.1.2 | S-TLS |
WEB719 | No post-quantum key exchange (paranoid only) | لا تبادل مفاتيح مقاوم للحوسبة الكمية | Info | certain | CWE-327 | WSTG-CRYP-01 | — | — | S-TLS |
WEB720 | Certificate not yet valid | الشهادة لم تصبح صالحة بعد | High | certain | CWE-298 | WSTG-CRYP-01 | 9.1.1 | 12.2.2 | S-TLS |
I. Components and technologies · المكونات والتقنيات
| Id | Check | الفحص | Severity | Confidence | CWE | WSTG | ASVS 4.0.3 | ASVS 5.0.0 | Fix |
|---|---|---|---|---|---|---|---|---|---|
WEB054 | Vulnerable JavaScript library (1.0) | مكتبة JavaScript بها ثغرات معروفة | High (Critical, Medium, Low) | certain (firm) | CWE-1395 | WSTG-INFO-08 | 14.2.1 | 15.2.1 | S-LIBS |
WEB080 | Detected platform (1.0) | منصّة مكتشفة | Info | firm (certain, tentative) | CWE-1395 | WSTG-INFO-08, WSTG-INFO-09 | — | — | S-LIBS |
WEB081 | Outdated platform version (1.0) | إصدار المنصّة قديم | Medium (Low) | firm (tentative) | CWE-1104 | WSTG-INFO-08 | 14.2.1 | 15.2.1 | S-LIBS |
WEB800 | Server software version with known vulnerabilities | إصدار برمجية خادم به ثغرات معروفة | High (Critical, Medium, Low) | firm (tentative) | CWE-1395 | WSTG-INFO-02 | 14.2.1 | 15.2.1 | S-BANNER |
WEB801 | End-of-life server software or runtime | برمجية خادم أو بيئة تشغيل انتهى دعمها | Medium | firm | CWE-1104 | WSTG-INFO-02 | 14.2.1 | 15.2.1 | S-BANNER |
WEB802 | Obsolete client-side technology (Flash, Silverlight, Java applets) | تقنية عميل متقادمة | Low | certain | CWE-1104 | — | 1.14.6 | 3.7.1 | S-HTML |
WEB803 | End-of-life front-end framework | إطار واجهة أمامية انتهى دعمه | Low | firm | CWE-1104 | WSTG-INFO-08 | 14.2.1 | 3.7.1 | S-LIBS |
J. Exposure, well-known files, deep probe · الملفات المكشوفة والملفات المعروفة والفحص العميق
| Id | Check | الفحص | Severity | Confidence | CWE | WSTG | ASVS 4.0.3 | ASVS 5.0.0 | Fix |
|---|---|---|---|---|---|---|---|---|---|
WEB060 | No security.txt (1.0) | لا يوجد security.txt | Info | certain | CWE-1059 | WSTG-INFO-03 | — | — | S-SECTXT |
WEB900 | security.txt invalid | ملف security.txt غير صالح | Low (Info) | certain | CWE-1059 | WSTG-INFO-03 | — | — | S-SECTXT |
WEB061 | robots.txt reveals sensitive paths (1.0) | robots.txt يكشف مسارات حساسة | Info | firm | CWE-200 | WSTG-INFO-03 | — | — | S-DOTFILES |
WEB062 | Exposed sensitive file (1.0) | ملف حساس مكشوف | High (Critical, Medium, Low, Info) | certain | CWE-538, CWE-527, CWE-530, CWE-532, CWE-200, CWE-489 | WSTG-CONF-04 | 12.5.1 | 13.4.7, 13.4.1, 13.4.5 | S-DOTFILES |
WEB082 | Platform sensitive file exposed (1.0) | ملف حساس للمنصّة مكشوف | High | certain | CWE-538 | WSTG-CONF-04 | 12.5.1 | 13.4.7 | S-DOTFILES |
WEB083 | Admin or login page reachable (1.0) | صفحة إدارة أو دخول متاحة | Info | firm | CWE-284 | WSTG-CONF-05 | — | — | S-ADMIN |
WEB901 | Possible subdomain takeover | احتمال الاستيلاء على النطاق الفرعي | High | firm | CWE-284 | WSTG-CONF-10 | 10.3.3 | — | S-TAKEOVER |
WEB903 | Permissive Flash/Silverlight cross-domain policy | سياسة نطاقات Flash/Silverlight متساهلة | Medium (Low) | certain | CWE-942 | WSTG-CLNT-07 | 14.5.3 | 3.4.2 | S-CORS |
K. Scan meta · معلومات الفحص
| Id | Check | الفحص | Severity | Confidence | CWE | WSTG | ASVS 4.0.3 | ASVS 5.0.0 | Fix |
|---|---|---|---|---|---|---|---|---|---|
WEB990 | Scan partly inconclusive (WAF, challenge or rate limit) | الفحص غير حاسم جزئيًا (جدار حماية أو تحدٍّ أو تقييد معدل) | Info | certain | — | — | — | — | — |
WEB991 | Some checks could not be performed | تعذّر إجراء بعض الفحوص | Info | certain | — | — | — | — | — |
(1.0) marks rules that already existed in Kashif 1.0.x (same id and meaning).
Remediation snippets
Reports show the platforms detected for the scanned site first (from the Server / X-Powered-By headers and the technology inventory) and the others collapsed, with example.com replaced by the scanned host. Every snippet passes Kashif's own header, CSP, HSTS and cookie checks.
تعرض التقارير المنصات المكتشفة في الموقع أولًا ثم بقية المنصات مطوية، مع استبدال example.com باسم المضيف المفحوص.
S-HSTS · Strict-Transport-Security (HSTS) · ترويسة Strict-Transport-Security (HSTS)
Tell browsers to use HTTPS only for this host (and its subdomains) for two years.
Caution: includeSubDomains forces HTTPS on every subdomain: confirm they all serve HTTPS first. Add preload only after reading hstspreload.org, because removal from the preload list takes months.
تنبيه: يفرض includeSubDomains استخدام HTTPS على كل النطاقات الفرعية، فتأكد أولًا من أنها كلها تعمل عبر HTTPS. ولا تضف preload إلا بعد قراءة شروط hstspreload.org، لأن الحذف من قائمة الإدراج المسبق يستغرق أشهرًا.
All platforms
Strict-Transport-Security: max-age=63072000; includeSubDomains
nginx
# nginx (server block on 443; "always" also covers error responses).
# Caution: add_header in a location{} replaces all server-level add_header lines; repeat them there.
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;
Apache httpd 2.4
# Apache httpd (mod_headers), inside <VirtualHost *:443>
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
IIS 10 version 1709+ (native HSTS)
<!-- IIS 10 version 1709+: the site's native HSTS (applicationHost.config, or IIS Manager → site → HSTS) -->
<site name="Default Web Site">
<hsts enabled="true" max-age="63072000" includeSubDomains="true" redirectHttpToHttps="true" />
</site>
IIS sends the header on HTTPS responses only and redirects HTTP to HTTPS; use your site's name.
Older IIS (web.config custom header)
<system.webServer><httpProtocol><customHeaders>
<add name="Strict-Transport-Security" value="max-age=63072000; includeSubDomains" />
</customHeaders></httpProtocol></system.webServer>
Only for IIS older than 10 version 1709: customHeaders goes out on every binding, so put it only in the web.config of a site that is bound to HTTPS alone.
Caddy 2
example.com {
header Strict-Transport-Security "max-age=63072000; includeSubDomains"
}
Express (helmet 7+)
// Express + helmet
app.use(helmet.strictTransportSecurity({ maxAge: 63072000, includeSubDomains: true }));
Django
# Django settings.py
SECURE_HSTS_SECONDS = 63072000
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_SSL_REDIRECT = True
Spring Security 6 / Spring Boot
// Spring Security 6
http.headers(h -> h.httpStrictTransportSecurity(s -> s.includeSubDomains(true).maxAgeInSeconds(63072000)));
ASP.NET Core 8+
// ASP.NET Core
builder.Services.AddHsts(o => { o.MaxAge = TimeSpan.FromDays(730); o.IncludeSubDomains = true; });
app.UseHsts();
Cloudflare
SSL/TLS → Edge Certificates → HTTP Strict Transport Security (HSTS) → Enable, Max Age 12 months; turn on Apply HSTS policy to subdomains only after confirming every subdomain serves HTTPS. Add preload only after reading hstspreload.org (removal takes months).
Used by: WEB-strict-transport-security, WEB110, WEB111, WEB112, WEB113, WEB114, WEB115, WEB116, WEB117, WEB318
S-REDIR · Redirect HTTP to HTTPS (same host first, permanent) · توجيه HTTP إلى HTTPS (نفس المضيف أولًا، توجيه دائم)
Answer every plain-HTTP request with a 301/308 redirect to the same host on HTTPS; redirect to another host only after that.
Caution: Behind a proxy or load balancer that terminates TLS, check the forwarded protocol header (X-Forwarded-Proto) or the redirect will loop. For APIs, do not redirect: close port 80 or answer 403.
تنبيه: إذا كان TLS يُنهى عند وكيل أو موزّع أحمال فاعتمد على ترويسة البروتوكول المُمرَّرة (X-Forwarded-Proto) وإلا دار التوجيه في حلقة. أما واجهات API فلا توجّهها، بل أغلق المنفذ 80 أو أجب بـ 403.
All platforms
APIs (ASVS 5.0 4.1.2): do not redirect; close port 80 or return 403.
nginx
server { listen 80; listen [::]:80; server_name example.com www.example.com; return 301 https://$host$request_uri; }
Apache httpd 2.4
<VirtualHost *:80>
ServerName example.com
ServerAlias example.com www.example.com
RewriteEngine On
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</VirtualHost>
IIS 10 (web.config)
<!-- IIS: URL Rewrite module -->
<rewrite><rules><rule name="HTTPS" stopProcessing="true"><match url="(.*)" />
<conditions><add input="{HTTPS}" pattern="off" /></conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule></rules></rewrite>
Caddy 2
Automatic: Caddy redirects HTTP to HTTPS by default for site addresses.
Express (helmet 7+)
app.set("trust proxy", 1);
app.use((q, s, n) => q.secure ? n() : s.redirect(301, "https://" + q.headers.host + q.originalUrl));
Better: terminate TLS at the proxy and redirect there.
Django
SECURE_SSL_REDIRECT = True
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") # only behind a proxy that sets it
Spring Security 6 / Spring Boot
http.redirectToHttps(Customizer.withDefaults()); // Spring Security 6.5+
// older 6.x: http.requiresChannel(c -> c.anyRequest().requiresSecure());
ASP.NET Core 8+
builder.Services.AddHttpsRedirection(o => o.RedirectStatusCode = 308);
app.UseHttpsRedirection();
Cloudflare
SSL/TLS → Edge Certificates → Always Use HTTPS = On.
Used by: WEB000, WEB101, WEB102, WEB103, WEB104, WEB105, WEB118, WEB052, WEB504
S-CSP · Content-Security-Policy (strict, nonce-based) · سياسة أمان المحتوى CSP (صارمة قائمة على nonce)
A strict CSP (nonce + 'strict-dynamic') for HTML pages and a locked-down CSP for APIs; the nonce is 16+ random bytes in base64, new for every response, also set as nonce="…" on every <script>.
Caution: A strict CSP blocks every script without the nonce, including inline event handlers (onclick=): deploy it as Content-Security-Policy-Report-Only first and switch once the reports are clean.
تنبيه: تمنع سياسة CSP الصارمة كل سكربت لا يحمل الـ nonce، بما في ذلك معالجات الأحداث المضمّنة (onclick=)؛ فطبّقها أولًا بالترويسة Content-Security-Policy-Report-Only ثم انتقل إلى التطبيق الفعلي بعد خلو التقارير من المخالفات.
All platforms
Content-Security-Policy: script-src 'nonce-{RANDOM}' 'strict-dynamic' https: 'unsafe-inline'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'; report-uri /csp-report; report-to csp
Reporting-Endpoints: csp="https://example.com/csp-report"
API responses: Content-Security-Policy: default-src 'none'; frame-ancestors 'none'
'https:' and 'unsafe-inline' are ignored by CSP3 browsers when a nonce and 'strict-dynamic' are present; they only keep very old browsers working. Reporting-Endpoints defines the group that report-to names.
nginx
# nginx: per-request nonce requires a module (ngx_http_sub/njs) — prefer setting CSP in the application.
# Static sites without inline scripts can use a hash/allowlist policy:
add_header Content-Security-Policy "default-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'" always;
Apache httpd 2.4
Header always set Content-Security-Policy "default-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'"
# Per-request nonce: mod_unique_id + "Header set ... 'nonce-%{UNIQUE_ID}e'" is NOT random enough; generate the nonce in the app.
IIS 10 (web.config)
<add name="Content-Security-Policy" value="default-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'" />
Caddy 2
header Content-Security-Policy "default-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'"
Express (helmet 7+)
// Express + helmet with a per-request nonce
const crypto = require("node:crypto");
app.use((req, res, next) => { res.locals.cspNonce = crypto.randomBytes(16).toString("base64"); next(); });
app.use(helmet.contentSecurityPolicy({ directives: {
"script-src": [(req, res) => `'nonce-${res.locals.cspNonce}'`, "'strict-dynamic'"],
"object-src": ["'none'"], "base-uri": ["'none'"], "frame-ancestors": ["'none'"], "form-action": ["'self'"] } }));
// templates: <script nonce="<%= cspNonce %>">
Django
# Django >= 6.0 (built-in): MIDDLEWARE += ["django.middleware.csp.ContentSecurityPolicyMiddleware"]
from django.utils.csp import CSP
SECURE_CSP = {"script-src": [CSP.NONCE, CSP.STRICT_DYNAMIC], "object-src": [CSP.NONE],
"base-uri": [CSP.NONE], "frame-ancestors": [CSP.NONE], "form-action": [CSP.SELF]}
# add "django.template.context_processors.csp" to TEMPLATES context_processors; templates: <script nonce="{{ csp_nonce }}">
# Django < 6.0: the django-csp package
Spring Security 6 / Spring Boot
// Spring Security 6 (nonce: generate per request in a filter and expose it to templates)
http.headers(h -> h.contentSecurityPolicy(c -> c.policyDirectives(
"script-src 'nonce-{nonce}' 'strict-dynamic'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'")));
ASP.NET Core 8+
// ASP.NET Core middleware
app.Use(async (ctx, next) => {
var nonce = Convert.ToBase64String(System.Security.Cryptography.RandomNumberGenerator.GetBytes(16));
ctx.Items["csp-nonce"] = nonce;
ctx.Response.Headers.ContentSecurityPolicy = $"script-src 'nonce-{nonce}' 'strict-dynamic'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'";
await next(); });
Cloudflare
// Cloudflare Worker: a new nonce for every HTML response
export default {
async fetch(req, env) {
const res = await fetch(req);
if (!(res.headers.get("content-type") || "").includes("text/html")) return res;
const nonce = btoa(String.fromCharCode(...crypto.getRandomValues(new Uint8Array(16))));
const policy = `script-src 'nonce-${nonce}' 'strict-dynamic'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'`;
const out = new HTMLRewriter().on("script[nonce]", {
element(e) { // only scripts your templates marked; any other nonce (e.g. an injected one) is removed
if (e.getAttribute("nonce") === env.NONCE_MARK) e.setAttribute("nonce", nonce); else e.removeAttribute("nonce");
},
}).transform(res);
const r = new Response(out.body, out);
r.headers.set("Content-Security-Policy", policy);
r.headers.set("Cache-Control", "private, no-store"); // a cached page would reuse the nonce
return r;
},
};
Your templates mark trusted scripts with nonce="<NONCE_MARK>", a random value you also store as the Worker secret NONCE_MARK; the Worker replaces it with a fresh nonce. For a static policy (no nonce), use Rules → Transform Rules → Modify Response Header → Set static Content-Security-Policy instead.
Used by: WEB-content-security-policy, WEB040, WEB041, WEB042, WEB043, WEB200, WEB201, WEB202, WEB203, WEB204, WEB205, WEB207, WEB208, WEB209, WEB210, WEB211, WEB212, WEB213, WEB214, WEB215, WEB216, WEB217, WEB218, WEB219, WEB318, WEB515
S-FRAME · Clickjacking protection (frame-ancestors / X-Frame-Options) · الحماية من Clickjacking (frame-ancestors / X-Frame-Options)
Forbid other sites from framing your pages: CSP frame-ancestors for current browsers, X-Frame-Options for old ones.
Caution: 'none' / DENY also stops your own site from framing the page; use 'self' / SAMEORIGIN if you embed your own pages.
تنبيه: تمنع القيمة 'none' أو DENY موقعك أنت أيضًا من تضمين الصفحة؛ فاستخدم 'self' أو SAMEORIGIN إن كنت تضمّن صفحاتك.
All platforms
Content-Security-Policy: <your policy>; frame-ancestors 'none' (or 'self')
X-Frame-Options: DENY (or SAMEORIGIN; for old browsers)
Add frame-ancestors to the policy you already send (S-CSP): a policy with only frame-ancestors restricts no scripts, and Kashif reports it as such (WEB042).
nginx
add_header X-Frame-Options "DENY" always;
Apache httpd 2.4
Header always set X-Frame-Options "DENY"
IIS 10 (web.config)
<add name="X-Frame-Options" value="DENY" />
Inside <system.webServer><httpProtocol><customHeaders> of web.config.
Caddy 2
header X-Frame-Options "DENY"
Express (helmet 7+)
app.use(helmet.xFrameOptions({ action: "deny" }));
Django
X_FRAME_OPTIONS = "DENY"
The default since Django 3.0 (XFrameOptionsMiddleware).
Spring Security 6 / Spring Boot
http.headers(h -> h.frameOptions(f -> f.deny()));
The default in Spring Security.
ASP.NET Core 8+
app.Use(async (ctx, next) => {
ctx.Response.Headers["X-Frame-Options"] = "DENY";
await next(); });
Cloudflare
Rules → Transform Rules → Modify Response Header → Set static: X-Frame-Options = DENY
Used by: WEB206, WEB207, WEB-x-frame-options, WEB300, WEB301, WEB302, WEB318
S-XCTO · nosniff and a correct Content-Type · ترويسة nosniff ونوع محتوى صحيح
Send X-Content-Type-Options: nosniff and a correct Content-Type with charset=utf-8 on every response.
Caution: With nosniff, a script or stylesheet served with a wrong Content-Type is blocked: check your MIME types first.
تنبيه: مع nosniff يُمنع أي سكربت أو ملف أنماط يُقدَّم بنوع محتوى خاطئ، فتحقّق من أنواع MIME أولًا.
All platforms
X-Content-Type-Options: nosniff
Content-Type: text/html; charset=utf-8
nginx
add_header X-Content-Type-Options "nosniff" always;
charset utf-8;
Also keep correct types{} / default_type.
Apache httpd 2.4
Header always set X-Content-Type-Options "nosniff"
AddDefaultCharset UTF-8
IIS 10 (web.config)
<add name="X-Content-Type-Options" value="nosniff" />
Inside <system.webServer><httpProtocol><customHeaders> of web.config.
Caddy 2
header X-Content-Type-Options "nosniff"
Express (helmet 7+)
app.use(helmet.xContentTypeOptions());
On by default in helmet.
Django
SECURE_CONTENT_TYPE_NOSNIFF = True
The default.
Spring Security 6 / Spring Boot
On by default in Spring Security.
ASP.NET Core 8+
app.Use(async (ctx, next) => {
ctx.Response.Headers["X-Content-Type-Options"] = "nosniff";
await next(); });
Cloudflare
Rules → Transform Rules → Modify Response Header → Set static: X-Content-Type-Options = nosniff
Used by: WEB-x-content-type-options, WEB303, WEB313, WEB314, WEB318
S-REF · Referrer-Policy · ترويسة Referrer-Policy
Send Referrer-Policy: strict-origin-when-cross-origin (or no-referrer) so full URLs are not sent to other sites.
Caution: no-referrer also removes the origin that some payment or analytics providers expect; strict-origin-when-cross-origin keeps it.
تنبيه: تزيل no-referrer أيضًا المصدر الذي يتوقعه بعض مزودي الدفع أو التحليلات، أما strict-origin-when-cross-origin فتبقيه.
All platforms
Referrer-Policy: strict-origin-when-cross-origin
nginx
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
Apache httpd 2.4
Header always set Referrer-Policy "strict-origin-when-cross-origin"
IIS 10 (web.config)
<add name="Referrer-Policy" value="strict-origin-when-cross-origin" />
Inside <system.webServer><httpProtocol><customHeaders> of web.config.
Caddy 2
header Referrer-Policy "strict-origin-when-cross-origin"
Express (helmet 7+)
app.use(helmet.referrerPolicy({ policy: "strict-origin-when-cross-origin" }));
Django
SECURE_REFERRER_POLICY = "strict-origin-when-cross-origin"
Spring Security 6 / Spring Boot
http.headers(h -> h.referrerPolicy(r -> r.policy(ReferrerPolicyHeaderWriter.ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN)));
ASP.NET Core 8+
app.Use(async (ctx, next) => {
ctx.Response.Headers["Referrer-Policy"] = "strict-origin-when-cross-origin";
await next(); });
Cloudflare
Rules → Transform Rules → Modify Response Header → Set static: Referrer-Policy = strict-origin-when-cross-origin
Used by: WEB-referrer-policy, WEB304
S-PP · Permissions-Policy · ترويسة Permissions-Policy
Disable the browser features you do not use (structured-field syntax: feature=() means nobody).
Caution: Remove a feature from the list (or allow it for self) if your pages use it, such as payment=(self) for a checkout or geolocation=(self) for a map.
تنبيه: احذف الميزة من القائمة (أو اسمح بها لـ self) إن كانت صفحاتك تستخدمها، مثل payment=(self) لصفحة الدفع أو geolocation=(self) لخريطة.
All platforms
Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=(), usb=(), serial=(), hid=(), display-capture=(), browsing-topics=()
nginx
add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=(), usb=(), serial=(), hid=(), display-capture=(), browsing-topics=()" always;
Apache httpd 2.4
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=(), usb=(), serial=(), hid=(), display-capture=(), browsing-topics=()"
IIS 10 (web.config)
<add name="Permissions-Policy" value="camera=(), microphone=(), geolocation=(), payment=(), usb=(), serial=(), hid=(), display-capture=(), browsing-topics=()" />
Inside <system.webServer><httpProtocol><customHeaders> of web.config.
Caddy 2
header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=(), usb=(), serial=(), hid=(), display-capture=(), browsing-topics=()"
Express (helmet 7+)
app.use((req, res, next) => { res.setHeader("Permissions-Policy", "camera=(), microphone=(), geolocation=(), payment=(), usb=(), serial=(), hid=(), display-capture=(), browsing-topics=()"); next(); });
Django
Add the header in a middleware (Django has no setting for it), or use django-permissions-policy.
Spring Security 6 / Spring Boot
http.headers(h -> h.permissionsPolicyHeader(p -> p.policy("camera=(), microphone=(), geolocation=()")));
Spring Security 6.4+.
ASP.NET Core 8+
app.Use(async (ctx, next) => {
ctx.Response.Headers["Permissions-Policy"] = "camera=(), microphone=(), geolocation=(), payment=(), usb=(), serial=(), hid=(), display-capture=(), browsing-topics=()";
await next(); });
Cloudflare
Rules → Transform Rules → Modify Response Header → Set static: Permissions-Policy = camera=(), microphone=(), geolocation=(), payment=(), usb=(), serial=(), hid=(), display-capture=(), browsing-topics=()
Used by: WEB-permissions-policy, WEB305, WEB306, WEB307
S-ISO · Cross-origin isolation (COOP, CORP, COEP) · العزل بين المصادر (COOP وCORP وCOEP)
Keep other sites' windows and pages away from yours: COOP same-origin, CORP same-origin, and COEP only if you need crossOriginIsolated.
Caution: COOP same-origin breaks OAuth and payment pop-ups (use same-origin-allow-popups there); COEP require-corp blocks cross-origin resources that send no CORP/CORS headers, so test it first.
تنبيه: تُعطّل COOP بالقيمة same-origin النوافذ المنبثقة لتسجيل الدخول OAuth والدفع (فاستخدم same-origin-allow-popups هناك)، وتمنع COEP بالقيمة require-corp الموارد الخارجية التي لا ترسل ترويسات CORP أو CORS، فجرّبها أولًا.
All platforms
Cross-Origin-Opener-Policy: same-origin (same-origin-allow-popups if OAuth / payment popups are used)
Cross-Origin-Resource-Policy: same-origin (same-site for assets shared with sibling subdomains)
Cross-Origin-Embedder-Policy: require-corp (only if you need crossOriginIsolated; test first)
nginx
add_header Cross-Origin-Opener-Policy "same-origin" always;
Apache httpd 2.4
Header always set Cross-Origin-Opener-Policy "same-origin"
IIS 10 (web.config)
<add name="Cross-Origin-Opener-Policy" value="same-origin" />
Inside <system.webServer><httpProtocol><customHeaders> of web.config.
Caddy 2
header Cross-Origin-Opener-Policy "same-origin"
Express (helmet 7+)
app.use(helmet.crossOriginOpenerPolicy({ policy: "same-origin" }));
app.use(helmet.crossOriginResourcePolicy({ policy: "same-origin" }));
COEP is off by default in helmet 7+; keep it that way unless needed.
Django
SECURE_CROSS_ORIGIN_OPENER_POLICY = "same-origin"
The default.
Spring Security 6 / Spring Boot
http.headers(h -> h.crossOriginOpenerPolicy(c -> c.policy(CrossOriginOpenerPolicyHeaderWriter.CrossOriginOpenerPolicy.SAME_ORIGIN)));
ASP.NET Core 8+
app.Use(async (ctx, next) => {
ctx.Response.Headers["Cross-Origin-Opener-Policy"] = "same-origin";
await next(); });
Cloudflare
Rules → Transform Rules → Modify Response Header → Set static: Cross-Origin-Opener-Policy = same-origin
Used by: WEB308, WEB309, WEB310
S-COOKIE · Session cookie attributes · سمات كوكي الجلسة
Set session cookies with the __Host- prefix, Path=/, Secure, HttpOnly and SameSite=Lax.
Caution: Renaming the session cookie (__Host-) logs every user out once, and SameSite=Strict would also drop the session on links from other sites; Lax is the safe default.
تنبيه: تغيير اسم كوكي الجلسة (إلى __Host-) يُخرج كل المستخدمين مرة واحدة، والقيمة SameSite=Strict تُسقط الجلسة أيضًا عند القدوم من روابط مواقع أخرى؛ لذا فالقيمة Lax هي الخيار الآمن الافتراضي.
All platforms
Set-Cookie: __Host-sid=<random>; Path=/; Secure; HttpOnly; SameSite=Lax
Cache-Control: no-store
A response that sets a session cookie must not be stored by shared caches: send Cache-Control: no-store on it (S-CACHE).
nginx
proxy_cookie_flags sessionid secure httponly samesite=lax; # each session cookie by name (the first match applies)
proxy_cookie_flags ~ secure samesite=lax; # every other cookie
nginx 1.19.3+ as a reverse proxy; prefer fixing the application. Name each session cookie on its own httponly line; never give HttpOnly to a CSRF cookie your JavaScript reads (such as XSRF-TOKEN or csrftoken).
Apache httpd 2.4
Header always edit Set-Cookie "^((?!.*;\s*Secure).*)$" "$1; Secure"
Proxy, last resort; prefer the application setting.
IIS 10 (web.config)
<system.web><httpCookies requireSSL="true" httpOnlyCookies="true" sameSite="Lax" /></system.web>
IIS / ASP.NET web.config.
Express (helmet 7+)
session({ name: "__Host-sid", cookie: { secure: true, httpOnly: true, sameSite: "lax", path: "/" } })
Django
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_HTTPONLY = True # default
SESSION_COOKIE_SAMESITE = "Lax" # default
SESSION_COOKIE_NAME = "__Host-sessionid"
CSRF_COOKIE_SECURE = True
Spring Security 6 / Spring Boot
server.servlet.session.cookie.secure=true
server.servlet.session.cookie.http-only=true
server.servlet.session.cookie.same-site=lax
# stops ;jsessionid= URLs
server.servlet.session.tracking-modes=cookie
Spring Boot application.properties.
ASP.NET Core 8+
builder.Services.ConfigureApplicationCookie(o => { o.Cookie.Name = "__Host-auth"; o.Cookie.SecurePolicy = CookieSecurePolicy.Always; o.Cookie.HttpOnly = true; o.Cookie.SameSite = SameSiteMode.Lax; o.Cookie.Path = "/"; });
Cloudflare
Cookies are set by the origin; fix them there (a Worker can rewrite Set-Cookie as a stop-gap).
PHP
session.cookie_secure=1
session.cookie_httponly=1
session.cookie_samesite=Lax
session.use_only_cookies=1
session.use_trans_sid=0
php.ini
F5 BIG-IP
WEB411: enable "Cookie Encryption" in the persistence profile.
Used by: WEB020, WEB021, WEB022, WEB400, WEB401, WEB402, WEB403, WEB404, WEB405, WEB406, WEB407, WEB408, WEB409, WEB410, WEB411, WEB412, WEB413, WEB414, WEB510, WEB516
S-CORS · CORS: allowlist, never reflect · CORS: قائمة سماح محددة وعدم عكس الأصل أبدًا
Answer cross-origin requests only for the origins you trust, add Vary: Origin, and delete Flash/Silverlight policy files.
Caution: Removing a reflected or wildcard origin breaks any partner site that relied on it: list those origins explicitly before switching.
تنبيه: حذف الأصل المعكوس أو الشامل (*) يعطّل أي موقع شريك كان يعتمد عليه، فأدرج تلك المصادر صراحةً قبل التغيير.
All platforms
Delete crossdomain.xml and clientaccesspolicy.xml (WEB903); no current browser needs them.
nginx
map $http_origin $cors_origin { default ""; "https://app.example.com" $http_origin; }
add_header Access-Control-Allow-Origin $cors_origin always; # nginx sends nothing when the value is empty
add_header Vary Origin always;
Apache httpd 2.4
SetEnvIf Origin "^(https://app\.example\.com)$" CORS_OK=$1
Header always set Access-Control-Allow-Origin "%{CORS_OK}e" env=CORS_OK
Header always merge Vary Origin
IIS 10 (web.config)
<cors enabled="true"><add origin="https://app.example.com" allowCredentials="true" /></cors>
IIS CORS module.
Express (helmet 7+)
app.use(require("cors")({ origin: ["https://app.example.com"], credentials: true }));
helmet has no CORS; use the cors package.
Django
CORS_ALLOWED_ORIGINS = ["https://app.example.com"]
django-cors-headers; never CORS_ALLOW_ALL_ORIGINS with credentials.
Spring Security 6 / Spring Boot
config.setAllowedOrigins(List.of("https://app.example.com"));
Never a * pattern with setAllowCredentials(true).
ASP.NET Core 8+
builder.Services.AddCors(o => o.AddPolicy("app", p => p.WithOrigins("https://app.example.com").AllowCredentials()));
Cloudflare
Set CORS at the origin or in a Worker.
Used by: WEB320, WEB321, WEB322, WEB323, WEB324, WEB325, WEB326, WEB327, WEB903
S-BANNER · Hide versions and stack headers · إخفاء الإصدارات وترويسات التقنية
Stop announcing server, framework and runtime versions in Server, X-Powered-By and similar headers.
Caution: Hiding versions is defence in depth only: patch the software too (WEB800/WEB801).
تنبيه: إخفاء الإصدارات دفاع إضافي فقط؛ فحدّث البرمجيات أيضًا (WEB800/WEB801).
nginx
server_tokens off;
proxy_hide_header X-Powered-By;
fastcgi_hide_header X-Powered-By;
Apache httpd 2.4
ServerTokens Prod
ServerSignature Off
Header always unset X-Powered-By
# WEB604: no inode in ETag
FileETag MTime Size
IIS 10 (web.config)
<security><requestFiltering removeServerHeader="true" /></security>
<httpProtocol><customHeaders><remove name="X-Powered-By" /></customHeaders></httpProtocol>
<!-- X-AspNet-Version: <system.web><httpRuntime enableVersionHeader="false" /></system.web> -->
ASP.NET MVC: MvcHandler.DisableMvcResponseHeader = true;
Caddy 2
header -Server
header -X-Powered-By
Express (helmet 7+)
app.disable("x-powered-by");
helmet does it too.
Spring Security 6 / Spring Boot
server.server-header=
Empty value (Tomcat/Jetty).
ASP.NET Core 8+
builder.WebHost.ConfigureKestrel(k => k.AddServerHeader = false);
Cloudflare
Rules → Transform Rules → Managed Transforms → "Remove X-Powered-By headers".
PHP
expose_php = Off
php.ini
Used by: WEB010, WEB011, WEB600, WEB603, WEB604, WEB616, WEB800, WEB801
S-DIRLIST · Turn directory listing off · تعطيل عرض فهارس المجلدات
Make the web server answer 403/404 for folders without an index page instead of listing their files.
Caution: Folders meant for public downloads stop showing their file list; publish an index page for them if needed.
تنبيه: المجلدات المخصصة للتنزيل العام لن تعرض قائمة ملفاتها بعد ذلك، فأنشئ لها صفحة فهرس إن احتجت.
All platforms
Python's http.server is not a production server.
nginx
autoindex off;
Apache httpd 2.4
Options -Indexes
IIS 10 (web.config)
<directoryBrowse enabled="false" />
Caddy 2
file_server # without the browse subdirective
Express (helmet 7+)
Do not use serve-index.
Apache Tomcat
<init-param><param-name>listings</param-name><param-value>false</param-value></init-param>
web.xml, DefaultServlet.
Used by: WEB055
S-DOTFILES · Block VCS folders, backups, env/config files and source maps · منع الوصول إلى مجلدات التحكم بالإصدارات والنسخ الاحتياطية وملفات الإعداد وخرائط المصدر
Deny hidden files and folders (except /.well-known/), backups, dumps, env files and source maps at the web server, and deploy build artifacts only.
Caution: Keep /.well-known/ reachable (ACME certificate renewal and security.txt need it), and check that no needed file uses a blocked extension.
تنبيه: أبقِ /.well-known/ متاحًا (يحتاجه تجديد شهادات ACME وملف security.txt)، وتأكد من أن أي ملف تحتاجه لا يستخدم امتدادًا محظورًا.
All platforms
Deploy build artifacts only (no .git, no backups) and keep secrets outside the web root.
nginx
location ~ /\.(?!well-known/) { return 404; }
location ~* \.(bak|old|orig|swp|sql|env|log|ini|map)$ { return 404; }
Apache httpd 2.4
RedirectMatch 404 "/\.(?!well-known/)"
<FilesMatch "\.(bak|old|orig|swp|sql|env|log|ini|map)$">
Require all denied
</FilesMatch>
IIS 10 (web.config)
<security><requestFiltering>
<hiddenSegments><add segment=".git" /><add segment=".svn" /><add segment=".env" /></hiddenSegments>
<fileExtensions><add fileExtension=".bak" allowed="false" /><add fileExtension=".sql" allowed="false" /><add fileExtension=".map" allowed="false" /></fileExtensions>
</requestFiltering></security>
Caddy 2
@hidden path /.git/* /.svn/* /.env* *.bak *.sql *.map
respond @hidden 404
Express (helmet 7+)
express.static(dir, { dotfiles: "deny" })
And build with devtool: false (no production source maps).
Spring Security 6 / Spring Boot
management.endpoints.web.exposure.include=health
WEB062 actuator; and no WEB-INF outside the WAR.
Used by: WEB602, WEB608, WEB617, WEB061, WEB062, WEB082
S-ERR · Production error handling · معالجة الأخطاء في بيئة الإنتاج
Turn debug mode off, log errors on the server and show users a generic error page.
Caution: Make sure errors are still logged (log_errors, application logs) before hiding them, or failures become invisible.
تنبيه: تأكد من استمرار تسجيل الأخطاء (log_errors وسجلات التطبيق) قبل إخفائها، وإلا صارت الأعطال غير مرئية.
nginx
proxy_intercept_errors on;
error_page 500 502 503 504 /50x.html;
Apache httpd 2.4
ErrorDocument 500 /error.html
IIS 10 (web.config)
<httpErrors errorMode="DetailedLocalOnly" />
Inside <system.webServer> of web.config: detailed errors only on the server itself.
Express
NODE_ENV=production
Set it in the service environment (systemd Environment=, docker run -e, your host's settings): Express then stops sending stack traces; log errors in your own error handler.
Django
DEBUG = False
Spring Security 6 / Spring Boot
server.error.include-stacktrace=never
server.error.include-message=never
ASP.NET Core 8+
app.UseExceptionHandler("/error");
Never UseDeveloperExceptionPage in production.
PHP
display_errors = Off
log_errors = On
Flask / Werkzeug
app.run(debug=False)
Never run the Werkzeug debugger in production.
Laravel
APP_DEBUG=false
.env
Ruby on Rails
config.consider_all_requests_local = false
Symfony
APP_ENV=prod
ASP.NET (.NET Framework)
<customErrors mode="RemoteOnly" defaultRedirect="/error" />
<compilation debug="false" />
Used by: WEB106, WEB056, WEB601, WEB605, WEB606, WEB607, WEB611
S-TLS · TLS configuration (Mozilla intermediate 6.0) · إعدادات TLS (Mozilla intermediate 6.0)
TLS 1.2 and 1.3 only with forward-secret AEAD suites, a trusted certificate with automatic renewal, and the full chain.
Caution: Disabling TLS 1.0/1.1 cuts off very old clients (Android 4.3 and older, old embedded devices); check your traffic first.
تنبيه: تعطيل TLS 1.0 و1.1 يقطع العملاء القدامى جدًا (Android 4.3 وما قبله والأجهزة المدمجة القديمة)، فراجع حركة موقعك أولًا.
All platforms
Certificates: ACME (Let's Encrypt or another CA) with automatic renewal; RSA 2048 or ECDSA P-256; serve the full chain (fullchain.pem).
nginx
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers off;
ssl_ecdh_curve X25519:prime256v1:secp384r1;
# with OpenSSL >= 3.5, use this line instead (it adds the post-quantum hybrid group):
# ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1:secp384r1;
ssl_session_tickets off;
ssl_stapling on; ssl_stapling_verify on; # only if the certificate has an OCSP URL
Check the configuration with nginx -t before reloading (nginx -s reload).
Apache httpd 2.4
SSLProtocol -all +TLSv1.2 +TLSv1.3
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305
SSLHonorCipherOrder off
SSLSessionTickets off
SSLCompression off
IIS 10 (web.config)
Windows: disable SSL 2.0/3.0 and TLS 1.0/1.1 under HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols (Enabled=0 for Server), order suites with Disable-TlsCipherSuite or Group Policy, then reboot.
Caddy 2
tls {
protocols tls1.2 tls1.3
}
Defaults are already TLS 1.2+ with modern suites; this only pins them.
Spring Security 6 / Spring Boot
server.ssl.enabled-protocols=TLSv1.2,TLSv1.3
Cloudflare
SSL/TLS → Edge Certificates → Minimum TLS Version = 1.2, TLS 1.3 = On; SSL mode "Full (strict)".
Node.js
minVersion: "TLSv1.2"
If Node terminates TLS (tls/https options).
Used by: WEB000, WEB615, WEB030, WEB070, WEB071, WEB072, WEB700, WEB701, WEB702, WEB703, WEB704, WEB705, WEB706, WEB707, WEB708, WEB709, WEB710, WEB711, WEB712, WEB713, WEB714, WEB715, WEB716, WEB717, WEB718, WEB719, WEB720
S-MIXED · Remove mixed content · إزالة المحتوى المختلط
Change http:// subresource and form URLs to https:// (or a relative URL on your own origin), and add upgrade-insecure-requests as a safety net.
Caution: upgrade-insecure-requests makes the browser fetch https:// instead; a host without HTTPS then fails to load, so check every third-party URL.
تنبيه: يجعل upgrade-insecure-requests المتصفح يطلب https:// بدلًا من ذلك، فيفشل تحميل أي مضيف لا يدعم HTTPS، لذا تحقّق من كل رابط خارجي.
All platforms
Content-Security-Policy: <your policy>; upgrade-insecure-requests
Add the directive to the policy you already send (S-CSP). Sent alone it restricts no scripts.
Used by: WEB050, WEB051, WEB502
S-SRI · Subresource Integrity for third-party code · التحقق من سلامة الموارد الخارجية (SRI)
Load third-party scripts and stylesheets from a pinned, versioned URL with an integrity hash and crossorigin="anonymous"; restrict evergreen vendor scripts with CSP instead, or self-host them.
Caution: The browser blocks the file when its content changes, so pin a versioned URL; evergreen scripts (Google Tag Manager, Stripe.js) cannot use SRI.
تنبيه: يمنع المتصفح الملف إذا تغيّر محتواه، لذا ثبّت رابطًا بإصدار محدد؛ أما السكربتات المتغيرة باستمرار (Google Tag Manager وStripe.js) فلا يمكن استخدام SRI معها.
All platforms · HTML
<script src="https://cdn.example.net/lib/1.2.3/lib.min.js" integrity="sha384-<base64>" crossorigin="anonymous"></script>
All platforms · integrity value
openssl dgst -sha384 -binary lib.min.js | openssl base64 -A
Compute the integrity value of the exact file you load.
Used by: WEB053, WEB500, WEB501, WEB503, WEB506, WEB517, WEB519
S-LIBS · Upgrade vulnerable components · تحديث المكونات المصابة بثغرات
Upgrade the library or platform to the fixed version, rebuild and redeploy; add Kashif's dependency scan (kashif <project-dir>) or npm audit to CI.
Caution: A major-version upgrade can change APIs: run your tests and read the library's migration notes before deploying.
تنبيه: قد يغيّر التحديث إلى إصدار رئيسي جديد واجهات البرمجة، فشغّل اختباراتك واقرأ ملاحظات الترحيل قبل النشر.
All platforms
npm install <lib>@<fixed> # or point the CDN URL at the fixed version
kashif <project-dir> # in CI: catches the next vulnerable version before deployment
Installed with npm: upgrade the package; loaded from a CDN: replace the URL with the fixed version. Run kashif in CI so the next vulnerable version is caught before deployment.
Used by: WEB054, WEB080, WEB081, WEB803
S-SECTXT · security.txt (RFC 9116) · ملف security.txt (RFC 9116)
Publish /.well-known/security.txt as text/plain; charset=utf-8 so researchers know how to report a vulnerability.
Caution: Expires must be renewed before it passes (less than a year ahead is recommended); an expired file is treated as invalid.
تنبيه: يجب تجديد قيمة Expires قبل حلول موعدها (يُنصح بأن تكون بعد أقل من سنة)، فالملف المنتهي يُعدّ غير صالح.
All platforms
Contact: mailto:security@example.com
Expires: <scan date + 6 months, e.g. 2027-05-13T00:00:00.000Z>
Preferred-Languages: ar, en
Canonical: https://example.com/.well-known/security.txt
Policy: https://example.com/security-policy
Expires is the scan date + 6 months (RFC 9116 §2.5.5 recommends less than a year).
S-CACHE · Do not cache sensitive responses · منع تخزين الاستجابات الحساسة مؤقتًا
Send Cache-Control: no-store on personalised and authenticated responses, never public/s-maxage, and clear the browser's data on logout.
Caution: Apply no-store only to sensitive paths: on static assets it slows the site down. Clear-Site-Data "cookies" logs the user out of every subdomain, so send it on the logout response only.
تنبيه: طبّق no-store على المسارات الحساسة فقط، لأنها تُبطئ الموقع إن طُبّقت على الملفات الثابتة. وتُخرج القيمة Clear-Site-Data "cookies" المستخدم من كل النطاقات الفرعية، فأرسلها في استجابة تسجيل الخروج فقط.
All platforms
Cache-Control: no-store
Clear-Site-Data: "cache", "cookies", "storage" (logout response only)
OWASP: Cache-Control: no-store, max-age=0.
nginx
add_header Cache-Control "no-store" always;
In the sensitive location{}.
Apache httpd 2.4
<LocationMatch "^/(account|admin)">
Header always set Cache-Control "no-store"
</LocationMatch>
Django
from django.views.decorators.cache import never_cache
@never_cache
def account(request): ...
Spring Security 6 / Spring Boot
Default on secured responses (no-cache, no-store, max-age=0, must-revalidate).
ASP.NET Core 8+
[ResponseCache(NoStore = true, Location = ResponseCacheLocation.None)]
Cloudflare
Cache Rules → bypass cache for authenticated paths / when a session cookie is present.
S-DEPR · Remove deprecated security headers · إزالة ترويسات الأمان المتقادمة
Remove Public-Key-Pins, Expect-CT and Feature-Policy (use Permissions-Policy); set X-XSS-Protection: 0 or remove it; set X-Permitted-Cross-Domain-Policies: none.
Caution: Move any feature rules from Feature-Policy into Permissions-Policy before removing it, or those features become allowed again.
تنبيه: انقل قواعد الميزات من Feature-Policy إلى Permissions-Policy قبل حذفها، وإلا عادت تلك الميزات مسموحة.
All platforms
X-XSS-Protection: 0
X-Permitted-Cross-Domain-Policies: none
nginx
add_header X-XSS-Protection "0" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
proxy_hide_header Public-Key-Pins;
proxy_hide_header Expect-CT;
proxy_hide_header Feature-Policy;
Apache httpd 2.4
Header always set X-XSS-Protection "0"
Header always set X-Permitted-Cross-Domain-Policies "none"
Header always unset Public-Key-Pins
Header always unset Expect-CT
Header always unset Feature-Policy
IIS 10 (web.config)
<add name="X-Permitted-Cross-Domain-Policies" value="none" />
Inside <system.webServer><httpProtocol><customHeaders> of web.config.
Caddy 2
header X-Permitted-Cross-Domain-Policies "none"
ASP.NET Core 8+
app.Use(async (ctx, next) => {
ctx.Response.Headers["X-Permitted-Cross-Domain-Policies"] = "none";
await next(); });
Cloudflare
Rules → Transform Rules → Modify Response Header → Set static: X-Permitted-Cross-Domain-Policies = none
Used by: WEB311, WEB312, WEB316
S-BREACH · BREACH: protect secrets in compressed responses · BREACH: حماية الأسرار في الاستجابات المضغوطة
Keep compression; mask CSRF tokens per response (Django, Rails and Laravel already do), avoid reflecting user input next to secrets, or disable compression on those pages only.
Caution: Turning compression off site-wide makes pages slower and is not needed; limit it to pages that mix secrets with user input.
تنبيه: تعطيل الضغط في الموقع كله يبطئ الصفحات ولا حاجة إليه؛ فاقصره على الصفحات التي تخلط الأسرار بمدخلات المستخدم.
nginx
gzip off; # only in the location{} of pages that mix secrets with user input
Used by: WEB119
S-HTML · Fix the page markup or script · إصلاح كود الصفحة أو السكربت
Change the markup or script named in the evidence: add rel="noopener" to target=_blank links, send forms with POST to your own HTTPS origin, keep secrets out of URLs and treat location/postMessage data as untrusted.
Caution: Test the page after the change: forms, sign-in and links to partner sites can depend on the old behaviour.
تنبيه: اختبر الصفحة بعد التعديل، فالنماذج وتسجيل الدخول والروابط إلى المواقع الشريكة قد تعتمد على السلوك القديم.
All platforms
<a href="https://partner.example.net/" target="_blank" rel="noopener noreferrer">…</a>
Used by: WEB505, WEB508, WEB509, WEB511, WEB512, WEB513, WEB514, WEB518, WEB520, WEB521, WEB522, WEB614, WEB619, WEB802
S-SECRET · Revoke and rotate the exposed secret · إبطال السرّ المكشوف واستبداله
Revoke the secret at its provider and issue a new one first, then move it server-side so it never reaches the browser again, and check the provider's logs for misuse.
Caution: Removing the secret from the page is not enough: it is already public and cached, so it must be revoked.
تنبيه: حذف السرّ من الصفحة لا يكفي، فقد صار علنيًا ومخزّنًا في ذاكرات مؤقتة، ولا بد من إبطاله.
All platforms
Use the provider's key-management page to revoke the key; for payment card data, follow your PCI DSS incident process.
Used by: WEB609, WEB610, WEB612, WEB613
S-ADMIN · Restrict admin and login pages · تقييد صفحات الإدارة والدخول
Allow admin paths only from your network or VPN, or protect them with strong authentication, MFA and rate limiting.
Caution: Make sure you keep a way in (a VPN or an allowed address) before restricting the admin path, or you lock yourself out.
تنبيه: تأكد من بقاء طريق للوصول (VPN أو عنوان مسموح) قبل تقييد مسار الإدارة، حتى لا تُغلق الباب على نفسك.
nginx
location /admin/ { allow 203.0.113.0/24; deny all; }
Apache httpd 2.4
<Location "/admin/">
Require ip 203.0.113.0/24
</Location>
Used by: WEB083
S-TAKEOVER · Remove the dangling DNS record · حذف سجل DNS المعلّق
Delete the CNAME (or other record) that points to the unclaimed provider resource, or claim the resource again at the provider, today.
Caution: Check the subdomain's content and cookies after reclaiming it: someone may already have served pages from it.
تنبيه: افحص محتوى النطاق الفرعي وكوكيزه بعد استعادته، فربما قدّم أحدهم صفحات منه بالفعل.
All platforms
Remove the record at your DNS provider, then confirm with your provider's DNS lookup tool.
Used by: WEB901
S-INCIDENT · Incident response · الاستجابة للحادث
Treat the site as compromised: preserve a copy of the evidence, find and close the entry point, then remove the injected code (or restore a known-clean copy), rotate credentials and check the other pages.
Caution: Restoring a backup without closing the entry point lets the attacker return; patch first.
تنبيه: استعادة نسخة احتياطية دون سد نقطة الدخول تسمح للمهاجم بالعودة، فأصلح الثغرة أولًا.
All platforms
Notify affected users and the authorities your law requires.
Used by: WEB507