Does 'unsafe-inline' in script-src really defeat XSS protection?
In practice, yes for the most common vector: most XSS attacks inject a `<script>` tag or an inline event attribute into the page, and `'unsafe-inline'` allows exactly that kind of code to run unrestricted; the policy still blocks scripts from an unlisted external origin, but it loses its defense against the most frequent kind of injection.
What is the practical difference between a nonce and a hash in CSP?
A nonce is a random value the server generates on every response and repeats in both the directive and the script tag, so every page load carries a different nonce; a hash is the result of running SHA-256, SHA-384 or SHA-512 over the exact content of the allowed script, so it works well for fixed inline scripts that do not change per request, with nothing new to generate server-side.
Does Content-Security-Policy-Report-Only block anything?
No. It applies the same rules as the enforcing policy purely for evaluation: anything that would violate the policy still loads and runs normally, but a violation report gets sent to the endpoint configured in `report-to`, which lets a new policy be tested in production without breaking anything before switching over to the real `Content-Security-Policy` header.
Why does object-src 'none' show up in almost every recommended policy?
Because `object-src` controls plugins like `<object>`, `<embed>` and `<applet>`, older technologies like Flash that had their own ways of executing code independent of `script-src`'s rules; locking that directive to `'none'` closes an execution path the rest of the policy cannot even see.