Security Headers Analysis
What is Security Headers Analysis?
Comprehensive check for HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and Permissions-Policy.
This vulnerability class falls under the Configuration & Deployment Management phase of the OWASP Testing Guide (WSTG-CONF). Security engineers prioritise configuration & deployment management checks early in an assessment because weaknesses here provide a foothold that amplifies the severity of vulnerabilities found in later phases.
Security Impact
Security headers are your first line of defence against XSS, clickjacking, and MIME sniffing. This module grades your header configuration.
Left undetected, security headers analysis issues can persist unnoticed for months. Continuous automated scanning ensures your team receives an alert the moment a regression or new exposure is introduced — long before an attacker discovers it through manual enumeration or automated offensive tooling.
How DygDog Detects It
DygDog audits server configuration, exposed file paths, HTTP methods, and deployment artefacts without sending malicious payloads, making the check safe to run continuously in production.
The Security Headers Analysis check is implemented as a passive scan module, meaning it never sends dangerous payloads or modifies application state. Scans complete in approximately 600 ms and run continuously in the background so your security posture reflects the current state of your site — not a point-in-time snapshot.
Sample Finding
The following illustrates what a positive Security Headers Analysis detection looks like in practice.
Observed
Missing: Content-Security-Policy, Strict-Transport-Security, X-Frame-Options. Present but misconfigured: `X-Content-Type-Options: nosniff` absent; `Referrer-Policy` set to `unsafe-url` leaking full URLs to third parties.
Risk
No CSP means any injected script runs without restriction. Missing HSTS allows SSL-stripping attacks on first visit. Missing X-Frame-Options enables clickjacking — an attacker can overlay your login form in a transparent iframe.
Fix
Add to your Next.js `next.config.js` headers: `Content-Security-Policy: default-src 'self'`, `Strict-Transport-Security: max-age=31536000; includeSubDomains`, `X-Frame-Options: DENY`, `X-Content-Type-Options: nosniff`, `Referrer-Policy: strict-origin-when-cross-origin`.
Remediation Approach
Harden server and framework defaults by disabling unused HTTP methods, removing version banners from response headers, and applying a principle-of-least-privilege to file permissions and deployment artefacts.
DygDog does not stop at detection. When a Security Headers Analysis finding is confirmed, the platform generates infrastructure-aware, copy-paste-ready remediation snippets using frontier AI models. Instead of generic advice you need to adapt, you receive code that targets your exact server, framework, and configuration.
OWASP References
This check maps to the following OWASP Testing Guide test cases:
- WSTG-CONF-07View OWASP WSTG →
Related Configuration & Deployment Management Checks
These checks belong to the same testing phase and are often assessed together:
TLS/SSL Configuration
Validates HTTPS enforcement, certificate validity, protocol versions, and cipher suite strength.
HTTP Methods Testing
Tests for dangerous HTTP methods (TRACE, PUT, DELETE, OPTIONS) that may be unintentionally enabled.
File Extension & MIME Handling
Tests how the server handles various file extensions and MIME types, looking for bypass opportunities.
Backup & Unreferenced File Discovery
Probes for common backup files (.bak, .old, .sql), editor artifacts (.swp, ~), and unreferenced pages.
Detect Security Headers Analysis on Your Site
DygDog runs continuous passive scans across 74 vulnerability checks — including Security Headers Analysis — and notifies you the moment an issue is detected. Start a free scan in under 60 seconds, no installation required.
Start Free Scan