Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

JSON response headers need XSS protection #29

Open
joseph-reynolds opened this issue Oct 16, 2018 · 0 comments
Open

JSON response headers need XSS protection #29

joseph-reynolds opened this issue Oct 16, 2018 · 0 comments

Comments

@joseph-reynolds
Copy link

The REST API HTTP responses are missing some security headers. This should be done even for JSON data per https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet.

For example, https GET /${bmc}/xyz/openbmc_project/network/enumerate returns JSON data with HTTP response headers that do not include:

  • Content-Security-Policy
  • X-Content-Type-Options
  • X-XSS-Protection
  • Strict-Transport-Security
  • and other similar headers

The fix is to add these headers to the HTTP response.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant