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

@joseph-reynolds

Description

@joseph-reynolds

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions