ตัวตรวจสอบความปลอดภัยส่วนหัว HTTP
ตรวจสอบส่วนหัว HTTP response ที่วางลงไปแบบออฟไลน์ 100% ทั้ง HSTS, CSP, X-Frame-Options, Referrer-Policy, Permissions-Policy, Set-Cookie, COOP/CORP และ Cache-Control
| Header | Status | Observed | Finding & Fix |
|---|---|---|---|
Strict-Transport-Security Security | fail | Missing | HTTPS enforcement header is absent, allowing downgrade or SSL-stripping risks. Set max-age to at least 31536000 (1 year) with includeSubDomains. |
Content-Security-Policy Security | fail | default-src * 'unsafe-inline' 'unsafe-eval' | CSP permits 'unsafe-eval', weakening XSS protection. Remove 'unsafe-eval', wildcards, and http:// sources; use nonces/hashes. |
X-Frame-Options Security | fail | Missing | Missing clickjacking protection (neither X-Frame-Options nor CSP frame-ancestors). Set X-Frame-Options: DENY (or SAMEORIGIN). |
X-Content-Type-Options Security | fail | Missing | Browser MIME-type sniffing is not disabled. Set X-Content-Type-Options: nosniff. |
Referrer-Policy Security | fail | Missing | Referrer-Policy header is missing. Set Referrer-Policy: strict-origin-when-cross-origin. |
Permissions-Policy Security | warn | Missing | Permissions-Policy is not set to restrict powerful browser APIs. Restrict camera, microphone, geolocation, and payment APIs. |
Set-Cookie Cookies | fail | session=abc123; Path=/ | session missing Secure, HttpOnly, SameSite Add Secure; HttpOnly; SameSite=Lax (or Strict) to every sensitive cookie. |
COOP / CORP Isolation | warn | Missing | Cross-Origin-Opener-Policy and Cross-Origin-Resource-Policy are absent. Add COOP: same-origin and CORP: same-origin to isolate browsing contexts. |
Cache-Control Caching | fail | public, max-age=600 | Response sets cookies while marking Cache-Control as public (risk of shared cache leak). Switch to Cache-Control: private, no-store when setting user cookies. |
Server / X-Powered-By Leakage | warn | Server: Apache/2.4.49 (Unix); X-Powered-By: PHP/8.1.2 | Runtime or server version fingerprint exposed in response headers. Strip X-Powered-By and omit exact software version numbers from Server. |
วิธีใช้งาน
- คัดลอกส่วนหัว HTTP response ดิบจากคำสั่ง curl -I หรือ DevTools ของเบราว์เซอร์มาวางในช่องนำเข้า
- ดูเกรดรวมตั้งแต่ A+ ถึง F สถิติผ่าน/เตือน/ไม่ผ่าน และตารางวิเคราะห์รายละเอียดของแต่ละส่วนหัว
- คัดลอกส่วนหัวแก้ไขที่แนะนำหรือดาวน์โหลดรายงานเพื่อนำไปเสริมความปลอดภัยให้ระบบทันที
ตัวตรวจสอบความปลอดภัยส่วนหัว HTTP คืออะไร?
ตัวตรวจสอบความปลอดภัยส่วนหัว HTTP และการแคชเป็นเครื่องมือวิเคราะห์ฝั่งไคลเอนต์ 100% ที่ให้คะแนนส่วนหัว HTTP response ตั้งแต่ A+ ถึง F โดยไม่สแกนเซิร์ฟเวอร์ภายนอกหรือเปิดเผยสภาพแวดล้อมทดสอบภายใน ช่วยตรวจพบการขาดการป้องกันการส่งข้อมูล คำสั่ง Content-Security-Policy ที่อ่อนแอ แฟล็กคุกกี้ที่ไม่ปลอดภัย และการตั้งค่าแคชที่เสี่ยงต่อข้อมูลรั่วไหล
วิธีการทำงาน
เมื่อคุณวางส่วนหัวคำตอบจาก curl -I หรือแท็บ Network ใน DevTools ของเบราว์เซอร์ พาร์เซอร์ TypeScript จะแยกบรรทัดสถานะ รายการ Set-Cookie หลายบรรทัด และค่าส่วนหัวโดยไม่สนตัวพิมพ์เล็ก-ใหญ่ จากนั้นกฎถ่วงน้ำหนัก 10 ข้อด้านความปลอดภัย การแยกต้นทาง การรั่วไหล และแคชจะคำนวณเกรดพร้อมสร้างชุดส่วนหัวสำหรับแก้ไขให้คัดลอกได้ทันที
การใช้งานทั่วไป
- ตรวจสอบส่วนหัว HTTP ของเครื่องพัฒนาในองค์กรหรือเซิร์ฟเวอร์ทดสอบภายในที่เครื่องมือสแกนออนไลน์ภายนอกเข้าไม่ถึง
- ตรวจจับคำสั่ง Content-Security-Policy ที่อันตราย เช่น 'unsafe-eval', 'unsafe-inline' หรือไวลด์การ์ด *
- ยืนยันว่าส่วนหัว Set-Cookie ของเซสชันบังคับใช้แอตทริบิวต์ Secure, HttpOnly และ SameSite ครบถ้วน
- ตรวจนโยบาย CDN Cache-Control และ stale-while-revalidate เพื่อป้องกันความเสี่ยงที่แคชจะเก็บคุกกี้ส่วนตัว
รายละเอียดทางเทคนิค
พาร์เซอร์แบบสถิตที่ไม่ใช้เครือข่าย รองรับบรรทัดสถานะ HTTP/1.x และ HTTP/2 คำนำหน้า curl -v '< ' การแยกโทเคนคำสั่ง CSP การตรวจแฟล็กหลายคุกกี้ การตรวจสอบการแยกส่วน COOP/CORP การตรวจการเปิดเผยเวอร์ชันใน Server/X-Powered-By และการสังเคราะห์ส่วนหัวแก้ไขโดยอัตโนมัติ
คำถามที่พบบ่อย
ตัวตรวจสอบนี้ส่งคำขอผ่านเครือข่ายไปยังเว็บไซต์ของฉันหรือไม่?
ไม่ คุณวางส่วนหัวคำตอบจาก DevTools หรือ curl -I โดยตรง และกฎความปลอดภัยและการแคชทั้งหมดจะถูกประเมินแบบออฟไลน์ภายในเบราว์เซอร์ของคุณ
การตรวจสอบใดบ้างที่ใช้คำนวณเกรด A+ ถึง F?
ระบบจะประเมิน Strict-Transport-Security, Content-Security-Policy (แจ้งเตือน unsafe-eval, unsafe-inline และไวลด์การ์ด), X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, แฟล็ก Set-Cookie, การแยก COOP/CORP และความปลอดภัยของ Cache-Control
เหตุใด Cache-Control จึงสำคัญต่อความปลอดภัย?
การตั้งค่า Cache-Control: public พร้อมกับการส่งคุกกี้เซสชันอาจทำให้ CDN หรือพร็อกซีที่ใช้ร่วมกันแคชข้อมูลส่วนตัวของผู้ใช้ไว้ได้ คำตอบที่มีข้อมูลละเอียดอ่อนควรใช้ private, no-store ส่วนไฟล์สถิตควรใช้ max-age และ stale-while-revalidate