-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[VPAT-50] chore(security): add X-Frame-Options header to nginx configuration to prevent clickjacking attacks #8507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,12 @@ http { | |
| server { | ||
| listen 3000; | ||
|
|
||
| # Security headers | ||
| add_header X-Frame-Options "DENY" always; | ||
| add_header X-Content-Type-Options "nosniff" always; | ||
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | ||
| add_header X-XSS-Protection "1; mode=block" always; | ||
|
Comment on lines
+23
to
+27
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's look at the nginx.conf file to understand the actual configuration
cat -n apps/web/nginx/nginx.confRepository: makeplane/plane Length of output: 1118 🏁 Script executed: # Search for HTTPS, SSL, and port configurations
rg -n "listen|ssl|https|443" apps/web/nginx/nginx.confRepository: makeplane/plane Length of output: 78 🏁 Script executed: # Search for reverse proxy or upstream configurations
rg -n "proxy_pass|upstream" apps/web/nginx/Repository: makeplane/plane Length of output: 41 🌐 Web query:
💡 Result: Short answer: X-XSS-Protection is deprecated — modern browsers removed or stopped honoring it because the built‑in XSS auditors were inconsistent, bypassable and could create side‑channel/XS‑Leak issues. Use a strong Content‑Security‑Policy instead; if you must keep the header for very old browsers, explicitly disable the broken auditor with "X-XSS-Protection: 0". (owasp.org) Citations: Remove deprecated X-XSS-Protection header and reconsider HSTS on HTTP. Good additions for X-Frame-Options and X-Content-Type-Options. However:
🤖 Prompt for AI Agents |
||
|
|
||
| location / { | ||
| root /usr/share/nginx/html; | ||
| index index.html index.htm; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: makeplane/plane
Length of output: 146
🏁 Script executed:
Repository: makeplane/plane
Length of output: 1119
🏁 Script executed:
Repository: makeplane/plane
Length of output: 1118
🌐 Web query:
HSTS Strict-Transport-Security HTTP port 3000 browser behavior💡 Result:
Short answer
Key points
Examples
Sources
[1] MDN: Strict-Transport-Security header.
[2] RFC 6797 (HTTP Strict Transport Security).
🌐 Web query:
X-XSS-Protection deprecated obsolete 2024💡 Result:
Short answer: Yes — X-XSS-Protection is functionally deprecated/obsolete in modern browsers and is no longer recommended (use Content-Security-Policy instead). Set it to 0 or stop sending it. [1][2][3][4]
Key points and sources:
If you want, I can show the exact header config snippets (NGINX/Apache/Express) to explicitly disable it and add a CSP example.
🌐 Web query:
Content-Security-Policy frame-ancestors modern browser support💡 Result:
Short summary — modern support for Content-Security-Policy's frame-ancestors
Sources: MDN (frame-ancestors) [1]; Mozilla web-security guidance (recommend X-Frame-Options fallback) [2]; content-security-policy.com compatibility notes [3].
Verify HSTS usage and remove deprecated X-XSS-Protection header.
Good additions for X-Frame-Options and X-Content-Type-Options. However, there are concerns with the other headers:
HSTS on port 3000 (line 26): The
Strict-Transport-Securityheader only functions over HTTPS connections. Since this server listens on HTTP port 3000, browsers will ignore this header entirely. If a reverse proxy handles HTTPS termination in front, verify that HSTS is appropriate for your deployment architecture. Otherwise, remove this header.X-XSS-Protection is deprecated (line 27): This header is obsolete and no longer honored by modern browsers (Chrome removed the XSS Auditor; Firefox and Edge don't implement it). Remove this header and rely on
Content-Security-Policyinstead.Consider adding Content-Security-Policy: Add a CSP header with appropriate directives including
frame-ancestors 'none'(which supersedes X-Frame-Options in modern browsers) anddefault-src 'self'. Keep X-Frame-Options as a fallback for older browsers.🔒 Proposed security header improvements
📝 Committable suggestion
🤖 Prompt for AI Agents