Skip to content
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

MAF-005: [MODERATE] Missing / incorrect security headers #2239

Closed
4 tasks done
Tracked by #1681
Floppy opened this issue Jun 10, 2024 · 2 comments
Closed
4 tasks done
Tracked by #1681

MAF-005: [MODERATE] Missing / incorrect security headers #2239

Floppy opened this issue Jun 10, 2024 · 2 comments
Labels
bug Something isn't working security

Comments

@Floppy
Copy link
Collaborator

Floppy commented Jun 10, 2024

Important security headers are missing or misconfigured.

Technical description:

The application lacks essential security headers or has these misconfigured:

  • X-XSS-Protection is set to 0
  • The CSP header is minimal (frame-ancestors 'self')
  • Lack of Strict-Transport-Security header
  • Missing Permissions-Policy

Impact:

Missing or misconfigured security headers might expose the application to XSS attacks, clickjacking, and other security risks.

Recommendation:

  • Remove the obsolete X-XSS-Protection header and rely on modern browser built-in XSS protection such as CSP. NOTE: this is just set to 0 by default by Rails for legacy clients.
  • Enhance the CSP header to restrict content sources and prevent unauthorized access, e.g. adding script-src, object-src and require-trusted-types-for. Add Content-Security-Policy to increase security #2287
  • Implement the Strict-Transport-Security header to enforce secure connections. Add HTTPS_ONLY env option to force secure-only connections #2275
  • Add the Permissions-Policy header to control which browser features can be used and by which origins.
@Floppy Floppy added bug Something isn't working security labels Jun 10, 2024
@Floppy Floppy changed the title MAF-005: Missing / incorrect security headers MAF-005: [MODERATE] Missing / incorrect security headers Jun 17, 2024
@Floppy
Copy link
Collaborator Author

Floppy commented Jun 19, 2024

Ignoring Permissions-Policy as there seems to be no way yet to ban all browser features and whitelist the ones we actually want. Of which, at the moment, there aren't any, so we'd have to ban everything and keep the list up to date, which seems impractical. See w3c/webappsec-permissions-policy#189

@Floppy
Copy link
Collaborator Author

Floppy commented Jun 19, 2024

require-trusted-types-for is still experimental, so we'll leave that out for now as well.

@Floppy Floppy closed this as completed Jun 19, 2024
@github-project-automation github-project-automation bot moved this from Maybe to Done in Manyfold Roadmap Jun 19, 2024
@github-project-automation github-project-automation bot moved this from Maybe to Done in Manyfold Development Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working security
Projects
Archived in project
Development

No branches or pull requests

1 participant