RoastMyOpsec

Blog

Safety OPSEC guides

Defensive defaults that keep browsers, cookies, email, and TLS from doing attackers' homework. Ten guides per page.

Page 5 of 7

Safety · Mar 28, 2023

CSP style-src vs unsafe-inline for Public Sites

CSP style-src vs unsafe-inline for public sites is how you allow first-party CSS without inviting injected style tags. style-src lists which stylesheets and inline style blocks may apply. 'unsafe-inline' lets any inline…

Read guide →

Safety · Mar 20, 2023

CSP strict-dynamic vs Nonce Host Allowlists

CSP strict-dynamic vs nonce host allowlists is two ways to trust scripts after you already have a nonce or hash: the nonce marks the tags you meant to run, a host list allows every file on that origin, and…

Read guide →

Safety · Mar 3, 2023

CSP sandbox vs iframe sandbox for Public Pages

CSP sandbox vs iframe sandbox for public pages is two places the same idea can live. The sandbox attribute on your <iframe> limits what that child document may do. The CSP sandbox directive applies sandbox flags to the…

Read guide →

Safety · Jan 19, 2023

CSP Nonces vs Hashes for Script Allowlists

CSP nonces vs hashes is an allowlist technique, not a third policy language. A nonce is a per-response random value on script-src and matching script tags — browsers run those tags, not random inline XSS. A hash…

Read guide →

Safety · Jan 11, 2023

CSP media-src vs Mixed Content for Public Video

CSP media-src vs mixed content for public video is two different media problems. Mixed content is an HTTPS page that still loads http:// video, audio, or other assets — browsers may block or padlock-warn. media-src in…

Read guide →