Setting 'HttpOnly' and 'Secure' in web.xml
问题 I need to have the 'HttpOnly' and 'Secure' attributes set to 'true' to prevent the CWE-614: Sensitive Cookie in HTTPS Session Without 'Secure' Attribute and CWE-402: Transmission of Private Resources into a New Sphere flaws from showing in the Veracode report. After doing some online searching, it seems that the best thing to do is to simply set the attributes in the project's web.xml file as follows: <session-config> <cookie-config> <http-only>true</http-only> <secure>true</secure> </cookie