AUDITED CONTENT SECURITY POLICY

- Oracle

Systems, methods, and articles are provided for implementing content security policies to constrain an application to retrieve content from trusted sites and/or to ensure that results of retrieved content pass through an intermediary for additional security checks. As content is retrieved, the intermediary may perform additional security checks such as determining whether a hash of a result exists in a data structure that stores hash values of results that have been verified as safe or flagged as unsafe. If a result has been flagged as unsafe or has not been verified as safe, the intermediary may block the result from being returned to the application. The results may be marked as safe or unsafe based on one or more security tests that may be performed asynchronously and/or against a different application environment. An auditor may audit that the content security policies are configured for the application.

Skip to: Description  ·  Claims  · Patent History  ·  Patent History
Description
BACKGROUND

Users interact with web sites and mobile applications that pull content from a variety of sources to use for providing services to the user and/or to present resulting content to the user. Some of these sources may exist merely to serve or provide content, or merely to provide requested functionality in support of application services. Other sources may perform additional functionality, which may or may not be known to the application or user and may not be necessary to perform the requested functionality. Such additional functionality may include tracking requests, tracking information about devices, tracking user information, injecting propaganda, advertisements, or other content instead of or in addition to the content requested, or attempting to obtain authentication or other secure or secret information from the application or user (for example, to cause the application or an account of the user to perform undesired functionality). This additional functionality performed by other sources may be referred to as “malicious,” as the user or application does not expect calls to these other sources to result in the additional functionality, and because the additional functionality may be harmful to the application or user or otherwise pose a security threat.

Such malicious functionality may be performed by malicious code that is not even known by the source of the malicious functionality. Such malicious code may have been placed by a rogue actor such as an employee or system infiltrator that intentionally or unintentionally caused the additional functionality to be performed in certain scenarios or even randomly. Depending on the ease of detecting the patterns with which the additional functionality occurs, the application triggering the malicious functionality may be unaware that the functionality is occurring in certain scenarios. As a result, application security may be compromised without any awareness by the application or the user of the application. Although such system infiltration may violate federal and local laws, the difficulty of detecting such infiltration allows such malicious functionality to remain prevalent in distributed systems that rely on content or functionality from multiple sources to the severe detriment of applications and application users.

BRIEF SUMMARY

Systems, methods, and articles are provided for implementing content security policies to constrain an application to retrieve content from trusted sites and/or to ensure that results of retrieved content pass through an intermediary for additional security checks. As content is retrieved, the intermediary may perform additional security checks such as determining whether a hash of a result exists in a data structure that stores hash values of results that have been verified as safe or flagged as unsafe. If a result has been flagged as unsafe or has not been verified as safe, the intermediary may block the result from being returned to the application. The results may be marked as safe or unsafe based on one or more security tests that may be performed asynchronously and/or against a different application environment. An auditor may audit that the content security policies are configured for the application.

In one embodiment, a computer-implemented method includes identifying a plurality of scripts that are executed during execution of application functionality. The computer-implemented method further includes evaluating the plurality of scripts to determine a set of scripts of the plurality of scripts that is approved for the application functionality. Evaluating the plurality of scripts may include performing one or more security tests to determine whether any scripts of the plurality of scripts is a security risk. Based at least in part on determining that the set of scripts is not posing a security risk, the computer-implemented method further includes storing a hash table that identifies, for each script of the set of scripts, a hash of at least part of the script. The computer-implemented method further includes determining one or more sources of scripts to make available for executing scripts in a web application that performs at least some of the application functionality. The one or more sources of scripts include at least a particular source that references an intermediary for a content target. The content target is excluded from the one or more sources. The computer-implemented method further includes receiving, at the intermediary, a result of a request for content that was made by an instance of the web application. The result of the request is from the content target. The computer-implemented method further includes validating that a hash of the result of the request matches a particular hash of at least part of a particular script from the hash table. Based at least in part on the validating, the computer-implemented method further includes providing the particular script to the instance of the web application for execution. The computer-implemented method further includes auditing a particular source of a particular instance of the web application to verify that the particular source is configured to distribute the instance of the web application using a content security policy that is limited to the one or more sources of scripts.

In a further embodiment, auditing the particular source of the particular instance of the web application may include determining that the content security policy is in a header of the particular instance of the web application and that the content security policy specifies the one or more sources of scripts as one or more paths to one or more intermediaries in a manner that also references one or more excluded content targets.

In an alternative embodiment, auditing the particular source of the particular instance of the web application may include determining that the content security policy is in a meta tag of the particular instance of the web application and that the content security policy specifies the one or more sources of scripts as one or more paths to one or more intermediaries in a manner that also references one or more excluded content targets.

In the same or a different further embodiment, the intermediary is configured to perform validating that the result matches the particular hash, and providing the particular script to the instance of the web application.

In the same or a different further embodiment, the computer-implemented method further includes receiving, at the intermediary, the request for content that was made by the instance of the web application, verifying that the request is for content from a source for which content verification is available, and forwarding the request to the source. In a further embodiment, the computer-implemented method includes, before forwarding the request to the source, storing a request hash table that identifies, for a plurality of requests that have passed one or more security tests, a hash of at least part of the request. Also before forwarding the request to the at least one of the one or more sources, the computer-implemented method further includes validating that the request matches another particular hash of at least part of a particular request from the request hash table.

In the same or a different further embodiment, the computer-implemented method further includes receiving, at the intermediary, a second result of a second request for content that was made by a second instance of the web application. The computer-implemented method further includes determining that a hash of the second result does not match any hash of at least part of any script from the hash table. Based at least in part on determining that the hash of the second result does not match any hash of at least part of any script form the hash table, the computer-implemented method further includes blocking the second result from the second instance of the web application. In a further embodiment, the computer-implemented method includes, based at least in part on the second request, evaluating a second script to determine whether the second script is a security risk. The computer-implemented method further includes, based at least in part on determining that the second script is not a security risk, adding a hash of the second script to the hash table as a stored indication that the second script is not a security risk.

In the same or a different further embodiment, the computer-implemented method further includes receiving, at the intermediary, a second result of a second request for content that was made by a second instance of the web application. The computer-implemented method further includes determining that a hash of the second result matches a second particular hash that has been stored to indicate a security risk. Based at least in part on determining that the hash of the second result matches the second particular hash that has been stored to indicate the security risk, the computer-implemented method further includes blocking the second result from the second instance of the web application.

In the same or a different further embodiment, performing one or more security tests to determine whether any scripts of the plurality of scripts is a security risk comprises performing a particular security test on the particular script. The particular security test determines that the particular script accesses data commensurate with the application functionality.

In the same or a different further embodiment, performing one or more security tests to determine whether any scripts of the plurality of scripts is a security risk comprises performing a particular security test on the particular script. The particular security test determines that the particular script does not attempt to expand the application functionality to include access to resources that are not associated with the application functionality.

In the same or a different further embodiment, performing one or more security tests to determine whether any scripts of the plurality of scripts is a security risk comprises performing a particular security test on the particular script. The particular security test determines that the particular script does not log user-specific information externally to an application service that provides the application functionality.

In the same or a different further embodiment, identifying the plurality of scripts that are executed during execution of application functionality may include accessing at least part of a code base for providing the application functionality. Evaluating the plurality of scripts may include evaluating the particular script in a context of how the particular script is used in the code base.

In the same or a different further embodiment, the computer-implemented method further includes determining that a second request for content that was made by a second instance of the web application requests content from a particular trusted source of the one or more sources of scripts. The particular trusted source is configured to provide the content for the second request to the second instance of the web application without using any content validation intermediaries. The computer-implemented method further includes, based at least in part on determining that the second request requests content from the particular trusted source, retrieving, by the second instance of the web application, a second result directly from the particular trusted source for execution by the second instance without validating whether the second result matches any hash of at least part of any script from the hash table.

In some embodiments, a system is provided that includes one or more data processors and a non-transitory computer-readable storage medium containing instructions which, when executed on the one or more data processors, cause the one or more data processors to perform part or all of one or more methods disclosed herein.

In other embodiments, a computer-program product is provided that is tangibly embodied in a non-transitory and/or transitory machine-readable storage medium and that includes instructions configured to cause one or more data processors to perform part or all of one or more methods disclosed herein.

Cloud services, microservices, or other machine-hosted services may be offered that perform part or all of one or more methods disclosed herein. The machine-hosted services may be provided by a single machine, by a cluster of machines, or otherwise distributed across machines. The one or more machines may be configured to send and receive data, which may include instructions for performing the methods or results of performing the methods, via an application programming interface (API) or any other communication protocol.

In various embodiments, part or all of one or more methods disclosed herein may be performed by stored instructions such as a software application, computer program, or other software package installed in memory or other storage of a computing platform, such as an operating system, which provides access to physical or virtual computing resources. The operating system may provide access to physical or virtual resources of a mobile computing device, a laptop computing device, a desktop computing device, a server computing device, a container in a virtual machine on a computing device, or any other computing environment configured to execute stored instructions.

As used herein, the terms “first,” “second,” “third,” “fourth,” etc. are used as naming conventions to refer to separate items in a set of items or separate process instances of a set of process instances. These naming conventions do not imply ordering unless such ordering is explicitly noted using language specific to ordering, such as “before” or “after,” or unless such ordering is required to attain the expressly recited functionality, such as generating an item and later accessing the generated item.

The techniques described above and below may be implemented in a number of ways and in a number of contexts. Several example implementations and contexts are provided with reference to the following figures, as described below in more detail. However, the following implementations and contexts are but a few of many.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments are described hereinafter with reference to the figures. It should be noted that the figures are not drawn to scale and that the elements of similar structures or functions are represented by like reference numerals throughout the figures. It should also be noted that the figures are only intended to facilitate the description of the embodiments. They are not intended as an exhaustive description of the disclosure or as a limitation on the scope of the disclosure.

FIG. 1 illustrates a flow chart of an example process that uses content security policies to constrain an application to pull content from trusted sites and/or through an approved intermediary that performs additional security checks.

FIG. 2 illustrates a system diagram showing an example cloud infrastructure that uses content security policies to constrain an application to pull content from trusted sites and/or through an approved intermediary that performs additional security checks.

FIG. 3A illustrates a diagram of an example user interface showing application content which may be generated in parts using one or more scripts.

FIG. 3B illustrates a diagram of an example user interface showing application content along with a warning that the content may be unsafe as a result of containing or referencing unvalidated scripts.

FIG. 4 depicts a simplified diagram of a distributed system for implementing certain aspects.

FIG. 5 is a simplified block diagram of one or more components of a system environment by which services provided by one or more components of an embodiment system may be offered as cloud services, in accordance with certain aspects.

FIG. 6 illustrates an example computer system that may be used to implement certain aspects.

DETAILED DESCRIPTION

An assurance system and corresponding method is provided for implementing auditable content security policies to constrain an application to retrieve content from trusted sites and/or to ensure that results of retrieved content pass through an intermediary for additional security checks. The additional security checks may include checking whether results have been previously verified as safe or flagged as unsafe, and allowing or blocking the results from reaching the application accordingly. The results may be marked as safe or unsafe based on security test(s) that may be performed asynchronously and/or against a different application environment. In various embodiments, the assurance system is implemented using non-transitory and/or transitory computer-readable storage media to store instructions which, when executed by one or more processors of a computer system, cause constrained application content retrieval and/or additional security checks according to the techniques described. The assurance system may be implemented on a local or cloud-based computer system that allows for setting content security policies in hosted applications, performing additional security checks on content retrieved from the hosted applications, and/or auditing the hosted applications to ensure the hosted applications are configured to have the content security policies. The computer system may communicate with client computer systems for causing display of retrieved content for the application.

