XSS-Angriffe mit Content Security Policy eindämmen

:bookmark: Diese Anleitung erklärt, wie Sie Content Security Policy (CSP) verwenden, um Cross-Site-Scripting-Angriffe (XSS) in Discourse zu mindern. Sie behandelt die Grundlagen von CSP, die Konfiguration und bewährte Verfahren.

:person_raising_hand: Erforderliche Benutzerstufe: Administrator

Zusammenfassung

Content Security Policy (CSP) ist ein entscheidendes Sicherheitsfeature in Discourse, das zum Schutz vor Cross-Site-Scripting (XSS) und anderen Injektionsangriffen beiträgt. Diese Anleitung behandelt die Grundlagen von CSP, deren Umsetzung in Discourse und die Konfiguration für Ihre Seite.

Was ist Content Security Policy?

Content Security Policy ist eine zusätzliche Sicherheitsebene, die hilft, bestimmte Angriffsarten zu erkennen und zu mindern, darunter Cross-Site-Scripting (XSS) und Dateninjektionsangriffe. CSP funktioniert, indem festgelegt wird, welche Inhaltsquellen als vertrauenswürdig gelten, und der Browser angewiesen wird, Ressourcen nur von diesen vertrauenswürdigen Quellen auszuführen oder darzustellen.

XSS bleibt eine der häufigsten Schwachstellen im Web. Durch die Implementierung von CSP erlaubt Discourse das Laden und Ausführen von Skripten nur aus vertrauenswürdigen Quellen, was das Risiko von XSS-Angriffen erheblich verringert.

CSP-Implementierung in Discourse

Ab Discourse-Version 3.3.0.beta1 implementiert Discourse eine CSP mit „strict-dynamic". Dieser Ansatz verwendet einen einzigen nonce--Wert und das Schlüsselwort strict-dynamic in der Direktive script-src. Alle initialen <script>-Tags im Kern und in Themes erhalten automatisch das entsprechende Attribut nonce=.

Die Standardrichtlinie umfasst folgende Direktiven:

  • script-src: Legt gültige Quellen für JavaScripts fest
  • worker-src: Legt gültige Quellen für ServiceWorker-Skripte fest
  • object-src: Blockiert die Ausführung von Plugins (Flash, Java usw.)
  • base-uri: Beschränkt die URLs für <base>-Elemente
  • manifest-src: Beschränkt die URLs für Web-App-Manifeste
  • frame-ancestors: Steuert, welche Seiten Ihre Discourse-Instanz in einem iframe einbetten können
  • upgrade-insecure-requests: Aktualisiert HTTP-Anfragen automatisch auf HTTPS (enthaltet, wenn force_https aktiviert ist)

CSP in Discourse konfigurieren

Verfügbare Einstellungen

  • content_security_policy: Aktiviert oder deaktiviert CSP (Standard: an)
  • content_security_policy_report_only: Aktiviert den CSP Report-Only-Modus (Standard: aus)
  • content_security_policy_script_src: Ermöglicht die Erweiterung der Standard-script-src-Direktive
  • content_security_policy_frame_ancestors: Aktiviert die frame_ancestors-Direktive (Standard: an)

So aktivieren Sie CSP

  1. Navigieren Sie zu Ihrem Admin-Bereich.
  2. Gehen Sie zu den Sicherheitseinstellungen.
  3. Suchen Sie die Einstellung content_security_policy und stellen Sie sicher, dass sie aktiviert ist.

Es wird empfohlen, zunächst den CSP Report-Only-Modus zu verwenden, um potenzielle Probleme zu identifizieren, bevor Sie CSP vollständig aktivieren:

  1. Aktivieren Sie die Einstellung content_security_policy_report_only.
  2. Überwachen Sie die Browserkonsole auf CSP-Verletzungen.
  3. Beheben Sie legitime Verletzungen, indem Sie die CSP bei Bedarf erweitern.
  4. Sobald Sie sicher sind, dass es keine falschen Positivmeldungen gibt, deaktivieren Sie den Report-Only-Modus und aktivieren Sie CSP vollständig.

