You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/07/29 07:21:01 UTC

[jira] [Work logged] (WW-5084) Content Security Policy support

     [ https://issues.apache.org/jira/browse/WW-5084?focusedWorklogId=463665&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-463665 ]

ASF GitHub Bot logged work on WW-5084:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Jul/20 07:20
            Start Date: 29/Jul/20 07:20
    Worklog Time Spent: 10m 
      Work Description: salcho opened a new pull request #429:
URL: https://github.com/apache/struts/pull/429


   Hello Struts Devs!
   
   This PR adds Content Security Policy support for Struts 2. A very popular security mitigation against XSS and other injection vulnerabilities. CSP comes in many flavours, but we've chosen to add support for the most robust of them: nonce-based, strict-dynamic CSP.
   
   Here's a summary of these changes:
   
   - Allows users to configure whether CSP is enabled in reporting or enforcement modes and lets them set a report URI, where violation reports will be sent by the browser.
   - Implements a CSP Interceptor that generates a nonce-based, strict-dynamic policy and adds it to HTTP responses according to the user's configuration.
   - Implements custom JSP and FTL <script> tags. These (`<s:script>` in taglib, for instance) set the nonce attribute on script blocks automatically, so that they match the nonce set in the policy. This feature allows developers to use both existing and new script blocks that are compatible with CSP with minimal refactoring.
   - Provides a default implementation of a CSP violation report collection endpoint. This allows developers to see CSP reports as they happen in their logs out of the box, with minimal effort. This behaviour is extensible, so developers can customise the processing of CSP reports.
   
   With these tools, developers can enable CSP in reporting mode, collect reports and identify and refactor existing code that is incompatible with CSP from these reports. Finally, developers will be able to switch CSP to enforcing mode, which will provide a very robust defense against XSS. 
   
   Co-authored-by: Ecenaz Jen Ozmen <eo...@columbia.edu>
   Co-authored-by: Giannis Chatziveroglou <gi...@google.com>
   Co-authored-by: Sal <sa...@gmail.com>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 463665)
    Remaining Estimate: 0h
            Time Spent: 10m

> Content Security Policy support
> -------------------------------
>
>                 Key: WW-5084
>                 URL: https://issues.apache.org/jira/browse/WW-5084
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Core Interceptors, Core Tags
>    Affects Versions: 2.6
>            Reporter: Santiago Diaz
>            Priority: Major
>             Fix For: 2.6
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> We'd like to add built-in Content Security Policy support to Struts2 to provide a major security mechanism that developers can use to protect against common Cross-Site Scripting vulnerabilities. Developers will have the ability to enable CSP in report-only or enforcement mode.
> We will provide an out of the box tag that can be used by developers to use/import scripts in their web applications, so that these will automatically get nonces that are compatible with their Content Security policies.
> Finally, we will provide a built-in handler for CSP violation reports that will be used to collect and provide textual explanations of these reports. This endpoint will be used by developers to debug CSP violations and locate pieces of code that need to be refactored to support strong policies.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)