Your team deploys a browser-based app with Content Security Policy (CSP). Security scanning reports that inline scripts are blocked, but the app still becomes compromised via user-controlled HTML rendering. Which CSP setting or pattern most directly addresses this class of vulnerability?
Answer
Use strict-dynamic with nonces and remove any need for unsafe-inline
Explanation
Nonces with strict-dynamic help ensure only authorized scripts execute, reducing the impact of injection paths that depend on inline script execution. This addresses the root issue rather than framing or object embedding.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
A cloud workload uses a static service account key stored in an application repo. After exposure is suspected, which remediation order most effectively reduces attacker access while maintaining availability?
View question →
A retail organization’s SIEM suddenly shows a spike in outbound connections to rare, high-numbered ports from multiple endpoints. The SOC suspects a botnet using non-standard C2. Which action most directly improves detection reliability while preserving analyst time?
View question →
A developer uses parameterized queries for SQL injection prevention, but the app still exhibits data exposure when attackers submit crafted Unicode inputs. Which defensive control most directly addresses canonicalization issues that bypass validation layers?
View question →
A vulnerability scanner flags multiple publicly accessible storage buckets. Some are configured with “public read,” but audit logs show low download volume. Which decision is most defensible to reduce risk efficiently?
View question →
A forensic investigation finds that an attacker accessed a managed database using a privileged role assigned to a service account. Cloud audit logs show the service account was used from a new region hours earlier than usual. Which analytic approach best identifies whether this is credential theft vs. legitimate automation gone wrong?
View question →
During an OAuth integration review, you discover that a third-party app requests the broadest possible scope and the access token is accepted by multiple internal services without audience validation. Which combination most effectively mitigates token replay and over-privilege?
View question →