Erweiterung der Standard-CSP

Wenn Sie zusätzliche Skriptquellen zulassen müssen, können Sie die script-src-Direktive mit der Einstellung content_security_policy_script_src erweitern. Sie können hinzufügen:

  • Hash-Quellen
  • 'wasm-unsafe-eval'
  • 'unsafe-eval' (mit Vorsicht verwenden)

Beispiel:

'sha256-QFlnYO2Ll+rgFRKkUmtyRublBc7KFNsbzF7BzoCqjgA=' 'unsafe-eval'

:warning: Seien Sie vorsichtig beim Hinzufügen von 'unsafe-eval' oder anderen zulässigen Direktiven, da dies die Wirksamkeit von CSP verringern kann.

CSP und Integrationen von Drittanbietern

Bei der Verwendung von Diensten von Drittanbietern wie Google Tag Manager, Google Analytics oder Werbediensten müssen Sie möglicherweise Ihre CSP-Einstellungen anpassen. In den meisten Fällen mit Discourse-Version 3.3.0.beta1 oder höher funktionieren externe Skripte aufgrund der „strict-dynamic"-CSP-Implementierung ohne zusätzliche Konfiguration.

Wenn Sie auf Probleme stoßen, müssen Sie möglicherweise:

  1. Die erforderlichen Skriptquellen identifizieren, indem Sie die Browserkonsole überwachen.
  2. Die erforderlichen Quellen zur Einstellung content_security_policy_script_src hinzufügen.
  3. Bei komplexen Integrationen wie Werbediensten, die externe Ressourcen laden, die cross-domain-Rendering-Funktion aktivieren (Beispiel-PR von discourse-adplugin, die dies umsetzt).

Bewährte Verfahren

  1. Beginnen Sie mit dem CSP Report-Only-Modus, um potenzielle Probleme zu identifizieren.
  2. Verschärfen Sie Ihre CSP schrittweise, während Sie legitime Verletzungen beheben.
  3. Überprüfen Sie regelmäßig Ihre CSP-Einstellungen und passen Sie sie bei Bedarf an.
  4. Seien Sie vorsichtig beim Hinzufügen zulässiger Direktiven wie 'unsafe-eval' oder 'wasm-unsafe-eval'.
  5. Halten Sie Ihre Discourse-Instanz auf dem neuesten Stand, um von den neuesten CSP-Verbesserungen zu profitieren.

Häufig gestellte Fragen (FAQs)

F: Ich sehe viele CSP-Verletzungsberichte. Sollte ich besorgt sein?
A: Viele CSP-Verletzungen sind falsche Positivmeldungen, die oft durch Browsererweiterungen oder andere nicht zusammenhängende Skripte verursacht werden. Konzentrieren Sie sich auf die Behebung von Verletzungen, die sich auf die Funktionalität Ihrer Seite beziehen.

F: Kann ich CSP mit Google AdSense oder anderen Werbenetzwerken verwenden?
A: Ja, aber Sie müssen möglicherweise zulässigere CSP-Einstellungen verwenden. Beginnen Sie mit dem Report-Only-Modus und passen Sie Ihre Einstellungen basierend auf den gemeldeten Verletzungen an.

F: Wie behebe ich CSP-Probleme?
A: Verwenden Sie die Entwicklertools Ihres Browsers, um die Konsole auf CSP-Verletzungsmeldungen zu überwachen. Diese helfen Ihnen zu identifizieren, welche Ressourcen blockiert werden und warum.

Zusätzliche Ressourcen

