Automatic Content Security Policy Generation via Proxy Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Setting up a Content Security Policy (CSP) to prevent code injection attacks is complex and opaque for network resource owners, requiring significant effort and expertise.
Innovation Solution
An automatic mechanism for determining a CSP using a cloud-based proxy service that analyzes network resource requests and responses, identifies additional resources, and generates a CSP policy transparently, without requiring the network resource owner's direct involvement.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a CSP policy is manually configured by the network resource owner, then security protection against code injection attacks is achieved, but the complexity and difficulty of configuration increases significantly
Solution Approach 1:
The system enables automatic generation of CSP policies by having the network resource owner's browser automatically report loaded content origins to the proxy server, which then generates the appropriate CSP policy without requiring manual configuration by the resource owner
Solution Approach 2:
A proxy server acts as an intermediary between the network resource owner and the CSP configuration system, receiving automatic reports from browsers about loaded content and generating appropriate CSP policies based on this information
2Reliability
If a CSP policy is manually configured by the network resource owner, then security protection against code injection attacks is achieved, but the time and effort required for setup increases
Solution Approach 1:
The system performs preliminary action by having the browser automatically report all content origins before the CSP policy needs to be generated, allowing the proxy server to have the policy ready without requiring time-consuming manual configuration
Solution Approach 2:
The browser automatically performs the data collection and reporting function that would otherwise require manual effort from the network resource owner, enabling automatic CSP policy generation
Data Source
AI summary
Methods and apparatuses for automatic determination of a content security policy for a network resource are described. A proxy server receives from a first authenticated client device a first request for a first network resource, retrieves the first network resource and transmits a first response to the first client device that includes a content tracker that causes the client device to report information on additional network resources identified when the first client device interprets the first network resource. A content security policy is determined based on the reported information. The proxy server receives, from a second client device, a second request for the first network resource. The proxy server transmits, to the second client device, a second response that includes the content security policy that is determined based on the information on the additional network resources.