According to techniques described herein, a content security policy may be added or at least verified by a trusted component independent of a backend of a website. The trusted component may be a third-party content distribution network (“CDN”) or a gateway or proxy operated by a security provider. In the case of the CDN, the security provider can review the configuration of the CDN to ensure the CSP is added (e.g., as a header or meta tag) across the board without relying on testing the website from various IPs/clients. In this way, the security provider achieves Chain of Custody for scripts (e.g., JavaScript scripts) without itself operating the website.

The steps described in individual sections may be started or completed in any order that supplies the information used as the steps are carried out. The functionality in separate sections may be started or completed in any order that supplies the information used as the functionality is carried out. Any step or item of functionality may be performed by a personal computer system, a cloud computer system, a local computer system, a remote computer system, a single computer system, a distributed computer system, or any other computer system that provides the processing, storage and connectivity resources used to carry out the step or item of functionality.

SANDBOX ENVIRONMENTS AND LIMITATIONS

A mobile application may be constrained by placing restrictions on what content may be accessed from within a sandbox containing the mobile application. In such an implementation, the sandbox in the mobile build environment may secure the application against threats of malicious code by preventing such malicious code from being loaded. In this implementation, the sandbox provides logical resources to the mobile application for accessing content from outside the mobile application, and the mobile application uses these logical resources while being constrained by any restraints placed on the logical resources. Constraints may be imposed to restrict sources from which the mobile application may request data, and/or to perform additional security checks on content coming in from sources outside of the mobile application. In this manner, the sandbox may ensure that malicious content does not enter the sandbox.

While a sandbox concept provides added protection in a mobile environment, the sandbox may not be available in the web environment. In a web site environment without the ability to constrain the application build, users of applications carry a risk that the application may run malicious code to expose user information. Some users may be more vulnerable to such exposure than others.

CONTENT SECURITY POLICIES

Content Security Policies (CSPs) act as a whitelist of allowed sources that may be used by the browser. CSPs may be implemented in an HTTP header (e.g., “Content-Security-Policy: script-src https://trusted.example.com”) or as a meta tag as part of a web site (e.g., “<meta http-equiv=“Content-Security-Policy” content=“ script-src https://trusted. example. com”>”. CSP policies may include directives such as:

    • default-src, which is a default source for all resource types,
    • script-src, which is a list of allowed sources for loading JavaScript,
    • style-src, which is a list of allowed sources for loading CSS styles,
    • img-src, which is a list of allowed sources for loading images,
    • object-src, which is a list of allowed sources for loading Flash/Java content, and
    • frame-ancestors, which is a list of sources or domains allowed to embed the page.

CSPs may be used to protect against cross-site scripting (XSS), where an attacker injects malicious JavaScript into a trusted website, which is then executed by users'browsers. The attacker may store the malicious script on the server, as reflected in a URL that is provided in a response to the browser, or in other ways such as by editing the page rendered by the browser. CSP may prevent script injection by blocking scripts from unauthorized domains, inline scripts, and/or dangerous JavaScript. Specific domains, sub-domains, or other targets may be allowed by the CSP at the exclusion of other domains, sub-domains, or targets, even if the blocked targets are referenced in the CSP in a path of the allowed targets. Also, specific sub-domains may be allowed even if higher-level domains are excluded by the CSP. For example, the following CSP blocks inline JavaScript and allows trusted external scripts: “Content-Security-Policy: script-src https://trusted.example.com; object-src ‘none’; base-uri ‘none’;”. If a user were to try to inject a script, such as “<script>alert(‘XSS!’)</script>”, the injected script would be blocked by the browser pursuant to the CSP.

As the browser parses the document with the injected script, the browser would detect an in-line “<script>” tag or possibly a script with a source such as “<script src=“ . . . ” .” Based on the CSP, the browser pauses document object model (DOM) construction to fetch and execute the script. The browser checks if the script's source is allowed by the corresponding directive in the CSP. If the source is allowed, the browser retrieves the script for execution. If the source is not allowed, the browser blocks the script and may log a CSP violation to a specified CSP violation logging location, such as an assurances provider endpoint.

When retrieving a script for execution, the browser enforces standard hypertext transfer protocols (HTTP), possibly including secure hypertext transfer protocols (HTTPS). If Subresource Integrity (SRI) is used, a hash of the script to be retrieved via HTTPS is checked against the actual script delivered via HTTPS to guard against a man-in-the-middle attack. The browser may also use MIME Type Checking to ensure that content returned is of the same type as content requested. In the example, the response would be checked to determine if the response has Content-Type: application/javascript. Once the script is received and verified to be the script transmitted and of the type requested, the browser executes the script. The script may be executed with additional protections in place at the browser, such as preventing scripts that perform unsafe DOM operations like innerHTML =userInput even if the script satisfies the CSP policy.

ESTABLISHING CHAIN OF CUSTODY WITH CONTENT SECURITY POLICIES

Content Security Policies (CSPs) may additionally or alternatively be used to protect against or mitigate opportunities for malicious injection of code into a web site client-side code from content providers used by the web site. Such injection would otherwise let the attacker impersonate users and can result in the attacker accessing sensitive information or even rewriting HTML content. The CSP is an added HTTP header that constrains how the webpage is to be configured, and such constraint may prevent some attempts at malicious code injection. For example, a CSP header may specify from which URLs resources (e.g., JavaScript, images, etc.) can be loaded for a particular domain (e.g., movies.com, socialmediasite.com, example.com, or not-trusted.com). A CSP alone might not provide the added security against the application running malicious code to expose user information or inject tracking content if developers of the application are making choices to either run such code directly or interact with sites that carry an unreasonable risk of running such code.

In one embodiment, the CSP is audited by a CSP auditor to ensure that a source of a web page that provides application functionality is configured to use a CSP that has been agreed to be applied for the application, even if the CSP gets updated by the CSP auditor based on observed security risks. The CSP may allow the browser to pull content from trusted sources that do not require additional security checks (optionally directly without an intermediary) and/or other sources that do require additional security checks (through an intermediary such as a gateway that may perform the additional security checks). The additional security checks may verify that content is being pulled that has been previously verified as safe content. In this manner, with the CSP in place, a security assurance intermediary may be able to ensure that all content from the page has either been verified as safe or is being used to pull content that has been verified as safe.

The mutually agreeable content sources may be included in CSP headers or meta tags, for example, in the web context, to track chain of custody. CSP headers or meta tags may be used to instruct a browser to load JavaScript for applications only from approved sites (which are ones controlled within a security provider's (such as a cloud provider's) gateway). These sites can include one or more intermediaries (e.g., at a gateway tenancy) that ensure that the JavaScript or other script that is being provided to the website is the same as what passed a separate assurance process or that has been cleared as an expected pathway. The intermediaries may keep track of a set of content targets and even sets of content from those targets that have been validated as safe by an asynchronous security analysis of the content targets and content from those content targets.

The sites allowed by the CSP headers or meta tags may be specified using a path that also references the content target even though the content target is excluded from the CSP. For example, the CSP may include a sub-domain of a domain or any other target, where the domain, sub-domain, or other target is configured in a Domain Name System registry to point to a trusted intermediary, and another of a domain, sub-domain, or other portion of a path to the target may reference a content target that is not fully trusted. For example, for a domain of an assurance provider, “assurance-provider.com,” the CSP may list “not-trusted.intermediary.assurance-provider.com” as a trusted domain without listing “not-trusted.com,” or other paths including the sub-domain as trusted domains. In this example, application requests that would normally go to “not-trusted. com” would, to comply with the CSP, be modified to go to “not-trusted. intermediary. assurance-provider. com,” and in this manner would be constrained to pass through “intermediary. assurance-provider. com” in order to retrieve content by the intermediary from or associated with “not-trusted. com.” Such a content retrieval pipeline allows the intermediary to perform additional security checks on retrieved content such as assuring that any scripts returned have been reviewed and verified as safe. Such analysis may be done by comparing a hash of returned scripts to a hash table of verified scripts to determine if the returned script is among the verified scripts. If so, the returned script may be returned for execution by the application, and, if not, the returned script may be blocked.

In this example, a pathway (e.g., “not-trusted.intermediary.assurance-provider.com”) to the content references both the trusted intermediary (e.g., “intermediary. assurance-provider. com”) and the not fully trusted content target (e.g., “not-trusted[.com]”), and the pathway may be assured by the CSP to allow content retrieval from the content target if and only if the content retrieval passes through the intermediary.

Even if the JavaScript code itself was not subject to code review, assuring that the JavaScript conforms to reviewed pathways (or pathways from which at least some code or samples of code have been reviewed) limits opportunity for code injection from unexpected malicious sources.

If a source or pathway is among a set of trusted sources or pathways specified in the content security policy, a request for JavaScript or other content from the source or along the pathway may allow such content to be retrieved. If such a request and/or a response to the request has been seen before, as determined by a hash of the request and/or response, the request and/or a response to the request may be compared to a log of hashed requests and responses to determine that the request or response is among a set of requests or responses for which a software assurance process has already been performed.

Consistent use of a CSP header ensures that content is retrieved only from the targets or sources listed in the CSP header. A web site to be assured (e.g., not-trusted.com) may be architected in a cloud using an architecture that ensures that the CSP header is being consistently added to the web site, regardless of what content is being retrieved and what application user is accessing the content. One approach for the web site architecture is to include a trusted intermediary in front of an application server instance that serves content for the website (e.g., a trusted Content Distribution Network (CDN), the configuration of which can be audited by the security provider or alternatively a gateway/proxy operated by the security provider); in this way the security provider does not have to own the website backend itself. The application server instance, such as a Content Distribution Network (CDN), injects a CSP into the content to limit sources that can be used for content retrieval.

The script sources specified in the CSP may be constrained to script sources through a trusted origin (e.g., an approved assurances gateway operated by the Assurance Provider), and the trusted origin validates that JavaScript has gone through a prior review process (e.g., by checking the hash of the file matches something that was previously reviewed). Otherwise, if an untrusted source were directly included in the CSP without requiring a pass-through of the trusted intermediary, the trusted intermediary would not be in the content retrieval pipeline to perform the hash check or any other check to promote safe scripts and prevent unsafe scripts. The trusted intermediary may serve as an intermediary for a variety of content sources, which may be referenced using different paths specified in the CSP that resolve to point to the same trusted intermediary.

The assurance gateway may be looped into the content delivery pipeline by adding, to a Domain Name Server registry, a mapping that uses a content target domain in a path that is mapped to an IP address or location of an intermediary such as the assurance gateway (e.g., intermediary.assurance-provider.com). The content target domain or a portion thereof may be prepended or injected into the path with a domain prefix that is associated with or identifies an untrusted content target such as “not-trusted.com,” which may be identified by the path prefix “not-trusted.” in the path “not-trusted.intermediary.assurance-provider.com,” even though the path points to a trusted intermediary. In this manner, content retrieved through not-trusted. intermediary. assurance-provider. com may be reliably delivered to the assurance gateway. The CSP header may be similarly updated to remove “untrusted. com” from a list of allowed sources and add “not-trusted.intermediary.assurance-provider.com” to the list of allowed sources. In this manner, requests involving the domain “not-trusted.com” are required by the CSP, as enforced by the browser, to pass through the assurance gateway mapped to the sub-domain and cannot be directly sent to a content server associated with not-trusted. com.

In order to make a content request relating to “not-trusted.com,” the script source in the HTML or web site code is updated to reference “not-trusted.intermediary.assurance-provider.com” instead of “not-trusted. com” so that the content retrieval using the reference may be allowed by the browser pursuant to the CSP.

In a particular example, if the application originally requested a script script1.js from an untrusted source not-trusted.com/script1.js, the request for the script may be updated in the HTML or web site code to reference not-trusted.intermediary.assurance-provider.com/script1.js so that the request for the script passes through the assurance gateway. Alternatively, in the CSP, it would be possible to specify the script source as a hash (e.g., script-src ‘sha256-cd9827ad . . . ’), in which case the browser would do the hash check instead of the assurance gateway.

