Skip to content

Commit d786c69

Browse files
committed
feat: security: Enable google safebrowsing and populate the API keys, b=no-bug, c=workflows, common, configs
1 parent 3524507 commit d786c69

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

.github/workflows/linux-release-build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ jobs:
121121
./mach --no-interactive bootstrap --application-choice browser
122122
cd ..
123123
124+
- name: Insert API Keys
125+
run: |
126+
mkdir -p ~/.zen-keys
127+
echo "${{ secrets.ZEN_SAFEBROWSING_API_KEY }}" > ~/.zen-keys/safebrowsing.dat
128+
124129
- name: Build
125130
env:
126131
SURFER_COMPAT: ${{ matrix.arch }}
@@ -141,6 +146,10 @@ jobs:
141146
export SURFER_PLATFORM="linux"
142147
export ZEN_RELEASE=1
143148
npm run package
149+
150+
- name: Remove API Keys
151+
run: |
152+
rm -rf ~/.zen-keys
144153
145154
- name: Rename artifacts
146155
run: |

.github/workflows/macos-release-build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ jobs:
132132
- name: Build language packs
133133
run: sh scripts/download-language-packs.sh
134134

135+
- name: Insert API Keys
136+
run: |
137+
mkdir -p ~/.zen-keys
138+
echo "${{ secrets.ZEN_SAFEBROWSING_API_KEY }}" > ~/.zen-keys/safebrowsing.dat
139+
135140
- name: Build Zen
136141
env:
137142
SURFER_COMPAT: ${{ matrix.arch }}
@@ -152,6 +157,10 @@ jobs:
152157
export ZEN_RELEASE=1
153158
npm run package
154159
160+
- name: Remove API Keys
161+
run: |
162+
rm -rf ~/.zen-keys
163+
155164
- name: Rename artifacts
156165
run: |
157166
echo "Tarballing DMG"

.github/workflows/windows-release-build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ jobs:
226226
chmod +x ~/artifact/en-US.log
227227
chmod +x ~/artifact/merged.profdata
228228
229+
- name: Insert API Keys
230+
run: |
231+
mkdir -p ~/.zen-keys
232+
echo "${{ secrets.ZEN_SAFEBROWSING_API_KEY }}" > ~/.zen-keys/safebrowsing.dat
233+
229234
- name: Build
230235
if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
231236
env:
@@ -259,6 +264,11 @@ jobs:
259264
ls ./dist
260265
ls .
261266
267+
268+
- name: Remove API Keys
269+
run: |
270+
rm -rf ~/.zen-keys
271+
262272
- name: Move package for PGO upload
263273
if: ${{ inputs.generate-gpo && matrix.arch == 'x86_64' }}
264274
run: |

configs/common/mozconfig

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ if ! test "$SCCACHE_GHA_ENABLED" = "false"; then
3232
fi
3333
fi
3434

35+
# add safe browsing key if it exists on a file
36+
if test -f "$HOME/.zen-keys/safebrowsing.dat"; then
37+
ac_add_options --with-google-safebrowsing-api-keyfile="$HOME/.zen-keys/safebrowsing.dat"
38+
fi
39+
3540
if test "$ZEN_RELEASE"; then
3641

3742
# TODO: Make this successful in builds
@@ -96,10 +101,7 @@ fi
96101

97102
ac_add_options --enable-unverified-updates
98103

99-
ac_add_options --enable-raw
100-
ac_add_options --enable-webrtc
101104
ac_add_options --enable-jxl
102-
ac_add_options --enable-av1
103105

104106
ac_add_options --with-unsigned-addon-scopes=app,system
105107

0 commit comments

Comments
 (0)