Cannot use "sfw npm" with the brave-browser repository

Open
#10 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
node.js
Domain
security

Research direction

Reproduce the failure using the listed sfw npm alias and the brave-browser clone and initialization commands. Start by reading scripts/init.js and build/commands/scripts/sync.js, especially the depot_tools clone step; done means npm run init can complete for brave-browser while sfw remains in use.

Written by the indexing model from the issue text.

Description

enhancement

sfw appears to be interfering with something we need in order to clone the Chromium repo:

$ mkdir temp-brave-browser
$ cd temp-brave-browser
$ git clone https://github.com/brave/brave-browser
Cloning into 'brave-browser'...
remote: Enumerating objects: 92926, done.
remote: Counting objects: 100% (290/290), done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 92926 (delta 277), reused 253 (delta 248), pack-reused 92636 (from 6)
Receiving objects: 100% (92926/92926), 32.67 MiB | 30.39 MiB/s, done.
Resolving deltas: 100% (61939/61939), done.
$ git clone https://github.com/brave/brave-core brave-browser/src/brave
Cloning into 'brave-browser/src/brave'...
remote: Enumerating objects: 1378094, done.
remote: Counting objects: 100% (1906/1906), done.
remote: Compressing objects: 100% (645/645), done.
remote: Total 1378094 (delta 1584), reused 1262 (delta 1261), pack-reused 1376188 (from 4)
Receiving objects: 100% (1378094/1378094), 3.77 GiB | 42.54 MiB/s, done.
Resolving deltas: 100% (1000659/1000659), done.
$ cd brave-browser
$ npm install
Protected by Socket Firewall

added 6 packages, and audited 7 packages in 453ms

2 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

=== Socket Firewall ===

Warning: Socket Firewall did not detect any package fetch attempts

$ npm run init
Protected by Socket Firewall

> [email protected] init
> node ./scripts/init.js

Performing initial checkout of brave-core
------------------------------------------------------------------------------------------
/home/francois/temp-brave-browser/brave-browser/src/brave
> git rev-parse HEAD
brave-core repo at /home/francois/temp-brave-browser/brave-browser/src/brave is at commit ID 7df6a15466d8058afe9b0839eccb2097dd7b5d64
------------------------------------------------------------------------------------------
/home/francois/temp-brave-browser/brave-browser/src/brave
> npm install
------------------------------------------------------------------------------------------
/home/francois/temp-brave-browser/brave-browser/src/brave
> npm run sync -- --init

> [email protected] sync
> node ./build/commands/scripts/sync.js --init

install depot_tools...
------------------------------------------------------------------------------------------
/home/francois/temp-brave-browser/brave-browser/src/brave
> git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /home/francois/temp-brave-browser/brave-browser/src/brave/vendor/depot_tools
Cloning into '/home/francois/temp-brave-browser/brave-browser/src/brave/vendor/depot_tools'...
fatal: unable to access 'https://chromium.googlesource.com/chromium/tools/depot_tools.git/': CONNECT tunnel failed, response 403
null
null
null
null

=== Socket Firewall ===

 - 22 packages fetched successfully

I installed sfw system-wide as root:

$ sfw --version
Socket Firewall Free, version 0.12.20

and have the following aliases:

$ grep sfw ~/.bash_aliases 
alias npm="/usr/bin/sfw npm"
alias pnpm="/usr/bin/sfw pnpm"
alias yarn="/usr/bin/sfw yarn"
alias pip="/usr/bin/sfw pip"
alias uv="/usr/bin/sfw uv"
alias cargo="/usr/bin/sfw cargo"
Dominant language
No language data
Stars
271
Forks
8
PR merge metrics
No merged PRs in 30d

Getting set up

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 SocketDev/sfw-free

All issues in SocketDev/sfw-free

Similar issues

More Security issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.