An approved assurances gateway is able to verify that sources are serving content (such as scripts) that matches content (such as scripts) that have already been through the assurance process. To verify the script files have been reviewed and approved, the approved assurances gateway may perform hash checks on the script files or other content of requests and/or responses to the content provider to check whether the requests and/or responses exist among a list of hashed content that has already been validated as safe in an assurance review process. If a source is determined to be issuing malicious scripts or otherwise unverified scripts that have not been through the assurances process, the approved assurances gateway may suspend requests to the source and/or trigger removal of a pathway that references the source from the CSP. Removed pathways may be queued for the assurance process so they may be re-added to the CSP in the future if the assurance process is completed and cleared.

In one example, an HTTP response header may include, for a request URL www. content-sharing-application. com and a request method of GET from a remote address of 192.168.1.1 with a referrer policy of strict-origin-when-cross-origin:

    • Cache-Control: max-age=0, no-cache, no-store
    • Content-Encoding: br
    • Content-Security-Policy: script-src not-trusted.intermediary.assurance-provider.com other-not-trusted.intermediary.assurance-provider.com third-not-trusted.intermediary.assurance-provider. com safe.intermediary.assurance-provider.com
    • Content-Type: text/html; charset=utf-8
    • Date: Wed, 1 Jan. 2025 19:20:04 GMT
    • Expires: Wed, 1 Jan. 2025 19:20:04 GMT
    • Feature-Policy: microphone ‘none’; geolocation ‘none’
    • Pragma: no-cache
    • Referrer-Policy: strict-origin-when-cross-origin
    • Reporting-Endpoints:
      • csp-endpoint=“https://xyz.us.content-sharing-application.com/monitor”

As shown, the content security policy for the source content-sharing-application. com includes various URLs or paths to sources that are allowed for the site. For example, not-trusted. intermediary. assurance-provider. com allows requests to the assurance-gateway intermediary defined for the assurance-provider. com domain while still being able to identify, from the path, “not-trusted” (such as not-trusted.com) as the eventual target; other-not-trusted.intermediary.assurance-provider.com allows request to the assurance-gateway defined for the assurance-provider. com domain while still being able to identify, from the path, “other-not-trusted” (such as other-not-trusted.com) as the eventual target; third-not-trusted.intermediary.assurance-provider.com allows requests to the gateway defined for the assurance-provider. com domain while still being able to identify, from the path, “third-not-trusted” (such as third-not-trusted.org”) as the eventual target; and safe. intermediary. assurance-provider.com allows requests to a site identified as safe to nonetheless pass through the intermediary for additional analysis for the assurance-provider.com domain. In various embodiments, unsafe inline scripts are prevented by default as long as a script-src is specified in the CSP. As shown, specifying at least the script-src not-trusted. intermediary. assurance-provider.com blocks inline scripts via the CSP header. Blocking inline scripts preserves a script chain of custody by preventing other tools or code from injecting scripts to be run on the site.

In one embodiment, as new versions of an application are developed, additional requested content sources may be communicated to the gateway, and the gateway may use the requested content sources to perform an assurances check before approving an addition of paths referencing the requested content sources and/or the requested content sources directly to the CSP header for content served from the CDN.

In embodiments that do not use a CSP policy, if the application is free to request content from any source without restriction, the application may request some content through a gateway that performs a hash check and other content from sources that do not pass through the gateway. The sources that pass through the gateway may still be verified as safe or unsafe based on whether the JavaScript has been validated to be safe or unsafe via a hash check mechanism, but, in these embodiments, the assurance system would not be able to independently validate the application as safe or unsafe without a policy in place to ensure that other content is not being retrieved from other unsafe sources in a manner that avoids the assurance process altogether.

In one example, content security policies are implemented and enforced on a region-by-region basis and/or for users having certain characteristics. For example, the content security policy may be audited for content being delivered within the United States or to users who are U.S. citizens or officials, whether or not the content security policy header is implemented for content delivered in other regions.

FIG. 1 illustrates a flow chart of an example process 100 that uses content security policies to constrain an application to pull content from trusted sites and/or through an approved intermediary that performs additional security checks. In block 102, an assurance system identifies a plurality of scripts that are executed during execution of application functionality. The scripts may be analyzed to determine whether the scripts are a security risk, and such information may be used to control which scripts get executed by a web application according to techniques described herein.

FIG. 2 illustrates a system diagram showing an example cloud infrastructure 200 that uses content security policies to constrain an application to pull content from trusted sites and/or through an approved intermediary that performs additional security checks. As shown, user 202 interacts with client browser 204 to view document object model with content security policy 206, which represents application functionality running on a web page. Document object model processing logic 212 extracts content security policies 208 and script request 210 from document object model 206. Upon determining that script request 210 complies with content security policies 208, document object model processing logic 212 passes script request 220 to script validator 224 of intermediary 226. Script validator passes along script request 220 to content source 230, which returns script content 228. Script validator 224 determines whether a hash of script content 228 matches hashes of scripts 222. Script validator 224 validates or invalidates script content 228 depending on whether the hash of script content 228 is in hashes of scripts 222 and, if so, depending on whether the hash of script content 228 is indicated to be a safe script or an unsafe script.

USING A BUILD PIPELINE FOR IN-DEPTH SCRIPT ANALYSIS

An independent auditor (e.g., a cloud service provider) may be charged with auditing the source code (including website JavaScript). Auditing code is not effective unless the auditor has assurances that the code that was audited is the code actually running (ensuring this match is referred to as “Chain of Custody (CoC)”). For mobile application client-side code, the auditor may own the build and review the JavaScript of the installed image directly. In the mobile environment, this audited build may be tracked to ensure that the audited build is the build distributed via Google and Apple App stores.

For a web site, builds as a whole may be impractical to review for each web site access without access to the server from which the web site functionality is being provided. The party controlling what code (JavaScript) is run in the browser is the party that owns the backend servers that serve the web site. In one embodiment, an auditor uses CSP as a means for Chain of Custody. With the CSP, the auditor can control where the browser loads JS from, and the auditor can implement hash checking for those domains using the auditor's Gateway that sits in front of a component of the backend infrastructure that serves static content (e.g., JS). In other words, the auditor does not need to operate the entire backend infrastructure for the website in order to ensure that JavaScript being delivered is JavaScript with approved functionality. The auditor may validate JavaScript that has been served is JavaScript that has been through the assurance process.

For example, tools may run on a source of JavaScript, and a Software Bill of Materials may be generated or estimated for the JavaScript being run, either based on inputs and outputs observed or based on access to the code or a build environment being run. For example, access to the build environment for the source may allow an assurance system to more directly analyze code functionality rather than merely testing a sampling of inputs and outputs. Once JavaScript has been cleared for a source, the JavaScript may be identified in a data structure using a hash of the JavaScript. A set of all JavaScript served by a source, most frequent JavaScript served by a source, or otherwise sampled JavaScript served by a source may be verified in this manner before the source is verified among a set of trusted sources for inclusion in a CSP header.

In various embodiments, the assurance system may identify the scripts in a same or a different environment from a same or a different version of an application than is being assessed using the chain-of-custody process with CSPs by the assurance system. In one example, the assurance system may identify the scripts by accessing at least part of a code base for providing the application functionality via the web site, such as from an application server instance. In this example, the assurance system may evaluate scripts in a context of how the scripts are used on the web site by using the at least part of the code base for the web site to reason about how the script is intended to be used and whether such use is commensurate with the web site functionality or extends beyond intended web site functionality. Determinations of whether the scripts are safe or not may be stored for use by an assurances gateway to determine whether to allow the scripts or not in a content delivery pipeline.

As another example, the assurance system may identify the scripts by accessing at least part of a code base for providing the application functionality, such as from a mobile application or other installed version of an application. In this example, the assurance system may evaluate the scripts in a context of how the scripts are used in the code base by using the at least part of the code base to reason about how the script is intended to be used and whether such use is commensurate with the application functionality or extends beyond intended functionality. Such identification of scripts and evaluation of scripts may be used by the assurance system to mark scripts as security risks or not security risks for an assurance process that uses a chain-of-custody process with CSPs in the same or a different environment, such as in a web site delivered by an application server instance rather than a mobile application.

In various examples, the marked scripts or hashes thereof may be used to determine whether scripts in a different application environment are or are not security risks. In a particular example, the different application environment may be an environment where the assurance system does not have access to the code base at all, or to a lesser extent than what was used in initially classifying the scripts as security risks or not. If the assurance system is providing assurances for a web application, for example, the assurance system may use script classification results from an accessible code base of the mobile application or other installed environment to classify scripts as security risks or not for the less accessible or inaccessible code base of the web application, or vice versa with the mobile application having a less accessible code base than the web application. If the applications perform similar functionality, similar scripts are likely to be security risks or not despite the different computing environments.

The chain of custody may involve doing a hash check of JavaScript being served from content sources to JavaScript that has been analyzed in a build pipeline, with code access, or with more extensive testing and validation of inputs/outputs and functionality. In one embodiment, a build pipeline for an application may be analyzed to determine what JavaScript is built in the build pipeline and whether the JavaScript passes any assurances test(s), which may analyze whether the JavaScript performs malicious activity inconsistent with ordinary use of the application. For example, the build pipeline may be analyzed, and once the build pipeline has been analyzed, the hash values of JavaScript that is built in the build pipeline may be used to validate functionality in similar or identical environments. The assurance system may use the hash values of JavaScript that has already been checked, via the build pipeline, as consistent with ordinary use of the application, and may clear the JavaScript also for use in the web embodiments via the gateway via the hash check mechanism.

In one build of an application, such as a mobile application build, JavaScript may be stored statically or pulled from a variety of sources. A mobile application build is typically much larger than web page contents delivered to a browser because the mobile application may be downloaded ahead-of-time, and larger mobile application builds may improve user experience rather than degrade it. On the other hand, larger web page contents delay delivery and display of the web page to the user. As a result, a web page may use a different mechanism to retrieve JavaScript to be executed in response to a user request for a page such that the page may be initially displayed as the JavaScript contents are retrieved and executed in parallel. In the web version of the application, although JavaScript may be executed, the JavaScript may take a different route to the client device than was taken in the mobile build environment. In various embodiments, the hash of JavaScript being executed by the web application may be validated to be the same as the hash of the JavaScript that was previously executed during ordinary operation of the application in the mobile build environment and optionally analyzed by additional assurances processes to guard against malicious activity.

Because the back-end of the web application may use a variety of JavaScript calls for a variety of users in a variety of scenarios and use cases for the application, at a variety of times, trusted operation of the web application may be difficult to validate. In various embodiments, because each individual JavaScript call was validated by an assurance process, optionally with access to a build environment for the application (e.g., a sandbox environment with more direct access to inputs and/or outputs of the application), the variety of JavaScript calls may still be validated despite the variety of JavaScript calls in a variety of scenarios in use cases such as web applications where a sandbox is not available.

In various embodiments, implementation in a web application may be modified to ensure that JavaScript contents and sources used by the web application are consistent with and in auditable quantities in comparison with JavaScript contents and sources used by a base environment such as a build environment or other environment from which a set of JavaScript contents and/or sources has been tested and verified.

In one embodiment, a build pipeline streams hashes of detected JavaScript to the gateway, and the gateway stores the hashes of the detected JavaScript in a lookup table for use against incoming JavaScript requests. In another embodiment, the gateway periodically or on-demand performs a lookup of newly detected JavaScript hashes from the build environment using an API from the build environment and stores the results in a lookup table for use against incoming JavaScript requests. In yet another embodiment, the build pipeline uses an API of the gateway to push JavaScript requests to a lookup table of the gateway, and the gateway uses the lookup table against incoming JavaScript requests.

SECURITY TEST(S) TO DETERMINE WHETHER SCRIPTS ARE SECURITY RISKS

Returning to FIG. 1, in block 104, the assurance system evaluates the plurality of scripts to determine a set of scripts of the plurality of scripts that is approved for the application functionality. Evaluating the plurality of scripts may include performing one or more security tests to determine whether any scripts of the plurality of scripts are a security risk.