56 „Gefällt mir“
Adsense Not Working after Recent Discourse Update
Discourse 2.2.0.beta6 Release Notes
Adding statcounter code
How to install npm packages in custom themes/plugins
How to restart Discourse after server reboot?
Interactive SVG using <object>?
Video Upload to YouTube and Vimeo using Theme Component
Embed HTML5 player for MP3 file
2.5.0.beta5 breaks retort plugin
Should I load third-party libraries from vendor or cdn?
Word Cloud plugin
Embed widget within text in a topic
Discourse Intercom (Advanced)
Push custom events to Google Tag Manager and Analytics
Google Tag Manager and Discourse CSP (Content Security Policy)
Cookie Consent, GDPR, and Discourse
A strange question about google ad display in my site
How to pass a component setting as a value to an attribute?
Need help integrating code wrote on Edittext to the Discourse
Issue with Activate Account Page After Update to 3.4.0 (Blank Page)
"Unsafe JavaScript attempt to initiate navigation"
(Superseded) Experimenting with a 'strict-dynamic' Content Security Policy (CSP)
Can't get script tag to work in landing pages plugin due to content-security-policy
How to embed Razorpay subscription button with CSP restrictions
Any approved method for adding Javascript before body close?
Can I add a snippet to the header?
JS script is not loading
How do we fire scripts after topic HTML is rendered in DOM?
Iframe issue without URL
Where to place ad script?
We couldn't find the code on your site
Javascript not working in customised areas
Difficulties in correctly adding external JavaScript
Report Only CSP Violations
Nginx config in Discourse Docker?
EPN Smart Links
Discourse 2.2.0.beta9 Release Notes
"Refused to load the script" when adding adsense
Why Cookie Consent Doesn't Show Up?
[DigitalOcean] hostname having "www" in A records showing blank page
[DigitalOcean] hostname having "www" in A records showing blank page
Communities with embedded Twitter Feeds
How to add analytics and pixel scripts avoiding Content Security Policy (XSS)
When install html script facing issue?
Discourse 2.4.0.beta10 Release Notes
Add CSP sources to the plugin
IP does not redirect to domain, domain shows white page
DISCOURSE_CDN_URL causes content security policy violations?
Header content is missing due to CSP
How to insert something right after <head>?
How can I embed tracking JS into Discourse
How do I integrate ? cookiebot.com in meinen Forum?
Adding Cookie Consent Banner
Confused about remotely loaded javascript content
User input validation
Custom JS script in theme component not loading

I added a note about this to our public security.md file :tada:

13 „Gefällt mir“

As of this commit, we’ve turned off CSP violations reports by default because the vast majority of the reported violations are false positives.

To illustrate this, here is a screenshot of logs from a site running Discourse with CSP enabled and reporting enabled (filtered using “CSP Violation”):

All of the reported violations are not related to the site’s code:

  • violations with ‘minisrclink.cool’ or ‘proxdev.cool’ in the URL have nothing to do with Discourse, they’re likely coming from a browser extension
  • the Google Analytics violation reports are also not legitimate. They are triggered by Firefox in privacy mode, or Firefox with a privacy extension enabled (like DuckDuckGo Privacy Essentials).
  • Violations with ‘inline’, ‘data’ or ‘about’ are triggered by extensions as well. It’s not shown in the screenshot above, but these violations have some more details in the env tab of the log. In there, under script-sample, some of these violations had code like BlockAdBlock or window.klTabId_kis or AG_onLoad, which come from the AdBlock, Kaspersky, and AdGuard extensions, respectively. (I found this repo: CSP-useful/csp-wtf/README.md at master · nico3333fr/CSP-useful · GitHub very useful in helping explain some of these reports.) Some of these violations will have safari-extension or user-script in the source-file variable (again, in env), so that points to Safari extensions as the culprit for the violation.

In other words, there’s a lot of noise in CSP violation reports, so it’s not useful to log them at all times. They might be helpful while you are configuring CSP, but the reporting should be off during the normal operation of a site.

A few final notes: if you site is using a tag manager (like Google Tag Manager or Segment) you need to load the site in your browser, and carefully examine the violations in the console. These tools load third-party scripts from third-party domains and/or inline scripts so you need to carefully whitelist each of them using the source URL or the hash of the inline script (Chrome usefully includes the hash of inline scripts in the console error statement).

If your site uses an advertising service (like Google Ad Manager, Adsense, etc.) you probably will have to use a very permissive policy:

