lookit / lookit/lookit-api

Missing Security-Related HTTP Headers

Open
#1,083 0 comments 1 reaction 1 assignee View on GitHub

@okaycj is already working on this.

Since Sep 28, 2023.

bg-priority Security
Dominant language
Python
Stars
12
Forks
21
Avg merge
5d 19h
Merged PRs (30d)
5

Description

Description
During the engagement, LMG identified that web service responses did not contain one or more of the following security-related HTTP header flags:

  • Content-Security-Policy
  • X-Permitted-Cross-Domain-Policies
  • Cross-Origin-Resource-Policy
  • X-XSS-Protection

Web administrators can use Content-Security-Policy (CSP) as an added layer of security that helps the web server detect and mitigate certain types of attacks, including XSS and data injection attacks. There are currently three header options that define allowed content types and the ability to define sources of trusted JavaScript.

To ensure the website is calling the cross-domain file that the site’s root has defined, administrators should implement the X-Permitted-Cross-Domain-Policies header. This is similar to a crossdomain.xml policy file and restricts/allows locations where Flash content can be accessed.

The Cross-Origin Resource Policy (CORP) header can be set to allow websites and applications to block certain requests from other origins such as <script> and < img>. This can mitigate side-channel attacks, like Spectre and XSS attacks.

Additional context
LMG recommends that system administrators add the following HTTP headers as required. Typical options include:

  • Content-Security-Policy
  • X-Permitted-Cross-Domain-Policies: master-only
  • Cross-Origin-Resource-Policy
  • X-XSS-Protection

LMG Document
https://drive.google.com/file/d/18vNuBbHOTZCrTZYvgz7oAbVwzfAJwsdd/view?usp=share_link

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.