Referring back to FIG. 2, assurance system 232 may include security risk assessment logic 236, which performs security tests 234 on script content 240, optionally with access to code content 238. As a result of performing security tests 234, security risk assessment logic 236 may update hashes of scripts 222 to indicate safe scripts and/or unsafe scripts for script validator 224 to check for. Also as a result of performing security tests 234, security risk assessment logic 236 may update content security policy sources 216, which are included by web application server instance 214 in web content delivered to client browsers such as client browser 204. Security risk assessment logic 236 may, in parallel, update content security policy sources 246 for use by auditor 242 in auditing web application server instance 214 of content source 218.

The process of performing security test(s) to determine whether any scripts are a security risk may include performing same or different security tests on same or different scripts. In one embodiment, a particular security test determines whether a particular script accesses data commensurate with the application functionality. If the particular script attempts to access too much data or data that is not commensurate with expected application functionality (e.g., accessing a clipboard or attempting to change a frame layout on the screen), the particular script may be flagged as insecure and blocked. Otherwise, the particular script may be allowed depending on whether other test(s) are implemented and, if so, passed for the particular script.

In the same or a different embodiment, a particular security test may determine whether the particular script attempts or does not attempt to expand the application functionality to include access to resources that are not associated with the application functionality. For example, if the particular script attempts to access personally identifiable information (PII) of the user or access a camera, the particular script may be flagged as insecure and blocked. Otherwise, the particular script may be allowed depending on whether other test(s) are implemented and, if so, passed for the particular script.

In the same or a different embodiment, a particular security test determines whether the particular script does or does not log user-specific information externally to an application service that provides the application functionality. For example, if the particular script attempts to export user-specific information to an external site or unknown target, the particular script may be flagged as insecure or blocked. Otherwise, the particular script may be allowed depending on whether other test(s) are implemented and, if so, passed for the particular script.

If JavaScript is being served or has been served that is outside the previously checked set of JavaScript that has been verified, for example, as JavaScript that does not match any known hashes of JavaScript that has been checked, an assurance system may be notified that the JavaScript needs to be checked. The approval of a source for inclusion in the CSP header may be suspended or may remain in place with an expiration timer such that the assurance system has an opportunity to verify that the source is safe or whether the source should otherwise be removed from the set of allowed sources included in the CSP header. The individual item of JavaScript may also be blocked from being passed back to a corresponding application instance until the JavaScript has been checked to determine whether the JavaScript is safe.

STORING INDICATION(S) OF SAFE OR UNSAFE SCRIPTS AND SOURCES

Returning to FIG. 1, based at least in part on determining that the set of scripts is not posing a security risk, the assurance system stores, in block 106, a hash table that identifies, for each script of the set of scripts, a hash of at least part of the script.

In block 108, the assurance system determines one or more sources of scripts to make available for executing scripts in a web application that performs at least some of the application functionality. For example, the one or more sources of scripts may exclude one or more other sources of scripts based on a determined security risk from the one or more other sources of scripts. In a particular example, the one or more sources include an intermediary that is configured to pass along validated requests to one or more content targets. Although the intermediary may be included in the one or more sources of scripts, the content target itself may be excluded from the one or more sources. In one embodiment, the one or more sources are specified as one or more paths through a gateway that performs processes in blocks 110, 112, and 114.

In one example, the assurance system may have tools that run over JavaScript functionality provided by domains to verify whether the domains are safe or unsafe before requesting and/or delivering content from the domains. A check may be performed to ensure that the JavaScript from the backend is what is expected based on a hash check and that domains are delivering results consistently as would be expected in light of requests that are received. Sources that deliver unrequested results or scripts inconsistent with requests may be flagged as unsafe even if the individual scripts or results provided might not be unsafe in a given instance of providing the results.

The web application server instance and the assurance provider may agree to use sources deemed by the assurance provider as safe without adding unsafe sources to the CSP header for the application, and this agreement may be audited by the assurance provider by requesting content from the web application server instance for various IP addresses, sites, locations, etc., to ensure the CSP header is being regularly and consistently distributed with the application.

In a web site environment, JavaScript requests depend on functionality of the servers from which the JavaScript is requested. Compliance by the CDN means that a limited number of JavaScript sources may be used so the sources may be listed in the header and checked. The latest version of the JavaScript permitted may be updated so the permitted JavaScript may be checked and verified.

The contents of each checked and verified script may be hashed and stored in a table along with an indication of whether the script is marked as safe or unsafe, such as by marking the script with a safe column in a same table or by storing safe scripts in a different table than unsafe scripts.

Hashing the scripts can be done using any of a variety of hashing algorithms. For example, the scripts may be hashed using cryptographic hash functions like SHA-256, SHA-3, and BLAKE3 to produce fixed-size outputs that are collision-resistant, which is helpful for verifying data integrity. Non-cryptographic hashes like MurmurHash, CityHash, or xxHash may be used to promote speed of processing by the gateway. The contents of the script may be hashed in entirety or by a sampled portion, and a result of hashing the contents may produce an identifier of the script. The identifier may be compared to other identifiers to ensure that each identifier of each different script is unique, and the hashing mechanism and process may be updated to avoid collisions if collisions are detected in the hash table.

CONFIGURING CONTENT RETRIEVAL TO USE SOURCE VALIDATION

A CSP policy may be added by a CDN or other application server instance as a header or meta tag, as application page/content markup, without requiring auditing of the back-end code. The added header or meta tag may then allow or limit downstream functionality implemented by the browser. The header or meta tag instructs the browser to allow content only when such content is pulled from an allowed location, such as from a list of locations where JavaScript or other content may be fetched (e.g., only from approved.example.com for a domain such as example.com). The content paths allowed for content loaded for example.com may be limited to approved. example.com and any other sites that may be reasoned about before inclusion in the CSP markup, even if example.com itself is not a trusted domain and even if back-end sources for an application making the requests are not themselves trusted domains. In this manner, the domain example.com may be controlled through the application server instance to the back-end (e.g., a cloud provider gateway tenancy such as a virtual private cloud). The CSP markup originates from the application server instance, and policy decisions are mapped back to the back-end or other gateway that assures the domains allowed are domains that have gone through an assurance process or have otherwise been cleared as expected pathways.

A configured header may cause the browser to analyze the header and ensure that the JavaScript can only be loaded from the specified pathway (e.g., approved.example.com). In turn, the request through the specified pathway (e.g., approved.example.com) may include assurances and controls around the domains which go to the application server instance and from the application server instance to a virtual private cloud below the application server instance for the performance of additional security checks. Additionally, the virtual private cloud may include controls to ensure that the JavaScript being returned has been subjected to the code review and assurances process or has otherwise been cleared as an expected, trusted, or highly trusted pathway.

If the content (e.g., JavaScript or JavaScript-generated content) going to the web site is not the same (e.g., by having a same content hash) as what has been reviewed and approved by the back-end previously as part of an assurance process, the content may be blocked by the application server instance by determining that a hash check is needed for the content according to the CSP header and determining, at a gateway, that the hash check was not successful.

A chain-of-custody process estimates code that is running in the web site based on content requested and/or returned and sources consulted with as part of requesting/returning content. The application server instance forces the CSP header in all requests to the web site. The configuration of the application server instance may be ordered as a single choke point to ensure that the CSP header is being added, and then the browser may look at the header to ensure that content is only loaded from the locations specified in the CSP header. A request to a location specified in the CSP header may come with assurances and controls around the domain that come from the application server instance as controlled by an assurances domain such as a provider gateway tenancy. Although the content is returned from an external or otherwise potentially untrusted domain such as a virtual private cloud of a content source that is different from the application server instance, controls may be implemented in the virtual private cloud of the application server instance or a corresponding gateway to ensure that content from other virtual private clouds has been reviewed such that the other identified virtual private clouds typically or historically as monitored return the same content for the same requests and that such content is not malicious.

In one embodiment, an assurance system automatically updates HTML when changing a content security policy header from allowing “example.com” to allowing “assurance-gateway.example.com”. In this embodiment, the assurance system may locate references in the HTML or web site code that refer to “example.com” or “untrusted.example.com” and inject or replace an intermediary as the target for the path (e.g., as a target domain or sub-domain, optionally with an original target included in the path to instruct the intermediary where to forward requests for content once/if the requests validated). In a particular example, if the HTML has a script “src =untrusted.example.com/script1.js”, the assurance system or an intermediate component (e.g., the gateway operated by the security provider) could automatically replace that in the HTML with, for example, “src =untrusted. example. assurance-gateway.com/script1.js”. Then, the browser may send the request to the gateway associated with “assurance-gateway.com,” and the gateway could then forward the request to the origin untrusted.example.com if the request and/or origin are validated as having passed security tests.

VALIDATING HASHED REQUEST OR RESPONSE SIGNATURES

In one embodiment, the assurance system receives the request for content that was made by the instance of the web application, verifies that the request is from an approved pathway, and forwards the request to a content target on the approved pathway. In a particular embodiment, before forwarding the request to the content target, the assurance system stores a request hash table that identifies, for a plurality of requests that have passed one or more security tests, a hash of at least part of the request. The request hash table may be used to validate that the request matches another particular hash of at least part of a particular request from the hash table. In various embodiments, the assurance system may serve as an intermediary for performing additional security checks as a request for content is sent to a content provider and/or as an intermediary for performing additional security checks as responsive content is provided by the content provider.

In block 110, an intermediary controlled or trusted by the assurance system receives a result of a request for content that was made by an instance of the web application. The result of the request is from the content target for which the intermediary was configured. The assurance system validates, in block 112, that a hash of the result of the request matches a particular hash of at least part of a particular script from the hash table. Based at least in part on the validating, in block 114 the assurance system provides the particular script to the instance of the web application for execution.

In one embodiment, a gateway implements a hash check that ties the JavaScript being served to JavaScript that traces back to an assured or otherwise approved build pipeline. Depending on the use case, matching hashes with known JavaScript scripts or files may be performed based on a reduced list of known JavaScript scripts or files and/or sources thereof that prioritize traceability and security, and the reduced list may be hashed and validated.

Although some results may be allowed to pass through to the web application, other results may be blocked from passing through the web application, for example, if the results do not pass security checks. In one embodiment, in addition to any results that passed security checks, the assurance system may receive other result(s) of other request(s) for content that were made by the same or a different instance of the web application. The other result(s) of the other request(s) may or may not be from one of the sources identified as a security risk. In this embodiment, the assurance system may further determine that another result does not match any hash of at least part of any script from the hash table and, as a result, block the other result from a corresponding instance of the web application. Whether the other result is blocked or not from execution in the corresponding instance of the web application, the assurance system may further evaluate the other script to determine whether the other script is a security risk. If the other script is not a security risk, the hash table may be updated by adding a hash of the other script to the hash table as a stored indication that the other script is not a security risk.

In another embodiment, the assurance system may receive other result(s) of other request(s) for content that were made by the same or a different instance of the web application as approved result(s) and may otherwise be from approved source(s). In this embodiment, a hash of another result may match a hash that has been stored to indicate a security risk, such as in a security risk hash table or in a combined hash table where different hashed results are indicated as security risks or not security risks. If the hash of the other result is indicated to be a security risk, the assurance system may block the other result from a corresponding instance of the web application.

In one embodiment, whether or not a script is blocked from the application instance, the application instance may be notified by the assurance system that an unsafe script was detected. The application instance may display a warning or other notification to inform a user about the unsafe script, and such warning may prompt the user to generate a report or close the application. Additional reports may be automatically generated for additional asynchronous review by the assurance system.