In the screenshot above, the policy allows any script from a https: source and any inline script. (In the future, this might be replaced by the strict-dynamic keyword, but as of this writing, strict-dynamic isn’t supported by Safari or Edge.)

24 „Gefällt mir“

8 posts were split to a new topic: Protocol-less CDN URLs are problematic

Please note that Safari doesn’t understand some parts of CSP, and this is normal:

You can safely ignore the CSP errors in Safari, you’ll see those on all sites, it just means Safari doesn’t understand worker-src and report-sample .

I guess we need to wait for Safari to be updated?

12 „Gefällt mir“

I’m having trouble configuring, which recommendation?

my forum: forum.meuxbox.com.br

link: White blank advertisement

2 „Gefällt mir“

It depends on what URLs your ads are requesting. You can look at your browser’s console to see them.

See also the relevant section from the OP:

4 „Gefällt mir“

https://meta.discourse.org/t/white-blank-advertisement/140098/3?u=eduardo_braga

this solves the problem of the error

6 „Gefällt mir“

Könnten Sie bitte eine Feature-Policy hinzufügen?

Die folgende verwende ich seit über einem Jahr (Host: nginx):

add_header Feature-Policy “geolocation ‘none’; midi ‘none’; notifications ‘self’; push ‘none’; sync-xhr ‘none’; microphone ‘none’; camera ‘none’; magnetometer ‘none’; gyroscope ‘none’; speaker ‘none’; vibrate ‘none’; fullscreen ‘none’; payment ‘none’;”;


Würde es Sinn machen, Folgendes zum Content-Security-Policy-Header hinzuzufügen? Das ist die Konfiguration, die ich erfolgreich verwende (vom Host nginx hinzugefügt, zusätzlich zur integrierten CSP von Discourse):

default-src 'none'
style-src 'self' domain 'unsafe-inline'
img-src https://*.domain.org data: blob: 'unsafe-inline'
font-src 'self' domain
connect-src 'self' domain
manifest-src 'self' domain
3 „Gefällt mir“

Da die Spezifikation noch ein Entwurf ist, erwarte ich nicht, dass wir sie derzeit implementieren. Die von dir genannte Mozilla-Website sagt sogar:

Der Header Feature-Policy befindet sich noch in einem experimentellen Zustand und kann jederzeit Änderungen unterliegen. Sei dir dessen bewusst, wenn du Feature Policy auf deiner Website implementierst.

8 „Gefällt mir“

vibrate 'self' – Likes auf Android lösen eine schwache, kurze Vibration aus.

10 „Gefällt mir“

Ich habe gerade Discourse 2.6.0.beta1 installiert. Muss ich dies neu konfigurieren? Danke.

1 „Gefällt mir“

Das ist nicht nötig, diese Einstellung ist standardmäßig aktiviert. Sie müssen die Konfiguration nur dann anpassen, wenn Sie blockierte externe Ressourcen sehen, die ausgeführt werden sollen.

4 „Gefällt mir“

Ich verwende Version 2.6.0 Beta 2.

Ich nutze folgende Dienste in den Foren:

  • Google Tag Manager
  • Google Ad Manager
  • Google Ad Sense

Derzeit verwende ich nur den Berichtsmodus für CSP, während ich versuche, alle offenen Probleme zu lösen.

Hier sind meine CSP-Einstellungen:

Mit den aktuellen Einstellungen erhalte ich immer noch VIELE CSP-Fehler. Manche scheinen ignoriert werden zu können. Dieser hier verwirrt mich jedoch, da ich die Domain in den CSP-Einstellungen deklariert habe.

Habe ich etwas übersehen?

CSP Violation: 'https://www.googletagmanager.com/gtm.js?id=GTM-T9ZW6PR'

Backtrace:

/var/www/discourse/app/controllers/csp_reports_controller.rb:9:in `create'
actionpack-6.0.3.2/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack-6.0.3.2/lib/abstract_controller/base.rb:195:in `process_action'
actionpack-6.0.3.2/lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack-6.0.3.2/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport-6.0.3.2/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
/var/www/discourse/app/controllers/application_controller.rb:340:in `block in with_resolved_locale'
i18n-1.8.5/lib/i18n.rb:313:in `with_locale'
/var/www/discourse/app/controllers/application_controller.rb:340:in `with_resolved_locale'
activesupport-6.0.3.2/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
activesupport-6.0.3.2/lib/active_support/callbacks.rb:139:in `run_callbacks'
actionpack-6.0.3.2/lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack-6.0.3.2/lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `block in instrument'
activesupport-6.0.3.2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport-6.0.3.2/lib/active_support/notifications.rb:180:in `instrument'
actionpack-6.0.3.2/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
actionpack-6.0.3.2/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord-6.0.3.2/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
actionpack-6.0.3.2/lib/abstract_controller/base.rb:136:in `process'
actionview-6.0.3.2/lib/action_view/rendering.rb:39:in `process'
rack-mini-profiler-2.0.4/lib/mini_profiler/profiling_methods.rb:78:in `block in profile_method'
actionpack-6.0.3.2/lib/action_controller/metal.rb:190:in `dispatch'
actionpack-6.0.3.2/lib/action_controller/metal.rb:254:in `dispatch'
actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:33:in `serve'
actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:49:in `block in serve'
actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:32:in `each'
actionpack-6.0.3.2/lib/action_dispatch/journey/router.rb:32:in `serve'
actionpack-6.0.3.2/lib/action_dispatch/routing/route_set.rb:834:in `call'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:68:in `call'
rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
rack-2.2.3/lib/rack/conditional_get.rb:40:in `call'
rack-2.2.3/lib/rack/head.rb:12:in `call'
/var/www/discourse/lib/content_security_policy/middleware.rb:12:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:336:in `call'
rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
actionpack-6.0.3.2/lib/action_dispatch/middleware/cookies.rb:648:in `call'
actionpack-6.0.3.2/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
activesupport-6.0.3.2/lib/active_support/callbacks.rb:101:in `run_callbacks'
actionpack-6.0.3.2/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack-6.0.3.2/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
actionpack-6.0.3.2/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
actionpack-6.0.3.2/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
logster-2.9.3/lib/logster/middleware/reporter.rb:43:in `call'
railties-6.0.3.2/lib/rails/rack/logger.rb:37:in `call_app'
railties-6.0.3.2/lib/rails/rack/logger.rb:28:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:19:in `call'
/var/www/discourse/config/initializers/100-silence_logger.rb:31:in `call'
actionpack-6.0.3.2/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack-6.0.3.2/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/var/www/discourse/lib/middleware/enforce_hostname.rb:22:in `call'
rack-2.2.3/lib/rack/method_override.rb:24:in `call'
actionpack-6.0.3.2/lib/action_dispatch/middleware/executor.rb:14:in `call'
rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
actionpack-6.0.3.2/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
rack-mini-profiler-2.0.4/lib/mini_profiler/profiler.rb:200:in `call'
message_bus-3.3.1/lib/message_bus/rack/middleware.rb:61:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:176:in `call'
railties-6.0.3.2/lib/rails/engine.rb:527:in `call'
railties-6.0.3.2/lib/rails/railtie.rb:190:in `public_send'
railties-6.0.3.2/lib/rails/railtie.rb:190:in `method_missing'
rack-2.2.3/lib/rack/urlmap.rb:74:in `block in call'
rack-2.2.3/lib/rack/urlmap.rb:58:in `each'
rack-2.2.3/lib/rack/urlmap.rb:58:in `call'
unicorn-5.6.0/lib/unicorn/http_server.rb:632:in `process_client'
unicorn-5.6.0/lib/unicorn/http_server.rb:728:in `worker_loop'
unicorn-5.6.0/lib/unicorn/http_server.rb:548:in `spawn_missing_workers'
unicorn-5.6.0/lib/unicorn/http_server.rb:144:in `start'
unicorn-5.6.0/bin/unicorn:128:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `<main>'

Umgebung 1:

hostname	forums-web-only
process_id	27127
application_version	f2e14a3946b020ace5a368614f0da198cd17aa32
HTTP_HOST	forums.paddling.com
REQUEST_URI	/csp_reports
REQUEST_METHOD	POST
HTTP_USER_AGENT	Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0
HTTP_ACCEPT	*/*
HTTP_X_FORWARDED_FOR	74.76.45.218
HTTP_X_REAL_IP	74.76.45.218
time	1:44 pm

Umgebung 2:

hostname	forums-web-only
process_id	27161
application_version	f2e14a3946b020ace5a368614f0da198cd17aa32
HTTP_HOST	forums.paddling.com
REQUEST_URI	/csp_reports
REQUEST_METHOD	POST
HTTP_USER_AGENT	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0
HTTP_ACCEPT	*/*
HTTP_X_FORWARDED_FOR	66.58.144.146
HTTP_X_REAL_IP	66.58.144.146
time	1:39 pm

Umgebung 3:

hostname	forums-web-only
process_id	27111
application_version	f2e14a3946b020ace5a368614f0da198cd17aa32
HTTP_HOST	forums.paddling.com
REQUEST_URI	/csp_reports
REQUEST_METHOD	POST
HTTP_USER_AGENT	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36
HTTP_ACCEPT	*/*
HTTP_REFERER	https://forums.paddling.com/t/need-advice-loading-a-kayak-onto-j-rac/60058
HTTP_X_FORWARDED_FOR	174.83.24.11
HTTP_X_REAL_IP	174.83.24.11
time	12:16 pm
2 „Gefällt mir“

Bei CSP-Berichten gibt es sehr viele falsch-positive Meldungen. Weitere Details findest du in meiner Antwort oben.

Die meisten Regeln, die du in deinem Screenshot eingestellt hast, sind nicht erforderlich. https: und unsafe-inline reichen aus; sie erlauben alle Skripte, die mit https beginnen, sowie alle Inline-Skripte. Versuche, deine CSP-Quelleneinstellungen zu bereinigen und CSP (ohne Berichterstattung) zu aktivieren. Das sollte funktionieren.

8 „Gefällt mir“

Hallo, ich frage mich nur: Ist die Direktive Content-Security-Policy: frame-ancestors ‘none’ eine, die „in zukünftigen Updates enthalten sein wird“, wie vom Originalposter erwähnt?

Ist es möglich, diese Direktive irgendwie hinzuzufügen, oder sollte ich einfach abwarten und mir keine Sorgen machen? Ich habe gerade eine Härtungsübung durchgeführt, und dies war der einzige offene Punkt bzw. die einzige Empfehlung dieses Online-Sicherheitstools. Das gibt mir eigentlich viel Vertrauen in die Plattform – tolle Arbeit, Leute!

5 „Gefällt mir“

Ich bin mir nicht sicher – was denkst du, @xrav3nz?

4 „Gefällt mir“

Ich würde sagen, mach dir im Moment keine Sorgen darum.

frame-ancestors ist ähnlich wie der X-Frame-Options-Header, den Discourse/Rails bereits durchsetzt. Der Header ist derzeit auf sameorigin gesetzt – grob gesagt das Gleiche wie die CSP-Direktive mit der Option self.

Meiner Meinung nach bringt die Implementierung von frame-ancestors im Moment nicht viel, es sei denn, wir müssen die Whitelisting bestimmter Domains außer self unterstützen.

8 „Gefällt mir“

Dem stimme ich zu.

Das Jagen nach jedem möglichen Schwachstellen-Scanner-„Problem

5 „Gefällt mir“

Wir haben gerade die Unterstützung für die CSP-Direktive frame-ancestors eingeführt. Sie ist vorerst standardmäßig deaktiviert und hinter der Site-Einstellung „content security policy frame ancestors“ versteckt. Wie immer können Sie Domains zur Liste über /admin/customize/embedding hinzufügen.

Diese Direktive wird im nächsten Release-Zyklus standardmäßig aktiviert sein.

7 „Gefällt mir“