www.mygov.scot
Grade A+ · 90/100 · 6/7 security headers present
Security Score
Security Headers
CSP Violations
Issues Found
Recommendations
Security
90 / 100Excellent security posture with strong CSP protections in place.
Compliance
77 / 100Mostly compliant but some directives or headers are missing.
Best Practices
47 / 100Few best practices adopted — significant room for improvement.
CSP Analysis
script-src 'nonce-hJeezPxJfbMx2eFBgdaDKA' 'self' https://code.jquery.com https://www.youtube.com https://s.ytimg.com https://www.google-analytics.com https://www.googletagmanager.com https://tagmanager.google.com https://translate.google.com https://translate.googleapis.com https://plausible.io https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/; img-src 'self' data: https://*.ytimg.com https://img.youtube.com https://www.google.com https://*.google-analytics.com https://*.analytics.google.com https://www.googletagmanager.com https://www.gstatic.com https://translate.google.com https://translate.googleapis.com https://img.evbuc.com; connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://www.google.com/recaptcha/ https://plausible.io; style-src 'self' 'unsafe-inline' https://tagmanager.google.com https://translate.google.com https://translate.googleapis.com; font-src 'self' data:; frame-src 'self' https://www.youtube.com https://youtu.be https://www.youtube-nocookie.com https://youtube-nocookie.com https://www.googletagmanager.com https://www.google.com/recaptcha/; object-src 'none'; report-uri /service/csp;
Directive Analysis
Missing Directives
Security Headers
Isolates the browsing context to prevent Spectre-type side-channel attacks and cross-origin window manipulation.
How to add it:
add_header Cross-Origin-Opener-Policy "same-origin" always;Header always set Cross-Origin-Opener-Policy "same-origin"Rules > Transform Rules > HTTP Response Header Modification > Set Cross-Origin-Opener-Policy to "same-origin"accelerometer=(), autoplay=(), camera=(), clipboard-read=(), clipboard-write=(self), cross-origin-isolated=(), document-domain=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), xr-spatial-tracking=()
Restricts which browser features (camera, microphone, geolocation) the page can use, limiting attack surface.
no-referrer, strict-origin-when-cross-origin
Controls how much referrer information is sent with requests, preventing data leaks to third parties.
max-age=31536000; includeSubDomains; preload
Forces browsers to use HTTPS for all future requests, preventing man-in-the-middle attacks and SSL stripping.
nosniff
Prevents browsers from MIME-sniffing responses away from the declared Content-Type, blocking drive-by downloads.
SAMEORIGIN
Prevents the page from being embedded in iframes, protecting against clickjacking attacks.
1; mode=block
Legacy XSS filter for older browsers. Modern browsers use CSP instead. Set to "0" to avoid false positives.
1 recommended security header is missing on www.mygov.scot.
Issues Found
- •CDN: 'code.jquery.com' in script-src - Controlled source but older jQuery versions have XSS vulnerabilitieslow
- •Deprecated: 'report-uri' is deprecated in CSP Level 3. Use 'report-to' directive instead.info
- •Info: 'data:' URI in font-srcinfo
- •Info: 'data:' URI in img-srcinfo
- •Missing CRITICAL directive default-src (Base fallback directive)critical
- •Missing HIGH directive base-uri (Base URI control - prevents base tag injection)high
- •Missing HIGH directive frame-ancestors (Framing control - prevents clickjacking)high
- •Missing MEDIUM directive form-action (Form submission control - prevents form hijacking)medium
- •Missing security header: Cross-Origin-Opener-Policymedium
- •Unsafe inline execution allowed in style-srchigh
Recommendations
- →Add base-uri directive with appropriate restrictions
- →Add default-src directive with appropriate restrictions
- →Add form-action directive with appropriate restrictions
- →Add frame-ancestors directive with appropriate restrictions
- →Consider implementing a stricter Content Security Policy
Beyond headers: infrastructure exposure
via OSN, our sister projectSecurity headers protect the browser. OSN maps what's exposed underneath — servers, open ports, known CVEs, DNS and WHOIS.
www.mygov.scot
1 scan since 9/16/2026
Latest: 90/100
Total Scans
1
Latest Score
90/100
First Scan
9/16/2026
Last Scan
9/16/2026
Security
90 / 100Excellent security posture with strong CSP protections in place.
Compliance
77 / 100Mostly compliant but some directives or headers are missing.
Best Practices
47 / 100Few best practices adopted — significant room for improvement.
Scan History
| Date | Score | CSP | Headers | Issues | Action |
|---|---|---|---|---|---|
| Sep 16, 2026 | A+ (90) | Yes | 6/7 | 10 | View → |
Show off your security grade
Embed this badge on your site or README. It updates automatically after each scan and links back to this report.
<a href="https://headertest.com/results/www.mygov.scot" title="Security headers grade for www.mygov.scot — HeaderTest">
<img src="https://headertest.com/api/badge/www.mygov.scot" alt="HeaderTest security grade: A+ (90/100) for www.mygov.scot" />
</a>[](https://headertest.com/results/www.mygov.scot)