Improve the auditability of first-party origin detection

Open
#262 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

The issue relates to first-party origin detection logic, likely in the extension's core security modules. Start by examining the code paths that handle origin detection and the calls to Tor Browser Bundle's privileged fetch API. Look for existing tests to understand the current behavior, then refactor to improve clarity and add documentation inline. The goal is to make the detection logic transparent and auditable, ensuring it correctly identifies first-party origins.

Written by the indexing model from the issue text.

Description

For #163, one of the concerns is that the extension could detect first-party origins incorrectly, pass incorrectly detected FPOs to TBB's new privileged fetch API, and hence allow manipulating Tor circuits. One way to remedy that is to make the FPO detection logic more transparent and easily auditable. Some of the concrete things that could entail are:

  • Better documentation, preferably directly linked to code
  • Refactoring call paths that are currently difficult to follow
  • Refactoring the detection logic itself
  • More thorough testing
Dominant language
TypeScript
Stars
116
Forks
12
Avg merge
1d 5h
Merged PRs (30d)
10

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from freedomofpress/webcat

All issues in freedomofpress/webcat

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.