FIG. 3A illustrates a diagram of an example user interface 300A showing application content which may be generated in parts using one or more scripts. As shown interface 300A includes header bar 302, which may include links to content 306 and 308, as well as information 304 about a user logged into an application instance. The application instance includes primary content region 310, which may include options such as option 312 for sharing content, option 314 for liking content, and option 316 for communicating with other application users about content. Also as shown, the application instance includes a secondary content region 318 for showing additional application content.

FIG. 3B illustrates a diagram of an example user interface 300B showing application content along with a warning that the content may be unsafe as a result of containing or referencing unvalidated scripts. As shown, interface 300B includes warning and/or feedback overlay 322, which states, in the example: “Warning! The viewable and/or executable content (such as executable JavaScript) being provided for the identified target has unexpectedly changed over time. Consuming the content may be unsafe. Due to the inconsistency, the integrity of the content or script could not be validated as its signature is invalid. Do you wish to proceed anyway?” The user may opt to proceed with knowledge that the application content may be displayed by the application instance in an unsafe environment, or not to proceed in which case the script and/or other loaded application content may be blocked by the assurance system and/or by the application instance.

MIXED USE OF HASH VERIFICATION AND TRUST

The assurance system may distinguish between sources that pass through a gateway for additional security check(s) and sources that may be used directly by the application, as defined in the CSP for the application. In one embodiment, a request may be received by an instance of a web application that requests content from a highly trusted source that has been indicated does not require additional security check(s) by the gateway. For these highly trusted sources, the application may directly communicate with the highly trusted source, or such communications may be passed between the application instance and the highly trusted source without security check(s), to allow execution by the application instance potentially without validating whether results match any hashes in script hash table(s). In these examples, the highly trusted source may be listed directly in the CSP without an intermediary such that communications may flow back and forth between the application instance and the highly trusted source without any added overhead (such as validation steps) incurred by the intermediary.

In various embodiments, a web application may be allowed to retrieve some JavaScript contents and/or sources that have not been verified by the gateway if such contents are from trusted or highly trusted sources. For example, some sources may be reputable sources that are well-monitored and traditionally do not publish malicious content, and such sources may be allowed for direct content retrieval from the web application without requiring a pass-through of the content via the gateway. In such scenarios, operation of the web application may be further optimized to avoid the hash check and intermediate gateway for calls to the trusted source(s) without sacrificing assurances against malicious activity and without avoiding the hash check and intermediate gateway for calls to sources that are not among the trusted source(s).

In one embodiment, certain JavaScript hash signatures may be identified as malicious signatures even from approved content providers, and these signatures may be identified by hash checking the scripts by the gateway. In these scenarios, the gateway may detect that the request for JavaScript is from an approved content provider, retrieve the JavaScript according to the request, and further detect that the provided JavaScript matches a hash signature that corresponds to malicious code. The JavaScript that matches the signature of malicious code may be flagged and blocked, and the gateway may prevent the browser from receiving the result even from the approved content provider.

AUDITING CONTENT SOURCES ARE CONFIGURED TO USE SOURCE VALIDATION

Referring back to FIG. 1, the assurance system may audit a particular source of a particular instance of the web application in block 116 to verify that the particular source distributes or is configured to distribute the instance of the web application using a content security policy that is limited to the one or more sources of scripts. The content security policy may be stored in a web page that provides application functionality as part of a header of the web page or as part of a meta tag of the web page. In one embodiment, auditing the particular source of the web application may include auditing a CSP header or meta tag configuration of the web application that is shared with the auditor or stored in a shared space accessible by the auditor. The web application may pull the CSP header to attach to instances of the web application delivered as web pages to the browser. In some embodiments, auditing the particular source of the particular instance of the web application may include determining that the content security policy is in a header of the particular instance of the web application and that the content security policy specifies the one or more sources of scripts as one or more paths to one or more domains. In other embodiments, auditing the particular source of the particular instance of the web application comprises determining that the content security policy is in a meta tag of the particular instance of the web application and that the content security policy specifies the one or more sources of scripts as one or more paths to one or more domains.

Referring back to FIG. 2, Auditor 242 may analyze a configuration of web application server instance 214 of content source 218 to determine whether the configuration matches content security policies 246 as determined by security risk assessment logic. In another embodiment, content delivered by web application server instance 214 of content source 218 may be analyzed to determine whether content security policy sources 216 in use by application sever instance 214 match content security policies 246 as determined by security risk assessment logic 236.

The use of the CSP policy allows an auditor to reason about what code is running on the web site. This use of the CSP policy for a chain of custody is unique with an independent auditor involved to verify that an approved CSP header has been injected by the CDN or other application server instance. The CSP header may be audited without auditing every access of content made under the CSP header, with the assurance that content provided by the browser according to the CSP header will be limited to approved sites listed in the CSP header. In other words, a security violation may be detected even if there is no malicious content being delivered in the instance being checked if the CSP header does not include the correct list of approved content providers.

The configuration of the application server instance may be audited to ensure that approved domains have been verified by an auditor gateway. The gateway checks the integrity of the JavaScript using a hash check. Additionally, domain name system (DNS) and transport layer security (TLS) certificates for the domains on the allow list may be analyzed to ensure that the certificates point to the application server instance for content.

The audited CSP provides an assurance model to promote safety of U.S. or other specific user data whether on a mobile application or on a web site. The assurance process checks sources to mitigate opportunities for that user data to be sent to places where the data should not be sent. The assurance process also limits opportunities for malicious code to run on the web site from unexpected sources. Although there is no sandbox on the web site (as in a mobile environment), a content security policy (CSP) header may be used to establish a chain-of-custody on the web site. The CSP header instructs the browser to load JavaScript only from approved places (e.g., approved.example.com) for a domain (such as one associated with or called by an application), with controls around the domain through the CDN (Content Distribution Network) to the back-end (virtual private cloud (VPC2) gateway tenancy, for example) to ensure that the JavaScript going to the web site is the same as what the gateway tenancy has available for review and that has been through the assurance process or otherwise been cleared as an expected pathway.

The chain of custody process checks that the code running on the web site is the same as the code being reviewed by the gateway tenancy and that has been through the assurance process or otherwise been cleared as an expected pathway. The application server instance includes the CSP header and forces the header into requests going to the web site, and the configuration of the application server instance is ordered as a single choke point to ensure the CSP header is being added. This header can be audited to ensure the header is being added when the web site is invoked. The CSP header can be easily verified for all requests by inspecting the communication with the web site and validating the CSP header. Additionally, a trusted distribution platform (such as a virtual private cloud containing the application server instance or CDN) may be implemented, and the auditor may audit the configuration of the application server instance to ensure the CSP header is added to every request.

A configuration scanning tool pulls a configuration of the application server instance that will check if the application server instance is correctly configured to add the header. The configuration scanning tool may also ensure that the application server instance sends requests for the JavaScript domains listed in the CSP to the auditor's gateway such that the auditor's gateway or other intermediary is configured as the origin in the application server instance configuration for the JavaScript domains. The application server instance is responsible for determining which domains the JavaScript is allowed to come from (e.g., javascript.example.assurance-gateway.com), and the CDN and configuration scanning tool together ensure that the JavaScript routes to the gateway or other intermediary.

If the user is using an uncompromised browser, then the browser is a trusted component that helps to defend against a potentially malicious web site running in the browser. As a trusted component, the browser enforces the CSP header to limit calls to the sources listed in the CSP header.

CSP headers have not been used in this way for assurance and chain of custody purposes. This new use allows an independent auditor to reason about where the JavaScript is coming from.

COMPUTER SYSTEM ARCHITECTURE

FIG. 4 depicts a simplified diagram of a distributed system 400 for implementing an embodiment. In the illustrated embodiment, distributed system 400 includes one or more client computing devices 402, 404, 406, 408, and/or 410 coupled to a server 414 via one or more communication networks 412. Clients computing devices 402, 404, 406, 408, and/or 410 may be configured to execute one or more applications.

In various aspects, server 414 may be adapted to run one or more services or software applications that enable techniques for implementing content security policies to constrain an application to retrieve content from trusted sites and/or to ensure that results of retrieved content pass through an intermediary for additional security checks.

In certain aspects, server 414 may also provide other services or software applications that can include non-virtual and virtual environments. In some aspects, these services may be offered as web-based or cloud services, such as under a Software as a Service (SaaS) model to the users of client computing devices 402, 404, 406, 408, and/or 410. Users operating client computing devices 402, 404, 406, 408, and/or 410 may in turn utilize one or more client applications to interact with server 414 to utilize the services provided by these components.

In the configuration depicted in FIG. 4, server 414 may include one or more components 420, 422 and 424 that implement the functions performed by server 414. These components may include software components that may be executed by one or more processors, hardware components, or combinations thereof. It should be appreciated that various different system configurations are possible, which may be different from distributed system 400. The embodiment shown in FIG. 4 is thus one example of a distributed system for implementing an embodiment system and is not intended to be limiting.

Users may use client computing devices 402, 404, 406, 408, and/or 410 for retrieving content consistent with content security policies and back-end security checks. Additionally or alternatively, users may use client computing devices 402, 404, 406, 408, and/or 410 for implementing content security policies to constrain an application to retrieve content from trusted sites and/or to ensure that results of retrieved content pass through an intermediary for additional security checks in accordance with the teachings of this disclosure. A client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via this interface. Although FIG. 4 depicts only five client computing devices, any number of client computing devices may be supported.

The client devices may include various types of computing systems such as smart phones or other portable handheld devices, general purpose computers such as personal computers and laptops, workstation computers, personal assistant devices, smart watches, smart glasses, or other wearable devices, equipment firmware, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and the like. These computing devices may run various types and versions of software applications and operating systems (e.g., Microsoft Windows®, Apple Macintosh®, UNIX®or UNIX-like operating systems, Linux®or Linux-like operating systems such as Oracle®Linux and Google Chrome®OS) including various mobile operating systems (e.g., Microsoft Windows Mobile®, iOS®, Windows Phone®, Android®, HarmonyOS®, Tizen®, KaiOS®, Sailfish®OS, Ubuntu®Touch, CalyxOS®). Portable handheld devices may include cellular phones, smartphones, (e.g., an iPhone®), tablets (e.g., iPad®), and the like. Virtual personal assistants such as Amazon®Alexa®, Google®Assistant, Microsoft®Cortana®, Apple®Siri®, and others may be implemented on devices with a microphone and/or camera to receive user or environmental inputs, as well as a speaker and/or display to respond to the inputs. Wearable devices may include Apple®Watch, Samsung Galaxy®Watch, Meta Quest®, Ray-Ban®Meta®smart glasses, Snap®Spectacles, and other devices. Gaming systems may include various handheld gaming devices, Internet-enabled gaming devices (e.g., a Microsoft Xbox®gaming console with or without a Kinect®gesture input device, Sony PlayStation®system, Nintendo Switch®, and other devices), and the like. The client devices may be capable of executing various different applications such as various Internet-related apps, communication applications (e.g., e-mail applications, short message service (SMS) applications) and may use various communication protocols.

Network(s) 412 may be any type of network familiar to those skilled in the art that can support data communications using any of a variety of available protocols, including without limitation TCP/IP (transmission control protocol/Internet protocol), SNA (systems network architecture), IPX (Internet packet exchange), AppleTalk®, and the like. Merely by way of example, network(s) 412 can be a local area network (LAN), networks based on Ethernet, Token-Ring, a wide-area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infra-red network, a wireless network (e.g., a network operating under any of the Institute of Electrical and Electronics (IEEE) 1002.11 suite of protocols, Bluetooth®, and/or any other wireless protocol), and/or any combination of these and/or other networks.

Server 414 may be composed of one or more general purpose computers, specialized server computers (including, by way of example, PC (personal computer) servers, UNIX®servers, LINUX®servers, mid-range servers, mainframe computers, rack-mounted servers, etc.), server farms, server clusters, a Real Application Cluster (RAC), database servers, or any other appropriate arrangement and/or combination. Server 414 can include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization such as one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for the server. In various aspects, server 414 may be adapted to run one or more services or software applications that provide the functionality described in the foregoing disclosure.

The computing systems in server 414 may run one or more operating systems including any of those discussed above, as well as any commercially available server operating system. Server 414 may also run any of a variety of additional server applications and/or mid-tier applications, including HTTP (hypertext transport protocol) servers, FTP (file transfer protocol) servers, CGI (common gateway interface) servers, JAVA®servers, database servers, and the like. Exemplary database servers include without limitation those commercially available from Oracle®, Microsoft®, SAP®, Amazon®, Sybase®, IBM® (International Business Machines), and the like.

In some implementations, server 414 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of client computing devices 402, 404, 406, 408, and/or 410. As an example, data feeds and/or event updates may include, but are not limited to, blog feeds, Threads®feeds, Twitter®feeds, Facebook®updates or real-time updates received from one or more third party information sources and continuous data streams, which may include real-time events related to sensor data applications, financial tickers, network performance measuring tools (e.g., network monitoring and traffic management applications), clickstream analysis tools, automobile traffic monitoring, and the like. Server 414 may also include one or more applications to display the data feeds and/or real-time events via one or more display devices of client computing devices 402, 404, 406, 408, and/or 410.

Distributed system 400 may also include one or more data repositories 416, 418. These data repositories may be used to store data and other information in certain aspects. For example, one or more of the data repositories 416, 418 may be used to store information for implementing content security policies to constrain an application to retrieve content from trusted sites and/or to ensure that results of retrieved content pass through an intermediary for additional security checks. Data repositories 416, 418 may reside in a variety of locations. For example, a data repository used by server 414 may be local to server 414 or may be remote from server 414 and in communication with server 414 via a network-based or dedicated connection. Data repositories 416, 418 may be of different types. In certain aspects, a data repository used by server 414 may be a database, for example, a relational database, a container database, an Exadata®storage device, or other data storage and retrieval tool such as databases provided by Oracle Corporation®and other vendors. One or more of these databases may be adapted to enable storage, update, and retrieval of data to and from the database in response to structured query language (SQL)-formatted commands.

In certain aspects, one or more of data repositories 416, 418 may also be used by applications to store application data. The data repositories used by applications may be of different types such as, for example, a key-value store repository, an object store repository, or a general storage repository supported by a file system.

In one embodiment, server 414 is part of a cloud-based system environment in which various services may be offered as cloud services, for a single tenant or for multiple tenants where data, requests, and other information specific to the tenant are kept private from each tenant. In the cloud-based system environment, multiple servers may communicate with each other to perform the work requested by client devices from the same or multiple tenants. The servers communicate on a cloud-side network that is not accessible to the client devices in order to perform the requested services and keep tenant data confidential from other tenants.

FIG. 5 is a simplified block diagram of a cloud-based system environment in which content security policies are implemented to constrain an application to retrieve content from trusted sites and/or to ensure that results of retrieved content pass through an intermediary for additional security checks, in accordance with certain aspects. In the embodiment depicted in FIG. 5, cloud infrastructure system 502 may provide one or more cloud services that may be requested by users using one or more client computing devices 504, 506, and 508. Cloud infrastructure system 502 may comprise one or more computers and/or servers that may include those described above for server 414. The computers in cloud infrastructure system 502 may be organized as general purpose computers, specialized server computers, server farms, server clusters, or any other appropriate arrangement and/or combination.

Network(s) 510 may facilitate communication and exchange of data between clients 504, 506, and 508 and cloud infrastructure system 502. Network(s) 510 may include one or more networks. The networks may be of the same or different types. Network(s) 510 may support one or more communication protocols, including wired and/or wireless protocols, for facilitating the communications.

The embodiment depicted in FIG. 5 is only one example of a cloud infrastructure system and is not intended to be limiting. It should be appreciated that, in some other aspects, cloud infrastructure system 502 may have more or fewer components than those depicted in FIG. 5, may combine two or more components, or may have a different configuration or arrangement of components. For example, although FIG. 5 depicts three client computing devices, any number of client computing devices may be supported in alternative aspects.

The term cloud service is generally used to refer to a service that is made available to users on demand and via a communication network such as the Internet by systems (e.g., cloud infrastructure system 502) of a service provider. Typically, in a public cloud environment, servers and systems that make up the cloud service provider's system are different from the cloud customer's (“tenant's”) own on-premise servers and systems. The cloud service provider's systems are managed by the cloud service provider. Tenants can thus avail themselves of cloud services provided by a cloud service provider without having to purchase separate licenses, support, or hardware and software resources for the services. For example, a cloud service provider's system may host an application, and a user may, via a network 510 (e.g., the Internet), on demand, order and use the application without the user having to buy infrastructure resources for executing the application. Cloud services are designed to provide easy, scalable access to applications, resources, and services. Several providers offer cloud services. For example, several cloud services are offered by Oracle Corporation®, such as database services, middleware services, application services, and others.

In certain aspects, cloud infrastructure system 502 may provide one or more cloud services using different models such as under a Software as a Service (SaaS) model, a Platform as a Service (PaaS) model, an Infrastructure as a Service (IaaS) model, a Data as a Service (DaaS) model, and others, including hybrid service models. Cloud infrastructure system 502 may include a suite of databases, middleware, applications, and/or other resources that enable provision of the various cloud services.

A SaaS model enables an application or software to be delivered to a tenant's client device over a communication network like the Internet, as a service, without the tenant having to buy the hardware or software for the underlying application. For example, a SaaS model may be used to provide tenants access to on-demand applications that are hosted by cloud infrastructure system 502. Examples of SaaS services provided by Oracle Corporation® include, without limitation, various services for human resources/capital management, client relationship management (CRM), enterprise resource planning (ERP), supply chain management (SCM), enterprise performance management (EPM), analytics services, social applications, and others.

An IaaS model is generally used to provide infrastructure resources (e.g., servers, storage, hardware, and networking resources) to a tenant as a cloud service to provide elastic compute and storage capabilities. Various IaaS services are provided by Oracle Corporation®.

A PaaS model is generally used to provide, as a service, platform and environment resources that enable tenants to develop, run, and manage applications and services without the tenant having to procure, build, or maintain such resources. Examples of PaaS services provided by Oracle Corporation® include, without limitation, Oracle Database Cloud Service (DBCS), Oracle Java Cloud Service (JCS), data management cloud service, various application development solutions services, and others.

A DaaS model is generally used to provide data as a service. Datasets may searched, combined, summarized, and downloaded or placed into use between applications. For example, user profile data may be updated by one application and provided to another application. As another example, summaries of user profile information generated based on a dataset may be used to enrich another dataset.

Cloud services are generally provided on an on-demand self-service basis, subscription-based, elastically scalable, reliable, highly available, and secure manner. For example, a tenant, via a subscription order, may order one or more services provided by cloud infrastructure system 502. Cloud infrastructure system 502 then performs processing to provide the services requested in the tenant's subscription order. Cloud infrastructure system 502 may be configured to provide one or even multiple cloud services.

Cloud infrastructure system 502 may provide the cloud services via different deployment models. In a public cloud model, cloud infrastructure system 502 may be owned by a third party cloud services provider and the cloud services are offered to any general public tenant, where the tenant can be an individual or an enterprise. In certain other aspects, under a private cloud model, cloud infrastructure system 502 may be operated within an organization (e.g., within an enterprise organization) and services provided to clients that are within the organization. For example, the clients may be various departments or employees or other individuals of departments of an enterprise such as the Human Resources department, the Payroll department, etc., or other individuals of the enterprise. In certain other aspects, under a community cloud model, the cloud infrastructure system 502 and the services provided may be shared by several organizations in a related community. Various other models such as hybrids of the above mentioned models may also be used.

Client computing devices 504, 506, and 508 may be of different types (such as devices 402, 404, 406, and 408 depicted in FIG. 4) and may be capable of operating one or more client applications. A user may use a client device to interact with cloud infrastructure system 502, such as to request a service provided by cloud infrastructure system 502.

In some aspects, the processing performed by cloud infrastructure system 502 for providing chatbot services may involve big data analysis. This analysis may involve using, analyzing, and manipulating large data sets to detect and visualize various trends, behaviors, relationships, etc. within the data. This analysis may be performed by one or more processors, possibly processing the data in parallel, performing simulations using the data, and the like. For example, big data analysis may be performed by cloud infrastructure system 502 for determining the intent of an utterance. The data used for this analysis may include structured data (e.g., data stored in a database or structured according to a structured model) and/or unstructured data (e.g., data blobs (binary large objects)).

As depicted in the embodiment in FIG. 5, cloud infrastructure system 502 may include infrastructure resources 530 that are utilized for facilitating the provision of various cloud services offered by cloud infrastructure system 502. Infrastructure resources 530 may include, for example, processing resources, storage or memory resources, networking resources, and the like.

In certain aspects, to facilitate efficient provisioning of these resources for supporting the various cloud services provided by cloud infrastructure system 502 for different tenants, the resources may be bundled into sets of resources or resource modules (also referred to as “pods”). Each resource module or pod may comprise a pre-integrated and optimized combination of resources of one or more types. In certain aspects, different pods may be pre-provisioned for different types of cloud services. For example, a first set of pods may be provisioned for a database service, a second set of pods, which may include a different combination of resources than a pod in the first set of pods, may be provisioned for Java service, and the like. For some services, the resources allocated for provisioning the services may be shared between the services.

Cloud infrastructure system 502 may itself internally use services 532 that are shared by different components of cloud infrastructure system 502 and which facilitate the provisioning of services by cloud infrastructure system 502. These internal shared services may include, without limitation, a security and identity service, an integration service, an enterprise repository service, an enterprise manager service, a virus scanning and whitelist service, a high availability, backup and recovery service, service for enabling cloud support, an email service, a notification service, a file transfer service, and the like.

Cloud infrastructure system 502 may comprise multiple subsystems. These subsystems may be implemented in software, or hardware, or combinations thereof. As depicted in FIG. 5, the subsystems may include a user interface subsystem 512 that enables users of cloud infrastructure system 502 to interact with cloud infrastructure system 502. User interface subsystem 512 may include various different interfaces such as a web interface 514, an online store interface 516 where cloud services provided by cloud infrastructure system 502 are advertised and are purchasable by a consumer, and other interfaces 518. For example, a tenant may, using a client device, request (service request 534) one or more services provided by cloud infrastructure system 502 using one or more of interfaces 514, 516, and 518. For example, a tenant may access the online store, browse cloud services offered by cloud infrastructure system 502, and place a subscription order for one or more services offered by cloud infrastructure system 502 that the tenant wishes to subscribe to. The service request may include information identifying the tenant and one or more services that the tenant desires to subscribe to. For example, a tenant may place a subscription order for a chatbot related service offered by cloud infrastructure system 502. As part of the order, the client may provide information identifying the input (e.g. utterances).

In certain aspects, such as the embodiment depicted in FIG. 5, cloud infrastructure system 502 may comprise a service management subsystem (OMS) 520 that is configured to process the new order. As part of this processing, OMS 520 may be configured to: create an account for the tenant, if not done already; receive billing and/or accounting information from the tenant that is to be used for billing the tenant for providing the requested service to the tenant; verify the tenant information; upon verification, book the order for the tenant; and orchestrate various workflows to prepare the order for provisioning.

Once properly validated, OMS 520 may then invoke the service provisioning subsystem (OPS) 524 that is configured to provision resources for the order including processing, memory, and networking resources. The provisioning may include allocating resources for the order and configuring the resources to facilitate the service requested by the tenant order. The manner in which resources are provisioned for an order and the type of the provisioned resources may depend upon the type of cloud service that has been ordered by the tenant. For example, according to one workflow, OPS 524 may be configured to determine the particular cloud service being requested and identify a number of pods that may have been pre-configured for that particular cloud service. The number of pods that are allocated for an order may depend upon the size/amount/level/scope of the requested service. For example, the number of pods to be allocated may be determined based upon the number of users to be supported by the service, the duration of time for which the service is being requested, and the like. The allocated pods may then be customized for the particular requesting tenant for providing the requested service.

Cloud infrastructure system 502 may send a response or notification 544 to the requesting tenant to indicate when the requested service is now ready for use. In some instances, information (e.g., a link) may be sent to the tenant that enables the tenant to start using and availing the benefits of the requested services.

Cloud infrastructure system 502 may provide services to multiple tenants. For each tenant, cloud infrastructure system 502 is responsible for managing information related to one or more subscription orders received from the tenant, maintaining tenant data related to the orders, and providing the requested services to the tenant or clients of the tenant. Cloud infrastructure system 502 may also collect usage statistics regarding a tenant's use of subscribed services. For example, statistics may be collected for the amount of storage used, the amount of data transferred, the number of users, and the amount of system up time and system down time, and the like. This usage information may be used to bill the tenant. Billing may be done, for example, on a monthly cycle.

Cloud infrastructure system 502 may provide services to multiple tenants in parallel. Cloud infrastructure system 502 may store information for these tenants, including possibly proprietary information. In certain aspects, cloud infrastructure system 502 comprises an identity management subsystem (IMS) 528 that is configured to manage tenant's information and provide the separation of the managed information such that information related to one tenant is not accessible by another tenant. IMS 528 may be configured to provide various security-related services such as identity services, such as information access management, authentication and authorization services, services for managing tenant identities and roles and related capabilities, and the like.

FIG. 6 illustrates an exemplary computer system 600 that may be used to implement certain aspects. As shown in FIG. 6, computer system 600 includes various subsystems including a processing subsystem 604 that communicates with a number of other subsystems via a bus subsystem 602. These other subsystems may include a processing acceleration unit 606, an I/O subsystem 608, a storage subsystem 618, and a communications subsystem 624. Storage subsystem 618 may include non-transitory and/or transitory computer-readable storage media including storage media 622 and a system memory 610.

Bus subsystem 602 provides a mechanism for letting the various components and subsystems of computer system 600 communicate with each other as intended. Although bus subsystem 602 is shown schematically as a single bus, alternative aspects of the bus subsystem may utilize multiple buses. Bus subsystem 602 may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, a local bus using any of a variety of bus architectures, and the like. For example, such architectures may include an Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, which can be implemented as a Mezzanine bus manufactured to the IEEE P1386.1 standard, and the like.

Processing subsystem 604 controls the operation of computer system 600 and may comprise one or more processors, application specific integrated circuits (ASICs), or field programmable gate arrays (FPGAs). The processors may be single core or multicore processors. The processing resources of computer system 600 can be organized into one or more processing units 632, 634, etc. A processing unit may include one or more processors, one or more cores from the same or different processors, a combination of cores and processors, or other combinations of cores and processors. In some aspects, processing subsystem 604 can include one or more special purpose co-processors such as graphics processors, digital signal processors (DSPs), or the like. In some aspects, some or all of the processing units of processing subsystem 604 can be implemented using customized circuits, such as application specific integrated circuits (ASICs), or field programmable gate arrays (FPGAs).

In some aspects, the processing units in processing subsystem 604 can execute instructions stored in system memory 610 or on computer readable storage media 622. In various aspects, the processing units can execute a variety of programs or code instructions and can maintain multiple concurrently executing programs or processes. At any given time, some or all of the program code to be executed can be resident in system memory 610 and/or on computer-readable storage media 622 including potentially on one or more storage devices. Through suitable programming, processing subsystem 604 can provide various functionalities described above. In instances where computer system 600 is executing one or more virtual machines, one or more processing units may be allocated to each virtual machine.

In certain aspects, a processing acceleration unit 606 may optionally be provided for performing customized processing or for off-loading some of the processing performed by processing subsystem 604 so as to accelerate the overall processing performed by computer system 600.

I/O subsystem 608 may include devices and mechanisms for inputting information to computer system 600 and/or for outputting information from or via computer system 600. In general, use of the term input device is intended to include all possible types of devices and mechanisms for inputting information to computer system 600. User interface input devices may include, for example, a keyboard, pointing devices such as a mouse or trackball, a touchpad or touch screen incorporated into a display, a scroll wheel, a click wheel, a dial, a button, a switch, a keypad, audio input devices with voice command recognition systems, microphones, and other types of input devices. User interface input devices may also include motion sensing and/or gesture recognition devices such as the Meta Quest®controller, Microsoft Kinect®motion sensor, the Microsoft Xbox®360 game controller, or devices that provide an interface for receiving input using gestures and spoken commands. User interface input devices may also include eye gesture recognition devices such as a blink detector that detects eye activity (e.g., “blinking” while taking pictures and/or making a menu selection) from users and transforms the eye gestures as inputs to an input device. Additionally, user interface input devices may include voice recognition sensing devices that enable users to interact with voice recognition systems (e.g., Siri®navigator or Amazon Alexa®) through voice commands.

Other examples of user interface input devices include, without limitation, three dimensional (3D) mice, joysticks or pointing sticks, gamepads and graphic tablets, and audio/visual devices such as speakers, digital cameras, digital camcorders, portable media players, webcams, image scanners, fingerprint scanners, QR code readers, barcode readers, 3D scanners, 3D printers, laser rangefinders, and eye gaze tracking devices. Additionally, user interface input devices may include, for example, medical imaging input devices such as computed tomography, magnetic resonance imaging, position emission tomography, and medical ultrasonography devices. User interface input devices may also include, for example, audio input devices such as MIDI keyboards, digital musical instruments, and the like.

In general, use of the term output device is intended to include all possible types of devices and mechanisms for outputting information from computer system 600 to a user or other computer. User interface output devices may include a display subsystem, indicator lights, or non-visual displays such as audio output devices, etc. The display subsystem may be any device for outputting a digital picture. Example display devices include flat panel display devices such as those using a light emitting diode (LED) display, a liquid crystal display (LCD) or plasma display, a projection device, a touch screen, a desktop or laptop computer monitor, and the like. As another example, wearable display devices such as Meta Quest®or Microsoft HoloLens®may be mounted to the user for displaying information. User interface output devices may include, without limitation, a variety of display devices that visually convey text, graphics, and audio/video information such as monitors, printers, speakers, headphones, automotive navigation systems, plotters, voice output devices, and modems.

Storage subsystem 618 provides a repository or data store for storing information and data that is used by computer system 600. Storage subsystem 618 provides a tangible non-transitory computer-readable storage medium for storing the basic programming and data constructs that provide the functionality of some aspects. Storage subsystem 618 may store software (e.g., programs, code modules, instructions) that when executed by processing subsystem 604 provides the functionality described above. The software may be executed by one or more processing units of processing subsystem 604. Storage subsystem 618 may also provide a repository for storing data used in accordance with the teachings of this disclosure.

Storage subsystem 618 may include one or more non-transitory memory devices, including volatile and non-volatile memory devices. As shown in FIG. 6, storage subsystem 618 includes a system memory 610 and a computer-readable storage media 622. System memory 610 may include a number of memories including a volatile main random access memory (RAM) for storage of instructions and data during program execution and a non-volatile read only memory (ROM) or flash memory in which fixed instructions are stored. In some implementations, a basic input/output system (BIOS), containing the basic routines that help to transfer information between elements within computer system 600, such as during start-up, may typically be stored in the ROM. The RAM typically contains data and/or program modules that are presently being operated and executed by processing subsystem 604. In some implementations, system memory 610 may include multiple different types of memory, such as static random access memory (SRAM), dynamic random access memory (DRAM), and the like.

By way of example, and not limitation, as depicted in FIG. 6, system memory 610 may load application programs 612 that are being executed, which may include various applications such as Web browsers, mid-tier applications, relational database management systems (RDBMS), etc., program data 614, and an operating system 616. By way of example, operating system 616 may include various versions of Microsoft Windows®, Apple Macintosh®, and/or Linux®operating systems, a variety of commercially-available UNIX®or UNIX-like operating systems (including without limitation the variety of GNU/Linux operating systems, the Oracle Linux®, Google Chrome® OS, and the like) and/or mobile operating systems such as iOS, Windows® Phone, Android® OS, and others.

Computer-readable storage media 622 may store programming and data constructs that provide the functionality of some aspects. Computer-readable media 622 may provide storage of computer-readable instructions, data structures, program modules, and other data for computer system 600. Software (programs, code modules, instructions) that, when executed by processing subsystem 604 provides the functionality described above, may be stored in storage subsystem 618. By way of example, computer-readable storage media 622 may include non-volatile memory such as a hard disk drive, a magnetic disk drive, an optical disk drive such as a CD ROM, digital video disc (DVD), a Blu-Ray®disk, or other optical media. Computer-readable storage media 622 may include, but is not limited to, Zip®drives, flash memory cards, universal serial bus (USB) flash drives, secure digital (SD) cards, DVD disks, digital video tape, and the like. Computer-readable storage media 622 may also include, solid-state drives (SSD) based on non-volatile memory such as flash-memory based SSDs, enterprise flash drives, solid state ROM, and the like, SSDs based on volatile memory such as solid state RAM, dynamic RAM, static RAM, dynamic random access memory (DRAM)-based SSDs, magnetoresistive RAM (MRAM) SSDs, and hybrid SSDs that use a combination of DRAM and flash memory based SSDs.

In certain aspects, storage subsystem 618 may also include a computer-readable storage media reader 620 that can further be connected to computer-readable storage media 622. Reader 620 may receive and be configured to read data from a memory device such as a disk, a flash drive, etc.

In certain aspects, computer system 600 may support virtualization technologies, including but not limited to virtualization of processing and memory resources. For example, computer system 600 may provide support for executing one or more virtual machines. In certain aspects, computer system 600 may execute a program such as a hypervisor that facilitated the configuring and managing of the virtual machines. Each virtual machine may be allocated memory, compute (e.g., processors, cores), I/O, and networking resources. Each virtual machine generally runs independently of the other virtual machines. A virtual machine typically runs its own operating system, which may be the same as or different from the operating systems executed by other virtual machines executed by computer system 600. Accordingly, multiple operating systems may potentially be run concurrently by computer system 600.

Communications subsystem 624 provides an interface to other computer systems and networks. Communications subsystem 624 serves as an interface for receiving data from and transmitting data to other systems from computer system 600. For example, communications subsystem 624 may enable computer system 600 to establish a communication channel to one or more client devices via the Internet for receiving and sending information from and to the client devices. For example, the communications subsystem may be used to transmit a response to a user regarding the inquiry for a chatbot.

Communications subsystem 624 may support both wired and/or wireless communication protocols. For example, in certain aspects, communications subsystem 624 may include radio frequency (RF) transceiver components for accessing wireless voice and/or data networks (e.g., using cellular telephone technology, advanced data network technology, such as 3G, 4G or EDGE (enhanced data rates for global evolution), Wi-Fi (IEEE 802.XX family standards, or other mobile communication technologies, or any combination thereof), global positioning system (GPS) receiver components, and/or other components. In some aspects communications subsystem 624 can provide wired network connectivity (e.g., Ethernet) in addition to or instead of a wireless interface.

Communications subsystem 624 can receive and transmit data in various forms. For example, in some aspects, in addition to other forms, communications subsystem 624 may receive input communications in the form of structured and/or unstructured data feeds 626, event streams 628, event updates 630, and the like. For example, communications subsystem 624 may be configured to receive (or send) data feeds 626 in real-time from users of social media networks and/or other communication services such as Twitter®feeds, Facebook®updates, web feeds such as Rich Site Summary (RSS) feeds, and/or real-time updates from one or more third party information sources.

In certain aspects, communications subsystem 624 may be configured to receive data in the form of continuous data streams, which may include event streams 628 of real-time events and/or event updates 630, that may be continuous or unbounded in nature with no explicit end. Examples of applications that generate continuous data may include, for example, sensor data applications, financial tickers, network performance measuring tools (e.g., network monitoring and traffic management applications), clickstream analysis tools, automobile traffic monitoring, and the like.

Communications subsystem 624 may also be configured to communicate data from computer system 600 to other computer systems or networks. The data may be communicated in various different forms such as structured and/or unstructured data feeds 626, event streams 628, event updates 630, and the like to one or more databases that may be in communication with one or more streaming data source computers coupled to computer system 600.

Computer system 600 can be one of various types, including a handheld portable device (e.g., an iPhone® cellular phone, an iPad® computing tablet, a personal digital assistant (PDA)), a wearable device (e.g., a Meta Quest®head mounted display), a personal computer, a workstation, a mainframe, a kiosk, a server rack, or any other data processing system. Due to the ever-changing nature of computers and networks, the description of computer system 600 depicted in FIG. 6 is intended only as a specific example. Many other configurations having more or fewer components than the system depicted in FIG. 6 are possible. Based on the disclosure and teachings provided herein, a person of ordinary skill in the art can appreciate other ways and/or methods to implement the various aspects.

Although specific aspects have been described, various modifications, alterations, alternative constructions, and equivalents are possible. Embodiments are not restricted to operation within certain specific data processing environments, but are free to operate within a plurality of data processing environments. Additionally, although certain aspects have been described using a particular series of transactions and steps, it should be apparent to those skilled in the art that this is not intended to be limiting. Although some flowcharts describe operations as a sequential process, many of the operations can be performed in parallel or concurrently. In addition, the order of the operations may be rearranged. A process may have additional steps not included in the figure. Various features and aspects of the above-described aspects may be used individually or jointly.

Further, while certain aspects have been described using a particular combination of hardware and software, it should be recognized that other combinations of hardware and software are also possible. Certain aspects may be implemented only in hardware, or only in software, or using combinations thereof. The various processes described herein can be implemented on the same processor or different processors in any combination.

Where devices, systems, components or modules are described as being configured to perform certain operations or functions, such configuration can be accomplished, for example, by designing electronic circuits to perform the operation, by programming programmable electronic circuits (such as microprocessors) to perform the operation such as by executing computer instructions or code, or processors or cores programmed to execute code or instructions stored on a non-transitory memory medium, or any combination thereof. Processes can communicate using a variety of techniques including but not limited to conventional techniques for inter-process communications, and different pairs of processes may use different techniques, or the same pair of processes may use different techniques at different times.

Specific details are given in this disclosure to provide a thorough understanding of the aspects. However, aspects may be practiced without these specific details. For example, well-known circuits, processes, algorithms, structures, and techniques have been shown without unnecessary detail in order to avoid obscuring the aspects. This description provides example aspects only, and is not intended to limit the scope, applicability, or configuration of other aspects. Rather, the preceding description of the aspects can provide those skilled in the art with an enabling description for implementing various aspects. Various changes may be made in the function and arrangement of elements.

The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense. It can, however, be evident that additions, subtractions, deletions, and other modifications and changes may be made thereunto without departing from the broader spirit and scope as set forth in the claims. Thus, although specific aspects have been described, these are not intended to be limiting. Various modifications and equivalents are within the scope of the following claims.

Claims

1. A computer-implemented method comprising:

identifying a plurality of scripts that are executed during execution of application functionality;
evaluating the plurality of scripts to determine a set of scripts of the plurality of scripts that is approved for the application functionality; wherein evaluating the plurality of scripts comprises performing one or more security tests to determine whether any scripts of the plurality of scripts is a security risk;
based at least in part on determining that the set of scripts is not posing a security risk, storing a hash table that identifies, for each script of the set of scripts, a hash of at least part of the script;
determining one or more sources of scripts to make available for executing scripts in a web application that performs at least some of the application functionality; wherein the one or more sources of scripts include at least a particular source that references an intermediary for a content target; wherein the content target is excluded from the one or more sources;
receiving, at the intermediary, a result of a request for content that was made by an instance of the web application, wherein the result of the request is from the content target;
validating that a hash of the result of the request matches a particular hash of at least part of a particular script from the hash table;
based at least in part on the validating, providing the particular script to the instance of the web application for execution;
auditing a particular source of a particular instance of the web application to verify that the particular source is configured to distribute the instance of the web application using a content security policy that is limited to the one or more sources of scripts.

2. The computer-implemented method of claim 1, wherein auditing the particular source of the particular instance of the web application comprises determining that the content security policy is in a header of the particular instance of the web application and that the content security policy specifies the one or more sources of scripts as one or more paths to one or more intermediaries.

3. The computer-implemented method of claim 1, wherein auditing the particular source of the particular instance of the web application comprises determining that the content security policy is in a meta tag of the particular instance of the web application and that the content security policy specifies the one or more sources of scripts as one or more paths to one or more intermediaries.

4. The computer-implemented method of claim 1, wherein the intermediary is configured to perform validating that the result matches the particular hash and providing the particular script to the instance of the web application.

5. The computer-implemented method of claim 1, further comprising receiving, at the intermediary, the request for content that was made by the instance of the web application, verifying that the request is for content from a source for which content verification is available, and forwarding the request to the source.

6. The computer-implemented method of claim 5, further comprising, before forwarding the request to the source:

storing a request hash table that identifies, for a plurality of requests that have passed one or more security tests, a hash of at least part of the request;
validating that the request matches another particular hash of at least part of a particular request from the request hash table.

7. The computer-implemented method of claim 1, further comprising:

receiving, at the intermediary, a second result of a second request for content that was made by a second instance of the web application;
determining that a hash of the second result does not match any hash of at least part of any script from the hash table;
based at least in part on determining that the hash of the second result does not match any hash of at least part of any script form the hash table, blocking the second result from the second instance of the web application.

8. The computer-implemented method of claim 7, further comprising:

based at least in part on the second request, evaluating a second script to determine whether the second script is a security risk;
based at least in part on determining that the second script is not a security risk, adding a hash of the second script to the hash table as a stored indication that the second script is not a security risk.

9. The computer-implemented method of claim 1, further comprising:

receiving, at the intermediary, a second result of a second request for content that was made by a second instance of the web application;
determining that a hash of the second result matches a second particular hash that has been stored to indicate a security risk;
based at least in part on determining that the hash of the second result matches the second particular hash that has been stored to indicate the security risk, blocking the second result from the second instance of the web application.

10. The computer-implemented method of claim 1, wherein performing one or more security tests to determine whether any scripts of the plurality of scripts is a security risk comprises performing a particular security test on the particular script, wherein the particular security test determines that the particular script accesses data commensurate with the application functionality.

11. The computer-implemented method of claim 1, wherein performing one or more security tests to determine whether any scripts of the plurality of scripts is a security risk comprises performing a particular security test on the particular script, wherein the particular security test determines that the particular script does not attempt to expand the application functionality to include access to resources that are not associated with the application functionality.

12. The computer-implemented method of claim 1, wherein performing one or more security tests to determine whether any scripts of the plurality of scripts is a security risk comprises performing a particular security test on the particular script, wherein the particular security test determines that the particular script does not log user-specific information externally to an application service that provides the application functionality.

13. The computer-implemented method of claim 1, wherein identifying the plurality of scripts that are executed during execution of application functionality comprises accessing at least part of a code base for providing the application functionality, and wherein evaluating the plurality of scripts comprises evaluating the particular script in a context of how the particular script is used in the code base.

14. The computer-implemented method of claim 1, further comprising:

determining that a second request for content that was made by a second instance of the web application requests content from a particular trusted source of the one or more sources of scripts; wherein the particular trusted source is configured to provide the content for the second request to the second instance of the web application without using any content validation intermediaries;
based at least in part on determining that the second request requests content from the particular trusted source, retrieving, by the second instance of the web application, a second result directly from the particular trusted source for execution by the second instance without validating whether the second result matches any hash of at least part of any script from the hash table.

15. A computer-program product comprising one or more non-transitory machine-readable storage media, including stored instructions configured to cause a computing system to perform a set of actions including:

identifying a plurality of scripts that are executed during execution of application functionality;
evaluating the plurality of scripts to determine a set of scripts of the plurality of scripts that is approved for the application functionality; wherein evaluating the plurality of scripts comprises performing one or more security tests to determine whether any scripts of the plurality of scripts is a security risk;
based at least in part on determining that the set of scripts is not a security risk, storing a hash table that identifies, for each script of the set of scripts, a hash of at least part of the script;
determining one or more sources of scripts to make available for executing scripts in a web application that performs at least some of the application functionality; wherein the one or more sources of scripts include at least a particular source that references an intermediary for a content target; wherein the content target is excluded from the one or more sources;
receiving, at the intermediary, a result of a request for content that was made by an instance of the web application, wherein the result of the request is from the content target;
validating that a hash of the result of the request matches a particular hash of at least part of a particular script from the hash table;
based at least in part on the validating, providing the particular script to the instance of the web application for execution;
auditing a particular source of a particular instance of the web application to verify that the particular source is configured to distribute the instance of the web application using a content security policy that is limited to the one or more sources of scripts.

16. The computer-program product of claim 15, wherein auditing the particular source of the particular instance of the web application comprises determining that the content security policy is in a header of the particular instance of the web application and that the content security policy specifies the one or more sources of scripts as one or more paths to one or more intermediaries.

17. The computer-program product of claim 15, wherein the set of actions further includes:

receiving, at the intermediary, a second result of a second request for content that was made by a second instance of the web application;
determining that a hash of the second result does not match any hash of at least part of any script from the hash table;
based at least in part on determining that the hash of the second result does not match any hash of at least part of any script form the hash table, blocking the second result from the second instance of the web application.

18. A system comprising:

one or more processors;
one or more non-transitory computer-readable media storing instructions, which, when executed by the system, cause the system to perform a set of actions including:
identifying a plurality of scripts that are executed during execution of application functionality;
evaluating the plurality of scripts to determine a set of scripts of the plurality of scripts that is approved for the application functionality; wherein evaluating the plurality of scripts comprises performing one or more security tests to determine whether any scripts of the plurality of scripts are a security risk;
based at least in part on determining that the set of scripts is not a security risk, storing a hash table that identifies, for each script of the set of scripts, a hash of at least part of the script;
determining one or more sources of scripts to make available for executing scripts in a web application that performs at least some of the application functionality; wherein the one or more sources of scripts include at least a particular source that references an intermediary for a content target; wherein the content target is excluded from the one or more sources;
receiving, at the intermediary, a result of a request for content that was made by an instance of the web application, wherein the result of the request is from the content target;
validating that a hash of the result of the request matches a particular hash of at least part of a particular script from the hash table;
based at least in part on the validating, providing the particular script to the instance of the web application for execution;
auditing a particular source of a particular instance of the web application to verify that the particular source is configured to distribute the instance of the web application using a content security policy that is limited to the one or more sources of scripts.

19. The system of claim 18, wherein auditing the particular source of the particular instance of the web application comprises determining that the content security policy is in a header of the particular instance of the web application and that the content security policy specifies the one or more sources of scripts as one or more paths to one or more intermediaries.

20. The system of claim 18, wherein the set of actions further includes:

receiving, at the intermediary, a second result of a second request for content that was made by a second instance of the web application, wherein the second result of the second request is from at least one of the one or more sources of scripts;
determining that a hash of the second result does not match any hash of at least part of any script from the hash table;
based at least in part on determining that the hash of the second result does not match any hash of at least part of any script form the hash table, blocking the second result from the second instance of the web application.
Patent History
Publication number: 20260377549
Type: Application
Filed: May 23, 2025
Publication Date: Nov 26, 2026
Applicant: Oracle International Corporation (Redwood Shores, CA)
Inventors: Matias Brutti (Auburn, WA), Christian Rudolf Hoermann (Raleigh, NC)
Application Number: 19/218,095
Classifications
International Classification: G06F 21/57 (20130101); H04L 9/40 (20220101);