AUR AI Reviewer

Review Results

Version #2749 of ungoogled-chromium · commit 5dc3924db85c · status Reviewed

Risk 0/5 · Safe .SRCINFO
Result #4712

Comment

The change is limited to .SRCINFO metadata and adds a new makedepend on esbuild while bumping the package version. There is no evidence in the provided diff of malicious behavior, privilege escalation, network fetching, or packaging changes beyond dependency metadata. Since .SRCINFO is generated metadata and the actual build logic is not changed here, this appears low risk based on the reviewed hunk alone.

@@ -1,12 +1,13 @@
 pkgbase = ungoogled-chromium
 	pkgdesc = A lightweight approach to removing Google web service dependency
-	pkgver = 153.0.8010.52
+	pkgver = 154.0.8037.97
 	pkgrel = 1
 	url = https://github.com/ungoogled-software/ungoogled-chromium
 	arch = x86_64
 	license = BSD-3-Clause
 	makedepends = clang
 	makedepends = compiler-rt
+	makedepends = esbuild
 	makedepends = git
 	makedepends = gn
 	makedepends = go
Risk 0/5 · Safe .SRCINFO
Result #4713

Comment

The change only adds `vulkan-headers` to `makedepends` in `.SRCINFO`. This is a build-time dependency metadata update with no evidence of code execution, network access, privilege changes, or packaging behavior changes. It does not affect runtime contents or introduce suspicious sources/scripts.

@@ -22,6 +23,7 @@ pkgbase = ungoogled-chromium
 	makedepends = rust-bindgen
 	makedepends = rust
 	makedepends = typescript
+	makedepends = vulkan-headers
 	makedepends = python-httplib2
 	makedepends = python-pyparsing
 	makedepends = python-six
Risk 0/5 · Safe .SRCINFO
Result #4714

Comment

The change only bumps the package metadata in .SRCINFO to a newer upstream release (provides/source version 153.0.8010.52 -> 154.0.8037.97) and keeps the same official GitHub release source pattern. No new sources, scripts, install hooks, permissions, or build logic are introduced in this diff. Based on the provided hunk alone, this is a routine version update with no evident security red flags.

@@ -85,13 +87,13 @@ pkgbase = ungoogled-chromium
 	optdepends = qt6-base: Qt support
 	optdepends = org.freedesktop.secrets: password storage backend on GNOME, KDE and Xfce
 	optdepends = upower: Battery Status API support
-	provides = chromium=153.0.8010.52
-	provides = chromedriver=153.0.8010.52
+	provides = chromium=154.0.8037.97
+	provides = chromedriver=154.0.8037.97
 	conflicts = chromium
 	conflicts = chromedriver
 	options = !lto
 	source = fetch-chromium-release
-	source = ungoogled-chromium-153.0.8010.52-1.tar.gz::https://github.com/ungoogled-software/ungoogled-chromium/archive/153.0.8010.52-1.tar.gz
+	source = ungoogled-chromium-154.0.8037.97-1.tar.gz::https://github.com/ungoogled-software/ungoogled-chromium/archive/154.0.8037.97-1.tar.gz
 	source = https://github.com/foutrelis/chromium-launcher/archive/v8/chromium-launcher-8.tar.gz
 	source = chromium-138-nodejs-version-check.patch
 	source = chromium-145-fix-SYS_SECCOMP.patch
Risk 0/5 · Safe .SRCINFO
Result #4715

Comment

The .SRCINFO update is a routine version bump from 153 to 154 with corresponding source and checksum refreshes. The added makedepends (esbuild, vulkan-headers) and replacement patch/source entries are consistent with upstream build changes for Chromium 154, and there are no signs here of malicious URLs, floating VCS references, build-time network fetches, privilege escalation, or packaging outside the expected source/checksum metadata. Since this review is limited to .SRCINFO and the diff only reflects metadata synchronization, I see no security issue in the change itself.

@@ -100,20 +102,22 @@ pkgbase = ungoogled-chromium
 	source = chromium-149-drop-unknown-clang-flag.patch
 	source = chromium-149-use-of-undeclared-identifier-ERROR.patch
 	source = chromium-150-revert-avx-flag-change.patch
-	source = chromium-152-fix-gn-no-public_inputs.patch
 	source = chromium-152-unbundle-minizip-undo-unicode.patch
 	source = chromium-152-unbundle-opus-devtools.patch
 	source = chromium-153-hermetic-python.patch
 	source = chromium-153-iamf-tools-unbundled-opus.patch
-	source = chromium-153-typescript.patch
-	source = chromium-153-crubit.patch
+	source = chromium-154-use-system-esbuild.patch
+	source = chromium-154-fix-gn-no-public_inputs.patch
+	source = chromium-154-typescript.patch
+	source = chromium-154-crubit.patch
+	source = chromium-154-remove-private_verification_tokens.patch
 	source = compiler-rt-adjust-paths.patch
 	source = increase-fortify-level.patch
 	source = enable-widevine-arm64.patch
 	source = use-oauth2-client-switches-as-default.patch
 	source = glibc-2.42-baud-rate-fix.patch
 	sha256sums = 2e2f36e3cd1ebc4ad57fd310774a5e5e9db77883d5f9374fedeaabd3c103b819
-	sha256sums = c98a3a5c243471522d8aefc079f62bdcbc7b953e34dc6187197e4abff03a0a94
+	sha256sums = 489509cd6f3a00ae7c2e56f3484da62b7d153c086899edf263ffd7e0c95e2b74
 	sha256sums = 213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a
 	sha256sums = 11a96ffa21448ec4c63dd5c8d6795a1998d8e5cd5a689d91aea4d2bdd13fb06e
 	sha256sums = 4fc040a0656a0a524dd8ad090cd129fc5b6cb21adcc66be82080165789e8c13e
Risk 0/5 · Safe .SRCINFO
Result #4716

Comment

The change only updates several sha256 checksums in .SRCINFO, which is metadata generated from the PKGBUILD. There are no new sources, scripts, build steps, permissions changes, or install-time behaviors introduced by this diff hunk itself. On its face this is a low-risk maintenance update, though the actual safety still depends on the corresponding PKGBUILD/source changes outside this hunk.

@@ -122,13 +126,15 @@ pkgbase = ungoogled-chromium
 	sha256sums = 1b5190fa030850cf30a97dc90e35b31f3097243c88743fbfaedbd64ea80f1327
 	sha256sums = 951514535be65f0e2f84e82305d96292be1da353c1427ba1048ea24be70003c4
 	sha256sums = 5f6ccb7b945c8a13c690493723bad816b36f2f25792d47e677b56f8200907e60
-	sha256sums = 50115642099ac131f40c419cbd12ed72e352538002d4bdc11ab657335891d03b
 	sha256sums = 890e5d98088ef1c7c075a551442f03385d1db266cad8a65576704a22720683f9
 	sha256sums = 3276453f2ce655b6286476f48d4df837be952d9447afa46583f79ec71f2288c3
 	sha256sums = ebf74154266d0b6d6cc957c413f845052c5fcfce7745befb8821595cdf3f7d49
 	sha256sums = 2ab9fbe653829ce692f83ee780aad07e8c83a6686e51ab9459ad736cfa2850ee
-	sha256sums = 44c86a7c26d726559d5bd06a64f81e6bcced7ab4dc949c899e4fd2c64ff37a16
-	sha256sums = a20e615fa03713e464fc3f2966c84e2130b6d942a4c8b5919ba0bf8320d39ed4
+	sha256sums = 017e32d7c92a2c3d672e0535d52a27be1b805aa4dfe7d29cb1c1552460ccad64
+	sha256sums = 7f39267af6bd60cc19244ca43684e18a0bb441b197fa1627ca4c4d97fbc759ca
+	sha256sums = d061cf4aeba21b1d2edabc28afd38106246b99aa5ec699e1b9ee5ca8b76d8a23
+	sha256sums = a82147f07982d49b0744c53c5fc038d4de1ef7d9a828b6280abbb49462b623eb
+	sha256sums = 0cc5f7c7ccf0927c0bbfdb9e797dc5b1f4c9f021e8a01d943121d3ee4e6416bf
 	sha256sums = ec8e49b7114e2fa2d359155c9ef722ff1ba5fe2c518fa48e30863d71d3b82863
 	sha256sums = d634d2ce1fc63da7ac41f432b1e84c59b7cceabf19d510848a7cff40c8025342
 	sha256sums = 5ee4bb69379ac0cea7946c9f8f4ca9e20e0a9e4ee2ee9121eb0ebbb94dd7e928
Risk 0/5 · Safe PKGBUILD
Result #4717

Comment

The change is a routine version bump plus patch refreshes and dependency updates. I did not find evidence of malicious behavior in the PKGBUILD diff itself: sources remain HTTPS and pinned, no new runtime downloads or privilege escalation are introduced, and the added patches are local, reviewable source modifications. The new esbuild symlink and extra makedepends are consistent with the updated Chromium build requirements. The only notable risk is that one of the new patches removes private_verification_tokens functionality, but that is a feature reduction/privacy-related change rather than a security backdoor or supply-chain issue in this packaging diff.

@@ -11,14 +11,14 @@
 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
 
 pkgname=ungoogled-chromium
-pkgver=153.0.8010.52
+pkgver=154.0.8037.97
 pkgrel=1
 _launcher_ver=8
 _manual_clone=1
 _system_clang=1
 # ungoogled chromium variables
 _uc_usr=ungoogled-software
-_uc_ver=153.0.8010.52-1
+_uc_ver=154.0.8037.97-1
 pkgdesc="A lightweight approach to removing Google web service dependency"
 arch=('x86_64')
 url="https://github.com/ungoogled-software/ungoogled-chromium"
Risk 0/5 · Safe PKGBUILD
Result #4718

Comment

The change only adds `esbuild` to makedepends. This is a build-time dependency from the official repositories, not a network fetch or an embedded binary, and the diff does not alter sources, install scripts, permissions, or package contents. On its face this is low risk; the only minor concern is that it expands the build toolchain, but there is no evidence of malicious behavior in this hunk.

@@ -64,6 +64,7 @@ depends=(
 makedepends=(
   'clang'
   'compiler-rt'
+  'esbuild'
   'git'
   'gn'
   'go'
Risk 0/5 · Safe PKGBUILD
Result #4719

Comment

The change only adds vulkan-headers to makedepends. This is a standard build-time dependency addition with no evidence of network access, code execution, privilege changes, or packaging/install-script behavior. It does not affect runtime package contents or introduce suspicious sources or scripts.

@@ -79,6 +80,7 @@ makedepends=(
   'rust-bindgen'
   'rust'
   'typescript'
+  'vulkan-headers'
 )
 optdepends=('pipewire: WebRTC desktop sharing under Wayland'
             'kdialog: support for native dialogs in Plasma'
Risk 0/5 · Safe PKGBUILD
Result #4720

Comment

The PKGBUILD change is mostly a version bump plus patch refreshes and dependency updates. I did not find evidence of classic supply-chain red flags such as network fetches in build(), curl|bash, sudo, or writes outside $pkgdir. The new patches are local and appear to adjust Chromium/ungoogled-chromium build integration (system esbuild/tsc, Crubit, and removal of private_verification_tokens), not to introduce persistence or privilege escalation. One thing to note is that the package now relies on additional system toolchain components (esbuild, vulkan-headers) and switches devtools TypeScript/esbuild paths to system binaries, but that is a packaging choice rather than an obvious security issue in this diff. Overall this looks low risk.

@@ -99,20 +101,22 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom
         chromium-149-drop-unknown-clang-flag.patch
         chromium-149-use-of-undeclared-identifier-ERROR.patch
         chromium-150-revert-avx-flag-change.patch
-        chromium-152-fix-gn-no-public_inputs.patch
         chromium-152-unbundle-minizip-undo-unicode.patch
         chromium-152-unbundle-opus-devtools.patch
         chromium-153-hermetic-python.patch
         chromium-153-iamf-tools-unbundled-opus.patch
-        chromium-153-typescript.patch
-        chromium-153-crubit.patch
+        chromium-154-use-system-esbuild.patch
+        chromium-154-fix-gn-no-public_inputs.patch
+        chromium-154-typescript.patch
+        chromium-154-crubit.patch
+        chromium-154-remove-private_verification_tokens.patch
         compiler-rt-adjust-paths.patch
         increase-fortify-level.patch
         enable-widevine-arm64.patch
         use-oauth2-client-switches-as-default.patch
         glibc-2.42-baud-rate-fix.patch)
 sha256sums=('645f64566cfbb780747430d53ff3656f03639f89fed9544c1eadd4c17e7b1c82'
-            'c98a3a5c243471522d8aefc079f62bdcbc7b953e34dc6187197e4abff03a0a94'
+            '489509cd6f3a00ae7c2e56f3484da62b7d153c086899edf263ffd7e0c95e2b74'
             '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
             '11a96ffa21448ec4c63dd5c8d6795a1998d8e5cd5a689d91aea4d2bdd13fb06e'
             '4fc040a0656a0a524dd8ad090cd129fc5b6cb21adcc66be82080165789e8c13e'
Risk 0/5 · Safe PKGBUILD
Result #4721

Comment

The change is a routine version bump for ungoogled-chromium with updated checksums and patch set. The new patch `chromium-154-use-system-esbuild.patch` only redirects DevTools build scripts to `/usr/bin/esbuild`, and the PKGBUILD correspondingly adds the `esbuild` dependency and symlinks the expected path to the system package. The other patch additions/removals are Chromium source adjustments (TypeScript/Crubit/private_verification_tokens) and do not introduce network fetches, privilege escalation, or install-time persistence. No suspicious sources, shell execution, or writes outside `$pkgdir` are present in the reviewed hunk.

@@ -121,13 +125,15 @@ sha256sums=('645f64566cfbb780747430d53ff3656f03639f89fed9544c1eadd4c17e7b1c82'
             '1b5190fa030850cf30a97dc90e35b31f3097243c88743fbfaedbd64ea80f1327'
             '951514535be65f0e2f84e82305d96292be1da353c1427ba1048ea24be70003c4'
             '5f6ccb7b945c8a13c690493723bad816b36f2f25792d47e677b56f8200907e60'
-            '50115642099ac131f40c419cbd12ed72e352538002d4bdc11ab657335891d03b'
             '890e5d98088ef1c7c075a551442f03385d1db266cad8a65576704a22720683f9'
             '3276453f2ce655b6286476f48d4df837be952d9447afa46583f79ec71f2288c3'
             'ebf74154266d0b6d6cc957c413f845052c5fcfce7745befb8821595cdf3f7d49'
             '2ab9fbe653829ce692f83ee780aad07e8c83a6686e51ab9459ad736cfa2850ee'
-            '44c86a7c26d726559d5bd06a64f81e6bcced7ab4dc949c899e4fd2c64ff37a16'
-            'a20e615fa03713e464fc3f2966c84e2130b6d942a4c8b5919ba0bf8320d39ed4'
+            '017e32d7c92a2c3d672e0535d52a27be1b805aa4dfe7d29cb1c1552460ccad64'
+            '7f39267af6bd60cc19244ca43684e18a0bb441b197fa1627ca4c4d97fbc759ca'
+            'd061cf4aeba21b1d2edabc28afd38106246b99aa5ec699e1b9ee5ca8b76d8a23'
+            'a82147f07982d49b0744c53c5fc038d4de1ef7d9a828b6280abbb49462b623eb'
+            '0cc5f7c7ccf0927c0bbfdb9e797dc5b1f4c9f021e8a01d943121d3ee4e6416bf'
             'ec8e49b7114e2fa2d359155c9ef722ff1ba5fe2c518fa48e30863d71d3b82863'
             'd634d2ce1fc63da7ac41f432b1e84c59b7cceabf19d510848a7cff40c8025342'
             '5ee4bb69379ac0cea7946c9f8f4ca9e20e0a9e4ee2ee9121eb0ebbb94dd7e928'
Risk 0/5 · Safe PKGBUILD
Result #4722

Comment

The change only removes application of one local patch in prepare(): `chromium-152-fix-gn-no-public_inputs.patch` for `third_party/devtools-frontend/src`. No new code is introduced, no build-time network access is added, and there are no packaging/persistence/privilege changes. The security impact is limited to whatever behavior that patch was intended to fix; removing a patch may affect build correctness or upstream compatibility, but it does not itself introduce a clear security issue in the PKGBUILD diff reviewed here.

@@ -238,9 +244,6 @@ prepare() {
   # Credit: https://github.com/ungoogled-software/ungoogled-chromium/pull/3837
   patch -Np1 -i ../chromium-150-revert-avx-flag-change.patch
 
-  # Just the reverted commit 8dab8b761385b7946588232e4e2a8c116f9293c3
-  patch -Np1 -i "$srcdir/chromium-152-fix-gn-no-public_inputs.patch" -d third_party/devtools-frontend/src
-
   patch -Np1 -i ../chromium-152-unbundle-minizip-undo-unicode.patch
 
   patch -Np1 -i ../chromium-152-unbundle-opus-devtools.patch
Risk 2/5 · Moderate PKGBUILD
Result #4723

Comment

The change is mostly a version bump plus build-system adjustments, but it introduces a notable packaging risk by replacing vendored devtools TypeScript/esbuild usage with system binaries and a symlink into /usr/lib/node_modules/esbuild. That is a legitimate AUR pattern, but it increases trust in host-installed tooling and can break hermeticity/reproducibility. The more concerning part is the large set of Chromium patch updates, especially the new `chromium-154-remove-private_verification_tokens.patch`, which removes private verification token functionality from browser, browsing-data, and component-updater code paths. However, this appears to be a deliberate feature-removal patch rather than a backdoor or privilege escalation, and I did not find any network fetches, sudo usage, or install-script persistence mechanisms in the reviewed hunk. Overall this is low-to-moderate risk, mainly due to supply-chain/build integrity concerns rather than an obvious malicious payload.

@@ -254,12 +257,21 @@ prepare() {
   # for the unbundled system Opus build
   patch -Np1 -i ../chromium-153-iamf-tools-unbundled-opus.patch
 
+  patch -Np1 -i ../chromium-154-use-system-esbuild.patch
+
+  patch -Np1 -i ../chromium-154-fix-gn-no-public_inputs.patch
+
   # Work around TypeScript becoming a build dependency: disable tsgo for the
   # WebUI and point devtools at the system tsc binary
-  # https://github.com/ungoogled-software/ungoogled-chromium/pull/3946
-  patch -Np1 -i ../chromium-153-typescript.patch
+  # https://github.com/ungoogled-software/ungoogled-chromium/pull/3966
+  patch -Np1 -i ../chromium-154-typescript.patch
+
+  patch -Np1 -i ../chromium-154-crubit.patch
+
+  patch -Np1 -i ../chromium-154-remove-private_verification_tokens.patch
 
-  patch -Np1 -i ../chromium-153-crubit.patch
+  rm -rf third_party/devtools-frontend/src/node_modules/esbuild/
+  ln -s /usr/lib/node_modules/esbuild/ third_party/devtools-frontend/src/node_modules/esbuild
 
   if (( !_system_clang )); then
     # Use prebuilt rust as system rust cannot be used due to the error:
Risk 0/5 · Safe PKGBUILD
Result #4724

Comment

The shown change is a no-op formatting edit in PKGBUILD: it only adds a trailing backslash after an existing path in a list within prepare(). No new sources, downloads, commands, permissions, or packaging behavior are introduced. I found no security-relevant impact from this hunk alone.

@@ -286,7 +298,7 @@ prepare() {
            third_party/rust-toolchain/bin \
            third_party/jdk/current/bin \
            third_party/gperf/cipd/bin \
-           third_party/dawn/tools/golang/linux-amd64/bin
+           third_party/dawn/tools/golang/linux-amd64/bin \
 
   ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
   ln -s /usr/bin/java third_party/jdk/current/bin/
Risk 0/5 · Safe PKGBUILD
Result #4725

Comment

The PKGBUILD change itself is low risk. The only requested hunk updates desktop-file placeholder substitutions from a removed symlink placeholder to explicit desktop entry fields (Exec/Icon/StartupWMClass), which is a normal packaging adjustment and does not introduce new execution paths, privilege changes, network access, or persistence. The broader commit adds new patches and dependencies, but those are outside the provided hunk and are not the subject of this review.

@@ -444,7 +456,9 @@ package() {
   sed -i \
     -e 's/@@MENUNAME/Chromium/g' \
     -e 's/@@PACKAGE/chromium/g' \
-    -e 's/@@usr_bin_symlink_name/chromium/g' \
+    -e 's/@@desktop_exec/chromium/g' \
+    -e 's/@@desktop_icon/chromium/g' \
+    -e 's/@@startup_wm_class/chromium/g' \
     -e 's|@@uri_scheme|x-scheme-handler/chromium;|g' \
     -e 's/@@extra_desktop_entries//g' \
     "$pkgdir/usr/share/applications/chromium.desktop" \
Risk 0/5 · Safe REUSE.toml
Result #4726

Comment

The change only updates REUSE.toml license annotations to match renamed/added patch files. It does not alter build logic, sources, install scripts, or any executable content. I see no security-relevant behavior introduced by this metadata-only update.

@@ -52,8 +52,9 @@ path = [
     "increase-fortify-level.patch",
     "use-oauth2-client-switches-as-default.patch",
     "chromium-150-revert-avx-flag-change.patch",
-    "chromium-150-fix-ar-unbundle.patch",
-    "chromium-152-fix-gn-no-public_inputs.patch",
+    "chromium-154-fix-gn-no-public_inputs.patch",
+    "chromium-152-unbundle-minizip-undo-unicode.patch",
+    "chromium-152-unbundle-opus-devtools.patch",
 ]
 SPDX-FileCopyrightText = "chromium contributors"
 SPDX-License-Identifier = "BSD-3-Clause"
Risk 0/5 · Safe REUSE.toml
Result #4727

Comment

The change only updates REUSE.toml SPDX annotations to match renamed/added patch files. This is metadata-only and does not affect build logic, package contents, or execution paths. I do not see any security-relevant behavior introduced by this diff.

@@ -61,8 +62,10 @@ SPDX-License-Identifier = "BSD-3-Clause"
 [[annotations]]
 path = [
     "chromium-153-hermetic-python.patch",
-    "chromium-153-typescript.patch",
-    "chromium-153-crubit.patch",
+    "chromium-154-typescript.patch",
+    "chromium-154-fix-gn-no-public_inputs.patch",
+    "chromium-154-use-system-esbuild.patch",
+    "chromium-154-remove-private_verification_tokens.patch",
 ]
 SPDX-FileCopyrightText = "2015-2026 The ungoogled-chromium Authors"
 SPDX-License-Identifier = "BSD-3-Clause"
Risk 0/5 · Safe REUSE.toml
Result #4728

Comment

The change is limited to REUSE metadata, updating patch filenames to match renamed/added patch files and removing a trailing blank line. It does not alter build logic, sources, install scripts, or any executable content. No security-relevant behavior is introduced by this metadata-only update.

@@ -85,7 +88,7 @@ SPDX-License-Identifier = "BSD-2-Clause"
 path = [
     "chromium-149-drop-unknown-clang-flag.patch",
     "chromium-149-use-of-undeclared-identifier-ERROR.patch",
-    "chromium-152-crubit.patch",
+    "chromium-154-crubit.patch",
 ]
 SPDX-FileCopyrightText = "2003-2026 Nixpkgs/NixOS contributors"
 SPDX-License-Identifier = "MIT"
Risk 0/5 · Safe REUSE.toml
Result #4729

Comment

The change is a trivial formatting-only edit in REUSE.toml: it removes a blank line between SPDX metadata entries and does not alter sources, build steps, dependencies, install scripts, or any executable content. No security-relevant behavior is introduced.

@@ -96,5 +99,4 @@ path = [
     "chromium-152-unbundle-opus-devtools.patch",
 ]
 SPDX-FileCopyrightText = "LN Liberda <lauren@selfisekai.rocks>"
-
 SPDX-License-Identifier = "BSD-3-Clause"
Risk 3/5 · Elevated chromium-154-crubit.patch
Result #4730

Comment

The change is mostly a refactor away from Rust helpers to C++/BoringSSL/crypto implementations, but it introduces a notable integrity-risk in `CreateIntegrityBlockCbor()`: the code now hand-assembles the CBOR integrity block and explicitly admits it may embed pre-encoded, unvalidated CBOR bytes from `attributes_cbor()`. That weakens the previous parser/serializer boundary and could allow malformed or attacker-controlled CBOR to be propagated into signature verification logic. The new parser also accepts and re-encodes CBOR structures manually, which is a larger attack surface than the prior Rust parser. I did not find obvious command execution, privilege escalation, or network-fetch issues in this diff, so the risk is moderate rather than high.

@@ -0,0 +1,820 @@
+--- a/components/cbor/BUILD.gn
++++ b/components/cbor/BUILD.gn
+@@ -12,7 +12,7 @@ buildflag_header("buildflags") {
+   # TODO(crbug.com/535682335): Remove `USE_CBOR_RUST` buildflag entirely,
+   # unconditionally enable Rust CBOR parser, and drop `is_cronet_build` check
+   # once Cronet supports Crubit dependencies.
+-  flags = [ "USE_CBOR_RUST=!$is_cronet_build" ]
++  flags = [ "USE_CBOR_RUST=$enable_cpp_api_from_rust" ]
+ }
+ 
+ component("cbor") {
+@@ -35,7 +35,7 @@ component("cbor") {
+     "//base",
+   ]
+ 
+-  if (!is_cronet_build) {
++  if (enable_cpp_api_from_rust) {
+     public_deps = [
+       "//build/rust/crubit",
+       "//components/cbor/rust:cbor_rust_bindings",
+@@ -62,7 +62,7 @@ source_set("unit_tests") {
+     "//testing/gtest",
+     "//third_party/fuzztest",
+   ]
+-  if (!is_cronet_build) {
++  if (enable_cpp_api_from_rust) {
+     deps += [ "//components/cbor/rust:cbor_rust_unittests" ]
+   }
+ 
+--- a/components/web_package/BUILD.gn
++++ b/components/web_package/BUILD.gn
+@@ -40,7 +40,6 @@ static_library("web_package") {
+     "//base",
+     "//components/base32",
+     "//components/cbor",
+-    "//components/web_package/signed_web_bundles/rust:signed_web_bundles_rust_bindings",
+     "//mojo/public/cpp/bindings",
+     "//net",
+     "//services/network/public/mojom",
+@@ -70,7 +69,6 @@ source_set("mojom_mapped_types") {
+ 
+   deps = [
+     "//base",
+-    "//components/web_package/signed_web_bundles/rust:signed_web_bundles_rust_bindings",
+     "//crypto",
+     "//mojo/public/cpp/bindings",
+   ]
+@@ -98,7 +96,6 @@ source_set("unit_tests") {
+     ":web_package",
+     "//base/test:test_support",
+     "//components/cbor",
+-    "//components/web_package/signed_web_bundles/rust:signed_web_bundles_rust_unittests",
+     "//components/web_package/test_support",
+     "//mojo/public/cpp/bindings",
+     "//mojo/public/cpp/test_support:test_utils",
+--- a/components/web_package/signed_web_bundles/ecdsa_p256_sha256_signature.cc
++++ b/components/web_package/signed_web_bundles/ecdsa_p256_sha256_signature.cc
+@@ -9,7 +9,8 @@
+ #include "base/strings/stringprintf.h"
+ #include "base/types/expected.h"
+ #include "components/web_package/signed_web_bundles/ecdsa_p256_public_key.h"
+-#include "components/web_package/signed_web_bundles/rust/signed_web_bundles_rust.h"
++#include "crypto/keypair.h"
++#include "crypto/sign.h"
+ 
+ namespace web_package {
+ 
+@@ -50,8 +51,9 @@ EcdsaP256SHA256Signature::EcdsaP256SHA25
+ [[nodiscard]] bool EcdsaP256SHA256Signature::Verify(
+     base::span<const uint8_t> message,
+     const EcdsaP256PublicKey& public_key) const {
+-  return signed_web_bundles::rust::verify_ecdsa_p256_signature(
+-      public_key.bytes(), bytes(), message);
++  auto key = crypto::keypair::PublicKey::FromEcP256Point(public_key.bytes());
++  return crypto::sign::Verify(crypto::sign::ECDSA_SHA256, *key, message,
++                              bytes());
+ }
+ 
+ }  // namespace web_package
+--- a/components/web_package/signed_web_bundles/ed25519_signature.cc
++++ b/components/web_package/signed_web_bundles/ed25519_signature.cc
+@@ -7,7 +7,6 @@
+ #include <algorithm>
+ 
+ #include "base/strings/stringprintf.h"
+-#include "components/web_package/signed_web_bundles/rust/signed_web_bundles_rust.h"
+ #include "third_party/boringssl/src/include/openssl/curve25519.h"
+ 
+ namespace web_package {
+@@ -43,8 +42,11 @@ Ed25519Signature::Ed25519Signature(std::
+ [[nodiscard]] bool Ed25519Signature::Verify(
+     base::span<const uint8_t> message,
+     const Ed25519PublicKey& public_key) const {
+-  return signed_web_bundles::rust::verify_ed25519_signature(public_key.bytes(),
+-                                                            bytes(), message);
++  const std::array<uint8_t, ED25519_PUBLIC_KEY_LEN>& public_key_bytes =
++      public_key.bytes();
++  const std::array<uint8_t, ED25519_SIGNATURE_LEN>& signature_bytes = bytes();
++  return ED25519_verify(message.data(), message.size(), signature_bytes.data(),
++                        public_key_bytes.data());
+ }
+ 
+ }  // namespace web_package
+--- a/components/web_package/signed_web_bundles/integrity_block_parser.cc
++++ b/components/web_package/signed_web_bundles/integrity_block_parser.cc
+@@ -4,17 +4,19 @@
+ 
+ #include "components/web_package/signed_web_bundles/integrity_block_parser.h"
+ 
++#include <algorithm>
+ #include <string>
+-#include <string_view>
+ #include <vector>
+ 
+-#include "base/check.h"
+-#include "base/containers/span.h"
++#include "base/containers/map_util.h"
+ #include "base/functional/bind.h"
+ #include "base/strings/stringprintf.h"
++#include "base/strings/to_string.h"
+ #include "base/types/expected.h"
+ #include "base/types/expected_macros.h"
+ #include "components/cbor/reader.h"
++#include "components/cbor/writer.h"
++#include "components/web_package/mojom/web_bundle_parser.mojom-forward.h"
+ #include "components/web_package/mojom/web_bundle_parser.mojom.h"
+ #include "components/web_package/signed_web_bundles/constants.h"
+ #include "components/web_package/signed_web_bundles/ecdsa_p256_public_key.h"
+@@ -22,56 +24,11 @@
+ #include "components/web_package/signed_web_bundles/ed25519_public_key.h"
+ #include "components/web_package/signed_web_bundles/ed25519_signature.h"
+ #include "components/web_package/signed_web_bundles/integrity_block_attributes.h"
+-#include "components/web_package/signed_web_bundles/rust/signed_web_bundles_rust.h"
+ #include "components/web_package/signed_web_bundles/signed_web_bundle_id.h"
+ #include "components/web_package/signed_web_bundles/types.h"
+ 
+ namespace web_package {
+ 
+-namespace {
+-
+-using SignatureType = signed_web_bundles::rust::SignatureType::Tag;
+-using signed_web_bundles::rust::parse_integrity_block;
+-
+-base::expected<mojom::BundleIntegrityBlockSignatureStackEntryPtr, std::string>
+-CreateSignatureStackEntry(
+-    const signed_web_bundles::rust::SignatureStackEntry& entry) {
+-  auto parsed_sig = mojom::BundleIntegrityBlockSignatureStackEntry::New();
+-
+-  switch (entry.signature_type.tag) {
+-    case SignatureType::Ed25519: {
+-      ASSIGN_OR_RETURN(auto public_key,
+-                       Ed25519PublicKey::Create(entry.public_key.to_span()));
+-      ASSIGN_OR_RETURN(auto signature,
+-                       Ed25519Signature::Create(entry.signature.to_span()));
+-      parsed_sig->signature_info = mojom::SignatureInfo::NewEd25519(
+-          mojom::SignatureInfoEd25519::New(public_key, signature));
+-      break;
+-    }
+-    case SignatureType::EcdsaP256SHA256: {
+-      ASSIGN_OR_RETURN(auto public_key,
+-                       EcdsaP256PublicKey::Create(entry.public_key.to_span()));
+-      ASSIGN_OR_RETURN(auto signature, EcdsaP256SHA256Signature::Create(
+-                                           entry.signature.to_span()));
+-      parsed_sig->signature_info = mojom::SignatureInfo::NewEcdsaP256Sha256(
+-          mojom::SignatureInfoEcdsaP256SHA256::New(public_key, signature));
+-      break;
+-    }
+-    case SignatureType::Unknown: {
+-      parsed_sig->signature_info =
+-          mojom::SignatureInfo::NewUnknown(mojom::SignatureInfoUnknown::New());
+-      break;
+-    }
+-  }
+-
+-  parsed_sig->attributes_cbor =
+-      BinaryData(entry.attributes_cbor.begin(), entry.attributes_cbor.end());
+-
+-  return parsed_sig;
+-}
+-
+-}  // namespace
+-
+ IntegrityBlockParser::IntegrityBlockParser(
+     mojom::BundleDataSource& data_source,
+     WebBundleParser::ParseIntegrityBlockCallback callback)
+@@ -103,37 +60,103 @@ void IntegrityBlockParser::OnIntegrityBl
+     RunErrorCallback("Error reading the integrity block.");
+     return;
+   }
++  // This structure is built during parsing and returned by the final callback
++  mojom::BundleIntegrityBlockPtr integrity_block =
++      mojom::BundleIntegrityBlock::New();
++
++  size_t consumed_bytes = 0;
++  cbor::Reader::DecoderError error;
++  cbor::Reader::Config config;
++  config.num_bytes_consumed = &consumed_bytes;
++  config.error_code_out = &error;
++
++  // When config `bytes_consumed` are assigned the CBOR parser reads only to the
++  // end of a structure. It parses only Integrity Block even if Web Bundle part
++  // starts just after.
++  std::optional<cbor::Value> value = cbor::Reader::Read(*data, config);
++  if (!value) {
++    RunErrorCallback("Error parsing integrity block as CBOR: " +
++                     std::string(cbor::Reader::ErrorCodeToString(error)));
++    return;
++  }
++  integrity_block->size = consumed_bytes;
++
++  if (!value->is_array()) {
++    RunErrorCallback("Integrity block is not a CBOR array.");
++    return;
++  }
+ 
+-  const auto parse_res = parse_integrity_block(*data);
+-  if (!parse_res.has_value()) {
+-    const auto& error = parse_res.error();
+-    RunErrorCallback(std::string(error.message.as_str()),
+-                     error.is_version_error
+-                         ? mojom::BundleParseErrorType::kVersionError
+-                         : mojom::BundleParseErrorType::kFormatError);
++  const cbor::Value::ArrayValue& top_array = value->GetArray();
++  if (top_array.size() != kIntegrityBlockV2TopLevelArrayLength) {
++    RunErrorCallback(base::StringPrintf(
++        "Invalid integrity block array length: expected %u, got %zu.",
++        kIntegrityBlockV2TopLevelArrayLength, top_array.size()));
+     return;
+   }
+ 
+-  const auto& parsed_ib = *parse_res;
+-  auto integrity_block = mojom::BundleIntegrityBlock::New();
+-  integrity_block->size = parsed_ib.size;
+-
+-  const std::string_view web_bundle_id_str =
+-      parsed_ib.web_bundle_id.to_string_view();
+-  RETURN_IF_ERROR(
+-      SignedWebBundleId::Create(web_bundle_id_str),
+-      [&](std::string error) { RunErrorCallback(std::move(error)); });
+-
+-  integrity_block->attributes =
+-      IntegrityBlockAttributes(std::string(web_bundle_id_str),
+-                               BinaryData(parsed_ib.attributes_cbor.begin(),
+-                                          parsed_ib.attributes_cbor.end()));
++  // 1. Magic bytes
++  if (!top_array[0].is_bytestring() ||
++      !std::ranges::equal(top_array[0].GetBytestring(),
++                          kIntegrityBlockMagicBytes)) {
++    RunErrorCallback("Unexpected magic bytes.");
++    return;
++  }
++
++  // 2. Version
++  if (!top_array[1].is_bytestring() ||
++      !std::ranges::equal(top_array[1].GetBytestring(),
++                          kIntegrityBlockV2VersionBytes)) {
++    RunErrorCallback("Unexpected version bytes.",
++                     mojom::BundleParseErrorType::kVersionError);
++    return;
++  }
+ 
+-  for (const auto& entry : parsed_ib.signature_stack) {
++  // 3. Attributes
++  if (!top_array[2].is_map()) {
++    RunErrorCallback("Integrity block attributes must be a map.");
++    return;
++  }
++  const cbor::Value::MapValue& attributes_map = top_array[2].GetMap();
++  const cbor::Value* web_bundle_id =
++      base::FindOrNull(attributes_map, cbor::Value(kWebBundleIdAttributeName));
++  if (!web_bundle_id || !web_bundle_id->is_string()) {
++    RunErrorCallback(
++        "`webBundleId` integrity block attribute is missing or malformed.");
++    return;
++  }
++
++  // Check if web_bundle_id is correct
++  RETURN_IF_ERROR(SignedWebBundleId::Create(web_bundle_id->GetString()),
++                  [&](const std::string& error) { RunErrorCallback(error); });
++
++  BinaryData attributes_cbor = *cbor::Writer::Write(top_array[2]);
++  integrity_block->attributes = IntegrityBlockAttributes(
++      web_bundle_id->GetString(), std::move(attributes_cbor));
++
++  // 4. Signature Stack
++  if (!top_array[3].is_array()) {
++    RunErrorCallback("Signature stack must be an array.");
++    return;
++  }
++  const cbor::Value::ArrayValue& signatures = top_array[3].GetArray();
++  if (signatures.empty()) {
++    RunErrorCallback(
++        "The signature stack must contain at least one signature.");
++    return;
++  }
++
++  for (const auto& signature_info_raw : signatures) {
+     ASSIGN_OR_RETURN(
+-        auto parsed_sig, CreateSignatureStackEntry(entry),
+-        [&](std::string error) { RunErrorCallback(std::move(error)); });
+-    integrity_block->signature_stack.push_back(std::move(parsed_sig));
++        auto parsed_signature_info, ParseSignatureInfo(signature_info_raw),
++        [&](const std::string& error) { this->RunErrorCallback(error); });
++
++    if (integrity_block->signature_stack.empty() &&
++        parsed_signature_info->signature_info->is_unknown()) {
++      RunErrorCallback("Unknown cipher type of the first signature.");
++      return;
++    }
++    integrity_block->signature_stack.push_back(
++        std::move(parsed_signature_info));
+   }
+ 
+   std::move(complete_callback_)
+@@ -141,13 +164,74 @@ void IntegrityBlockParser::OnIntegrityBl
+                           std::move(integrity_block), nullptr));
+ }
+ 
++base::expected<mojom::BundleIntegrityBlockSignatureStackEntryPtr, std::string>
++IntegrityBlockParser::ParseSignatureInfo(
++    const cbor::Value& signature_info_raw) {
++  if (!signature_info_raw.is_array() ||
++      signature_info_raw.GetArray().size() != 2) {
++    return base::unexpected(
++        "Each signature stack entry must contain exactly two elements.");
++  }
++
++  const cbor::Value::ArrayValue& signature_info_array =
++      signature_info_raw.GetArray();
++  if (!signature_info_array[0].is_map() ||
++      !signature_info_array[1].is_bytestring()) {
++    return base::unexpected("Malformed signature stack entry.");
++  }
++
++  mojom::BundleIntegrityBlockSignatureStackEntryPtr parsed_signature_info =
++      mojom::BundleIntegrityBlockSignatureStackEntry::New();
++  parsed_signature_info->attributes_cbor =
++      *cbor::Writer::Write(signature_info_array[0]);
++
++  const cbor::Value::MapValue& signature_attributes =
++      signature_info_array[0].GetMap();
++  const BinaryData& signature_bytes = signature_info_array[1].GetBytestring();
++
++  const cbor::Value* ed25519_key = base::FindOrNull(
++      signature_attributes, cbor::Value(kEd25519PublicKeyAttributeName));
++  const cbor::Value* ecdsa_key = base::FindOrNull(
++      signature_attributes, cbor::Value(kEcdsaP256PublicKeyAttributeName));
++
++  if (ed25519_key && ecdsa_key) {
++    return base::unexpected("Multiple key types for one signature.");
++  } else if (ed25519_key && !ed25519_key->is_bytestring()) {
++    return base::unexpected("Invalid ED25519 key.");
++  } else if (ecdsa_key && !ecdsa_key->is_bytestring()) {
++    return base::unexpected("Invalid ECDSA key.");
++
++  } else if (ed25519_key && ed25519_key->is_bytestring()) {
++    ASSIGN_OR_RETURN(auto public_key,
++                     Ed25519PublicKey::Create(ed25519_key->GetBytestring()));
++    ASSIGN_OR_RETURN(auto signature, Ed25519Signature::Create(signature_bytes));
++    parsed_signature_info->signature_info = mojom::SignatureInfo::NewEd25519(
++        mojom::SignatureInfoEd25519::New(public_key, signature));
++
++  } else if (ecdsa_key && ecdsa_key->is_bytestring()) {
++    ASSIGN_OR_RETURN(auto public_key,
++                     EcdsaP256PublicKey::Create(ecdsa_key->GetBytestring()));
++    ASSIGN_OR_RETURN(auto signature,
++                     EcdsaP256SHA256Signature::Create(signature_bytes));
++    parsed_signature_info->signature_info =
++        mojom::SignatureInfo::NewEcdsaP256Sha256(
++            mojom::SignatureInfoEcdsaP256SHA256::New(public_key, signature));
++
++  } else {
++    parsed_signature_info->signature_info =
++        mojom::SignatureInfo::NewUnknown(mojom::SignatureInfoUnknown::New());
++  }
++
++  return parsed_signature_info;
++}
++
+ void IntegrityBlockParser::RunErrorCallback(
+-    std::string message,
++    const std::string& message,
+     mojom::BundleParseErrorType error_type) {
+   std::move(complete_callback_)
+-      .Run(base::BindOnce(std::move(result_callback_), nullptr,
+-                          mojom::BundleIntegrityBlockParseError::New(
+-                              error_type, std::move(message))));
++      .Run(base::BindOnce(
++          std::move(result_callback_), nullptr,
++          mojom::BundleIntegrityBlockParseError::New(error_type, message)));
+ }
+ 
+ }  // namespace web_package
+--- a/components/web_package/signed_web_bundles/integrity_block_parser.h
++++ b/components/web_package/signed_web_bundles/integrity_block_parser.h
+@@ -5,13 +5,8 @@
+ #ifndef COMPONENTS_WEB_PACKAGE_SIGNED_WEB_BUNDLES_INTEGRITY_BLOCK_PARSER_H_
+ #define COMPONENTS_WEB_PACKAGE_SIGNED_WEB_BUNDLES_INTEGRITY_BLOCK_PARSER_H_
+ 
+-#include <optional>
+-#include <string>
+-
+-#include "base/compiler_specific.h"
+-#include "base/memory/raw_ref.h"
+-#include "base/memory/weak_ptr.h"
+ #include "components/web_package/mojom/web_bundle_parser.mojom-forward.h"
++#include "components/web_package/signed_web_bundles/integrity_block_attributes.h"
+ #include "components/web_package/signed_web_bundles/types.h"
+ #include "components/web_package/web_bundle_parser.h"
+ 
+@@ -20,7 +15,7 @@ namespace web_package {
+ class IntegrityBlockParser : public WebBundleParser::WebBundleSectionParser {
+  public:
+   explicit IntegrityBlockParser(
+-      mojom::BundleDataSource& data_source LIFETIME_BOUND,
++      mojom::BundleDataSource& data_source,
+       WebBundleParser::ParseIntegrityBlockCallback callback);
+ 
+   IntegrityBlockParser(const IntegrityBlockParser&) = delete;
+@@ -35,7 +30,10 @@ class IntegrityBlockParser : public WebB
+  private:
+   void OnIntegrityBlockRead(const std::optional<BinaryData>& data);
+ 
+-  void RunErrorCallback(std::string message,
++  base::expected<mojom::BundleIntegrityBlockSignatureStackEntryPtr, std::string>
++  ParseSignatureInfo(const cbor::Value& attributes_map);
++
++  void RunErrorCallback(const std::string& message,
+                         mojom::BundleParseErrorType error_type =
+                             mojom::BundleParseErrorType::kFormatError);
+ 
+--- a/components/web_package/signed_web_bundles/rust/BUILD.gn
++++ b/components/web_package/signed_web_bundles/rust/BUILD.gn
+@@ -10,7 +10,6 @@ rust_static_library("signed_web_bundles_
+   sources = [
+     "constants.rs",
+     "integrity_block.rs",
+-    "signature_verifier.rs",
+     "types.rs",
+     crate_root,
+   ]
+--- a/components/web_package/signed_web_bundles/signed_web_bundle_signature_verifier.cc
++++ b/components/web_package/signed_web_bundles/signed_web_bundle_signature_verifier.cc
+@@ -20,14 +20,17 @@
+ #include "base/task/thread_pool.h"
+ #include "base/types/expected.h"
+ #include "base/types/expected_macros.h"
++#include "components/cbor/values.h"
++#include "components/cbor/writer.h"
++#include "components/web_package/signed_web_bundles/constants.h"
+ #include "components/web_package/signed_web_bundles/identity_validator.h"
+ #include "components/web_package/signed_web_bundles/integrity_block_parser.h"
+-#include "components/web_package/signed_web_bundles/rust/signed_web_bundles_rust.h"
+ #include "components/web_package/signed_web_bundles/signed_web_bundle_id.h"
+ #include "components/web_package/signed_web_bundles/signed_web_bundle_integrity_block.h"
+ #include "components/web_package/signed_web_bundles/signed_web_bundle_signature_stack.h"
+ #include "components/web_package/signed_web_bundles/signed_web_bundle_signature_stack_entry.h"
+ #include "components/web_package/signed_web_bundles/signed_web_bundle_utils.h"
++#include "crypto/hash.h"
+ #include "third_party/abseil-cpp/absl/functional/overload.h"
+ #include "third_party/boringssl/src/include/openssl/sha.h"
+ 
+@@ -37,10 +40,32 @@ namespace {
+ 
+ std::vector<uint8_t> CreateIntegrityBlockCbor(
+     const SignedWebBundleIntegrityBlock& integrity_block) {
+-  auto ib_cbor_rust =
+-      signed_web_bundles::rust::create_empty_integrity_block_cbor(
+-          integrity_block.attributes_cbor());
+-  return std::vector<uint8_t>(ib_cbor_rust.begin(), ib_cbor_rust.end());
++  // This function looks like it should use a cbor::Value::ArrayValue to build
++  // the outer array, but it can't: one of the elements is a pre-encoded CBOR
++  // value which we can't safely decode because it's untrusted input. This is
++  // obviously undesirable, because there's no guarantee at all that the
++  // pre-encoded value is actually valid CBOR.
++  //
++  // TODO(https://crbug.com/454485901): once there's a memory-safe CBOR parser,
++  // re-parse the pre-encoded value, then re-encode it here instead of
++  // constructing a CBOR array by hand so that we're guaranteed that the result
++  // of this function is valid.
++  std::vector<uint8_t> ib_cbor;
++
++  // 0x84 is the encoding byte for an array of length 4.
++  ib_cbor.push_back(0x84);
++  base::Extend(ib_cbor,
++               *cbor::Writer::Write(cbor::Value(kIntegrityBlockMagicBytes)));
++  base::Extend(ib_cbor, *cbor::Writer::Write(
++                            cbor::Value(kIntegrityBlockV2VersionBytes)));
++  // We cannot parse `attributes().cbor()` back to a cbor::Value as they
++  // technically represent untrusted input.
++  base::Extend(ib_cbor, integrity_block.attributes_cbor());
++  // Encode an empty signature array.
++  base::Extend(ib_cbor,
++               *cbor::Writer::Write(cbor::Value(cbor::Value::ArrayValue())));
++
++  return ib_cbor;
+ }
+ 
+ base::expected<void, SignedWebBundleSignatureVerifier::Error>
+@@ -104,7 +129,7 @@ SignedWebBundleSignatureVerifier::Calcul
+     return base::unexpected(base::File::ErrorToString(file.GetLastFileError()));
+   }
+ 
+-  signed_web_bundles::rust::Sha512Hasher hasher;
++  crypto::hash::Hasher hash(crypto::hash::kSha512);
+ 
+   // Calculate the hash of the Signed Web Bundle excluding its integrity block.
+   // The file might be too big to read it into memory all at once, which is why
+@@ -121,14 +146,15 @@ SignedWebBundleSignatureVerifier::Calcul
+           base::File::ErrorToString(file.GetLastFileError()));
+     }
+     data.resize(*bytes_read);
+-    hasher.update(data);
++    hash.Update(data);
+ 
+     if (!base::CheckAdd(offset, *bytes_read).AssignIfValid(&offset)) {
+       return base::unexpected("The Signed Web Bundle is too large.");
+     }
+   }
+ 
+-  SHA512Digest digest = std::move(hasher).finish();
++  SHA512Digest digest;
++  hash.Finish(digest);
+   return digest;
+ }
+ 
+--- a/components/web_package/signed_web_bundles/signed_web_bundle_utils.cc
++++ b/components/web_package/signed_web_bundles/signed_web_bundle_utils.cc
+@@ -5,18 +5,37 @@
+ #include "components/web_package/signed_web_bundles/signed_web_bundle_utils.h"
+ 
+ #include <cstdint>
+-#include <vector>
+ 
+-#include "components/web_package/signed_web_bundles/rust/signed_web_bundles_rust.h"
++#include "base/containers/extend.h"
++#include "base/containers/span.h"
++#include "base/containers/span_writer.h"
+ 
+ namespace web_package {
+ 
++namespace {
++
++void AddItemToPayload(std::vector<uint8_t>& payload,
++                      base::span<const uint8_t> item) {
++  // Each item that is part of the payload is prefixed with its length encoded
++  // as a 64 bit unsigned integer.
++  std::array<uint8_t, sizeof(uint64_t)> length;
++  auto writer = base::SpanWriter(base::span(length));
++  CHECK(writer.WriteU64BigEndian(item.size()));
++
++  base::Extend(payload, base::span(length));
++  base::Extend(payload, item);
++}
++
++}  // namespace
++
+ std::vector<uint8_t> CreateSignaturePayload(
+     const SignedWebBundleSignatureData& data) {
+-  auto payload_rust = signed_web_bundles::rust::create_signature_payload(
+-      data.unsigned_web_bundle_hash, data.integrity_block_cbor,
+-      data.attributes_cbor);
+-  return std::vector<uint8_t>(payload_rust.begin(), payload_rust.end());
++  std::vector<uint8_t> payload;
++  AddItemToPayload(payload, data.unsigned_web_bundle_hash);
++  AddItemToPayload(payload, data.integrity_block_cbor);
++  AddItemToPayload(payload, data.attributes_cbor);
++
++  return payload;
+ }
+ 
+ }  // namespace web_package
+--- a/third_party/blink/renderer/platform/BUILD.gn
++++ b/third_party/blink/renderer/platform/BUILD.gn
+@@ -186,6 +186,18 @@ group("make_platform_generated") {
+   ]
+ }
+ 
++rust_static_library("font_format_check") {
++  allow_unsafe = true  # Needed for FFI that underpins the `cxx` crate.
++  crate_root = "fonts/opentype/format_check.rs"
++  sources = [ crate_root ]
++  cxx_bindings = [ crate_root ]
++  deps = [
++    "//third_party/rust/font_types/v0_12:lib",
++    "//third_party/rust/read_fonts/v0_43:lib",
++    "//third_party/rust/skrifa/v0_46:lib",
++  ]
++}
++
+ rust_static_library("rustfft_ffi") {
+   allow_unsafe = true  # Needed for FFI that underpins the `cxx` crate.
+   crate_root = "audio/rustfft_ffi.rs"
+@@ -1792,7 +1804,6 @@ component("platform") {
+     ":allow_discouraged_type",
+     ":blink_platform_public_deps",
+     ":platform_export",
+-    "//build/rust/crubit",
+     "//gpu/command_buffer/client:raster_interface",
+     "//media/capture:capture_lib",
+     "//mojo/public/cpp/base",
+@@ -1819,8 +1830,8 @@ component("platform") {
+     "//ui/native_theme/features",
+   ]
+   deps = [
++    ":font_format_check",
+     ":rustfft_ffi",
+-    "fonts:font_format_bindings",
+     "//base:base_static",
+     "//base/allocator:buildflags",
+     "//build:chromecast_buildflags",
+--- a/third_party/blink/renderer/platform/fonts/BUILD.gn
++++ /dev/null
+@@ -1,19 +0,0 @@
+-# Copyright 2026 The Chromium Authors
+-# Use of this source code is governed by a BSD-style license that can be
+-# found in the LICENSE file.
+-
+-import("//build/rust/rust_static_library.gni")
+-
+-rust_static_library("font_format") {
+-  crate_root = "opentype/format_check.rs"
+-  sources = [ crate_root ]
+-  cpp_api_from_rust = {
+-    target_name = "font_format_bindings"
+-    cpp_namespace = "font_format"
+-  }
+-  deps = [
+-    "//third_party/rust/font_types/v0_12:lib",
+-    "//third_party/rust/read_fonts/v0_43:lib",
+-    "//third_party/rust/skrifa/v0_46:lib",
+-  ]
+-}
+--- a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
++++ b/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc
+@@ -7,6 +7,7 @@
+ #include "base/containers/span.h"
+ #include "base/containers/span_rust.h"
+ #include "base/numerics/byte_conversions.h"
++#include "third_party/blink/renderer/platform/fonts/opentype/format_check.rs.h"
+ #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
+ #include "third_party/blink/renderer/platform/wtf/vector.h"
+ #include "third_party/skia/include/core/SkTypeface.h"
+@@ -14,37 +15,35 @@
+ namespace blink {
+ 
+ FontFormatCheck::FontFormatCheck(sk_sp<SkData> sk_data)
+-    : format_info_(font_format::get_font_format_info(
++    : format_info_(font_format_check::get_font_format_info(
+           base::SpanToRustSlice(sk_data->byteSpan()))) {}
+ 
+-FontFormatCheck::~FontFormatCheck() = default;
+-
+ bool FontFormatCheck::IsVariableFont() const {
+-  return font_format::is_variable(format_info_);
++  return font_format_check::is_variable(*format_info_);
+ }
+ 
+ bool FontFormatCheck::IsCbdtCblcColorFont() const {
+-  return font_format::is_cbdt_cblc(format_info_);
++  return font_format_check::is_cbdt_cblc(*format_info_);
+ }
+ 
+ bool FontFormatCheck::IsEbdtEblcMonochromeFont() const {
+-  return font_format::is_ebdt_eblc(format_info_);
++  return font_format_check::is_ebdt_eblc(*format_info_);
+ }
+ 
+ bool FontFormatCheck::IsColrCpalColorFontV0() const {
+-  return font_format::is_colrv0(format_info_);
++  return font_format_check::is_colrv0(*format_info_);
+ }
+ 
+ bool FontFormatCheck::IsColrCpalColorFontV1() const {
+-  return font_format::is_colrv1(format_info_);
++  return font_format_check::is_colrv1(*format_info_);
+ }
+ 
+ bool FontFormatCheck::IsSbixColorFont() const {
+-  return font_format::is_sbix(format_info_);
++  return font_format_check::is_sbix(*format_info_);
+ }
+ 
+ bool FontFormatCheck::IsCff2OutlineFont() const {
+-  return font_format::is_cff2(format_info_);
++  return font_format_check::is_cff2(*format_info_);
+ }
+ 
+ bool FontFormatCheck::IsVariableColrV0Font() const {
+@@ -58,7 +57,7 @@ bool FontFormatCheck::IsColorFont() cons
+ 
+ bool FontFormatCheck::IsAvar2Font() const {
+   return RuntimeEnabledFeatures::FontFormatAvar2Enabled() &&
+-         font_format::is_avar2(format_info_);
++         font_format_check::is_avar2(*format_info_);
+ }
+ 
+ FontFormatCheck::VariableFontSubType FontFormatCheck::ProbeVariableFont(
+--- a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.h
++++ b/third_party/blink/renderer/platform/fonts/opentype/font_format_check.h
+@@ -5,7 +5,7 @@
+ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_OPENTYPE_FONT_FORMAT_CHECK_H_
+ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_OPENTYPE_FONT_FORMAT_CHECK_H_
+ 
+-#include "third_party/blink/renderer/platform/fonts/font_format.h"
++#include "third_party/blink/renderer/platform/fonts/opentype/format_check.rs.h"
+ #include "third_party/blink/renderer/platform/platform_export.h"
+ #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
+ #include "third_party/skia/include/core/SkData.h"
+@@ -19,7 +19,7 @@ class PLATFORM_EXPORT FontFormatCheck {
+ 
+  public:
+   explicit FontFormatCheck(sk_sp<SkData>);
+-  virtual ~FontFormatCheck();
++  virtual ~FontFormatCheck() = default;
+   virtual bool IsVariableFont() const;
+   virtual bool IsCbdtCblcColorFont() const;
+   virtual bool IsEbdtEblcMonochromeFont() const;
+@@ -46,7 +46,7 @@ class PLATFORM_EXPORT FontFormatCheck {
+   enum class COLRVersion { kCOLRV0, kCOLRV1, kNoCOLR };
+ 
+  private:
+-  font_format::FontFormatInfo format_info_;
++  rust::Box<font_format_check::FontFormatInfo> format_info_;
+ };
+ 
+ }  // namespace blink
+--- a/third_party/blink/renderer/platform/fonts/opentype/format_check.rs
++++ b/third_party/blink/renderer/platform/fonts/opentype/format_check.rs
+@@ -23,7 +23,7 @@ pub struct FontFormatInfo {
+     format_flags: Option<FontFormatFlags>,
+ }
+ 
+-pub fn get_font_format_info(font_bytes: &[u8]) -> FontFormatInfo {
++pub fn get_font_format_info(font_bytes: &[u8]) -> Box<FontFormatInfo> {
+     let file_ref = make_font_ref_internal(font_bytes, 0);
+ 
+     match file_ref {
+@@ -32,11 +32,11 @@ pub fn get_font_format_info(font_bytes:
+                 font.table_directory().table_records().iter().map(|e| e.tag()).collect();
+             let color_version = get_colr_version(&font);
+             let avar_version = get_avar_version(&font);
+-            FontFormatInfo {
++            Box::new(FontFormatInfo {
+                 format_flags: Some(FontFormatFlags { table_tags, color_version, avar_version }),
+-            }
++            })
+         }
+-        _ => FontFormatInfo::default(),
++        _ => Box::new(FontFormatInfo::default()),
+     }
+ }
+ 
+@@ -44,10 +44,10 @@ fn get_colr_version(font_ref: &FontRef)
+     Some(font_ref.colr().ok()?.version())
+ }
+ 
+-pub fn is_colrv1(format_info: &FontFormatInfo) -> bool {
++fn is_colrv1(format_info: &FontFormatInfo) -> bool {
+     matches!(&format_info.format_flags, Some(FontFormatFlags { color_version: Some(1), .. }),)
+ }
+-pub fn is_colrv0(format_info: &FontFormatInfo) -> bool {
++fn is_colrv0(format_info: &FontFormatInfo) -> bool {
+     matches!(&format_info.format_flags, Some(FontFormatFlags { color_version: Some(0), .. }),)
+ }
+ 
+@@ -56,7 +56,7 @@ fn get_avar_version(font_ref: &FontRef)
+     Some((version.major, version.minor))
+ }
+ 
+-pub fn is_avar2(format_info: &FontFormatInfo) -> bool {
++fn is_avar2(format_info: &FontFormatInfo) -> bool {
+     matches!(&format_info.format_flags, Some(FontFormatFlags { avar_version: Some((2, _)), .. }),)
+ }
+ 
+@@ -69,22 +69,39 @@ fn has_tags(format_info: &FontFormatInfo
+     }
+ }
+ 
+-pub fn is_variable(format_info: &FontFormatInfo) -> bool {
++fn is_variable(format_info: &FontFormatInfo) -> bool {
+     has_tags(format_info, &[Tag::new(b"fvar")])
+ }
+ 
+-pub fn is_sbix(format_info: &FontFormatInfo) -> bool {
++fn is_sbix(format_info: &FontFormatInfo) -> bool {
+     has_tags(format_info, &[Tag::new(b"sbix")])
+ }
+ 
+-pub fn is_cbdt_cblc(format_info: &FontFormatInfo) -> bool {
++fn is_cbdt_cblc(format_info: &FontFormatInfo) -> bool {
+     has_tags(format_info, &[Tag::new(b"CBDT"), Tag::new(b"CBLC")])
+ }
+ 
+-pub fn is_ebdt_eblc(format_info: &FontFormatInfo) -> bool {
++fn is_ebdt_eblc(format_info: &FontFormatInfo) -> bool {
+     has_tags(format_info, &[Tag::new(b"EBDT"), Tag::new(b"EBLC")])
+ }
+ 
+-pub fn is_cff2(format_info: &FontFormatInfo) -> bool {
++fn is_cff2(format_info: &FontFormatInfo) -> bool {
+     has_tags(format_info, &[Tag::new(b"CFF2")])
+ }
++
++#[cxx::bridge(namespace = "font_format_check")]
++pub mod ffi {
++    extern "Rust" {
++        type FontFormatInfo;
++
++        fn get_font_format_info(font_bytes: &[u8]) -> Box<FontFormatInfo>;
++        fn is_colrv1(format_info: &FontFormatInfo) -> bool;
++        fn is_colrv0(format_info: &FontFormatInfo) -> bool;
++        fn is_cbdt_cblc(format_info: &FontFormatInfo) -> bool;
++        fn is_ebdt_eblc(format_info: &FontFormatInfo) -> bool;
++        fn is_variable(format_info: &FontFormatInfo) -> bool;
++        fn is_sbix(format_info: &FontFormatInfo) -> bool;
++        fn is_cff2(format_info: &FontFormatInfo) -> bool;
++        fn is_avar2(format_info: &FontFormatInfo) -> bool;
++    }
++}
Risk 0/5 · Safe chromium-154-fix-gn-no-public_inputs.patch
Result #4731

Comment

This patch removes several GN `public_inputs` declarations from DevTools/TypeScript build templates. That changes dependency visibility for `.ts`/`.d.ts`/entrypoint files, but it does not introduce new code execution, network access, privilege escalation, or packaging-time side effects. The change appears to be a build-graph fix for Chromium 154/gn behavior rather than a supply-chain or persistence risk. I did not find any suspicious sources, scripts, or installed artifacts in this diff.

@@ -0,0 +1,135 @@
+--- a/third_party/devtools-frontend/src/scripts/build/ninja/copy.gni
++++ b/third_party/devtools-frontend/src/scripts/build/ninja/copy.gni
+@@ -25,9 +25,6 @@ template("copy_to_gen") {
+       string_join(",", sources),
+     ]
+ 
+-    # Expose ts files to dependent targets.
+-    public_inputs = filter_include(sources, [ "*.ts" ])
+-
+     outputs = []
+     foreach(_input, sources) {
+       outputs += [ "$target_gen_dir/$_input" ]
+--- a/third_party/devtools-frontend/src/scripts/build/ninja/devtools_entrypoint.gni
++++ b/third_party/devtools-frontend/src/scripts/build/ninja/devtools_entrypoint.gni
+@@ -215,9 +215,6 @@ template("legacy_devtools_entrypoint") {
+   node_action(target_name) {
+     script = "scripts/build/ninja/generate-tsconfig.js"
+ 
+-    # Expose ts files to dependent targets.
+-    public_inputs = [ invoker.entrypoint ]
+-
+     args = [
+              rebase_path(_generated_tsconfig_location, root_build_dir),
+              rebase_path(invoker.entrypoint, root_build_dir),
+@@ -242,7 +239,6 @@ template("legacy_devtools_entrypoint") {
+ 
+   _sources_target = "${target_name}_sources"
+   group(_sources_target) {
+-    public_inputs = [ invoker.entrypoint ]
+     if (defined(invoker.testonly)) {
+       testonly = invoker.testonly
+     }
+--- a/third_party/devtools-frontend/src/scripts/build/ninja/devtools_entrypoint_split.gni
++++ b/third_party/devtools-frontend/src/scripts/build/ninja/devtools_entrypoint_split.gni
+@@ -51,7 +51,6 @@ template("devtools_entrypoint_split") {
+     # consuming this entrypoint.
+     _sources_target = "${target_name}_sources"
+     group(_sources_target) {
+-      public_inputs = [ invoker.entrypoint ]
+       forward_variables_from(invoker, [ "testonly" ])
+       if (defined(invoker.visibility)) {
+         visibility = [ ":*" ] + invoker.visibility
+--- a/third_party/devtools-frontend/src/scripts/build/ninja/devtools_pre_built.gni
++++ b/third_party/devtools-frontend/src/scripts/build/ninja/devtools_pre_built.gni
+@@ -114,18 +114,8 @@ template("devtools_pre_built") {
+     }
+   }
+ 
+-  # Expose ${target_name}_sources group so ts_deps in devtools_entrypoint_split
+-  # can resolve source dependencies for bundling.
+-  _sources = []
+-  if (!invoker.sources_are_release) {
+-    _sources = invoker.sources
+-  }
+ 
+   group("${target_name}_sources") {
+-    public_inputs = _sources
+-    if (defined(invoker.inputs)) {
+-      public_inputs += invoker.inputs
+-    }
+     public_deps = [ ":$_gen_target_name" ]
+     if (defined(invoker.public_deps)) {
+       public_deps += invoker.public_deps
+--- a/third_party/devtools-frontend/src/scripts/build/typescript/ts_library_split.gni
++++ b/third_party/devtools-frontend/src/scripts/build/typescript/ts_library_split.gni
+@@ -199,20 +199,6 @@ template("ts_library_split") {
+   }
+   _compiler_options.lib = _es_libs + default_ts_base_libs
+ 
+-  _handwritten_dts = filter_include(invoker.sources,
+-                                    [
+-                                      "*.d.ts",
+-                                      "*.d.mts",
+-                                      "*.d.cts",
+-                                    ])
+-  if (defined(invoker.additional_type_definitions)) {
+-    _handwritten_dts += filter_include(invoker.additional_type_definitions,
+-                                       [
+-                                         "*.d.ts",
+-                                         "*.d.mts",
+-                                         "*.d.cts",
+-                                       ])
+-  }
+ 
+   # Compute output file paths (tsc does not emit for .d.ts inputs)
+   _dts_outputs = []
+@@ -257,8 +243,6 @@ template("ts_library_split") {
+ 
+     outputs = _dts_outputs
+ 
+-    # Expose handwritten .d.ts files to dependent targets if any.
+-    public_inputs = filter_include(_all_sources, [ "*.d.ts" ])
+ 
+     response_file_contents =
+         rebase_path(_dts_outputs, root_build_dir) + [ "--" ] + [
+@@ -313,10 +297,6 @@ template("ts_library_split") {
+     if (defined(invoker.testonly)) {
+       testonly = invoker.testonly
+     }
+-    public_inputs = filter_include(_all_sources, [ "*.ts" ])
+-    if (defined(invoker.inputs)) {
+-      public_inputs += invoker.inputs
+-    }
+     public_deps = _non_ts_deps
+     if (defined(invoker.visibility)) {
+       visibility = [ ":*" ] + invoker.visibility
+@@ -396,8 +376,6 @@ template("ts_library_split") {
+                     ":$_dts_target",
+                     ":$_tsconfig_ref_target",
+                   ] + _ts_deps
+-    public_inputs = filter_include(_dts_outputs, [ "*.d.ts" ]) +
+-                    _handwritten_dts + [ _tsconfig_ref_file ]
+     if (defined(invoker.public_deps)) {
+       public_deps += invoker.public_deps
+     }
+--- a/third_party/devtools-frontend/src/scripts/build/typescript/typescript.gni
++++ b/third_party/devtools-frontend/src/scripts/build/typescript/typescript.gni
+@@ -204,17 +204,6 @@ template("legacy_ts_library") {
+     ]
+ 
+     if (defined(sources)) {
+-      # Expose ts files to dependent targets.
+-      public_inputs =
+-          filter_include(sources,
+-                         [
+-                           "*.ts",
+-
+-                           # TODO: Migrate the files below to TypeScript
+-                           # and remove them from this list.
+-                           "*ahem.js",
+-                         ])
+-
+       args += [ "--sources" ] + rebase_path(sources, root_build_dir)
+ 
+       foreach(src, sources) {
Risk 0/5 · Safe chromium-154-remove-private_verification_tokens.patch
Result #4732

Comment

This patch removes Chromium’s private_verification_tokens feature wiring from the build and browser integration points. The diff is limited to GN dependency removals and deletion of code paths that would have registered the component, attached URL loader throttles, and handled browsing-data deletion for that feature. I do not see any added execution paths, downloads, privilege changes, or persistence mechanisms. The main effect is disabling functionality rather than introducing a security risk. One caveat is that the patch also removes the component updater registration, so if upstream still expects this feature to be present, behavior changes could be functional, but not a security concern in this diff.

@@ -0,0 +1,295 @@
+--- a/chrome/browser/BUILD.gn
++++ b/chrome/browser/BUILD.gn
+@@ -1022,7 +1022,6 @@ source_set("core") {
+     "//chrome/browser/preloading/search_preload:feature",
+     "//chrome/browser/privacy_sandbox:headers",
+     "//chrome/browser/private_ai",
+-    "//chrome/browser/private_verification_tokens",
+     "//chrome/browser/profiles:misc",
+     "//chrome/browser/profiles:profile_io_data",
+     "//chrome/browser/profiles:profiles_extra_parts",
+@@ -2215,7 +2214,6 @@ source_set("browser") {
+     "//chrome/browser/preloading/search_preload",
+     "//chrome/browser/privacy",
+     "//chrome/browser/privacy_sandbox:impl",
+-    "//chrome/browser/private_verification_tokens",
+     "//chrome/browser/profiles:misc",
+     "//chrome/browser/profiles:profile_util_impl",
+     "//chrome/browser/profiles:profiles_extra_parts_impl",
+--- a/chrome/browser/browsing_data/BUILD.gn
++++ b/chrome/browser/browsing_data/BUILD.gn
+@@ -125,7 +125,6 @@ source_set("impl") {
+     "//chrome/browser/preloading/prefetch/no_state_prefetch",
+     "//chrome/browser/preloading/prefetch/search_prefetch",
+     "//chrome/browser/privacy_sandbox:headers",
+-    "//chrome/browser/private_verification_tokens",
+     "//chrome/browser/profiles/keep_alive",
+     "//chrome/browser/reading_list",
+     "//chrome/browser/safe_browsing",
+@@ -267,7 +266,6 @@ source_set("unit_tests") {
+     "//chrome/browser/payments/browser_binding:browser_bound_key_deleter",
+     "//chrome/browser/payments/browser_binding:test_support",
+     "//chrome/browser/permissions",
+-    "//chrome/browser/private_verification_tokens",
+     "//chrome/browser/reading_list",
+     "//chrome/browser/safe_browsing:verdict_cache_manager_factory",
+     "//chrome/browser/segmentation_platform",
+@@ -295,7 +293,6 @@ source_set("unit_tests") {
+     "//components/privacy_sandbox:privacy_sandbox_settings_headers",
+     "//components/privacy_sandbox/privacy_sandbox_attestations",
+     "//components/privacy_sandbox/privacy_sandbox_attestations:test_support",
+-    "//components/private_verification_tokens/common:private_verification_tokens_database",
+     "//components/reading_list/core:test_support",
+     "//components/safe_browsing/core/browser:verdict_cache_manager",
+     "//components/site_engagement/content",
+--- a/chrome/browser/browsing_data/chrome_browsing_data_model_delegate.cc
++++ b/chrome/browser/browsing_data/chrome_browsing_data_model_delegate.cc
+@@ -127,15 +127,6 @@ void ChromeBrowsingDataModelDelegate::Ge
+ 
+   GetAllMediaDeviceSaltDataKeys(concurrent.CreateCallback(), {});
+ 
+-  if (base::FeatureList::IsEnabled(
+-          net::features::kEnablePrivateVerificationTokens)) {
+-    if (auto* pvt_service =
+-            PrivateVerificationTokensServiceFactory::GetForProfile(profile_)) {
+-      pvt_service->GetTokenIssuers(
+-          base::BindOnce(&PrivateVerificationTokenBrowsingDataToDelegateEntries)
+-              .Then(concurrent.CreateCallback()));
+-    }
+-  }
+ 
+   // TODO(crbug.com/40205603): Implement data retrieval for remaining data
+   // types.
+@@ -180,20 +171,6 @@ void ChromeBrowsingDataModelDelegate::Re
+   }
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+-  if (base::FeatureList::IsEnabled(
+-          net::features::kEnablePrivateVerificationTokens) &&
+-      storage_types.Has(static_cast<BrowsingDataModel::StorageType>(
+-          StorageType::kPrivateVerificationTokens))) {
+-    if (const url::Origin* origin = std::get_if<url::Origin>(&data_key)) {
+-      if (auto* pvt_service =
+-              PrivateVerificationTokensServiceFactory::GetForProfile(
+-                  profile_)) {
+-        pvt_service->DeleteTokens(base::Time(), base::Time::Max(),
+-                                  concurrent.CreateClosure(),
+-                                  std::vector<url::Origin>{*origin});
+-      }
+-    }
+-  }
+ 
+   std::move(concurrent).Done(std::move(callback));
+ }
+--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
++++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
+@@ -720,29 +720,6 @@ void ChromeBrowsingDataRemoverDelegate::
+ #endif  // BUILDFLAG(IS_CHROMEOS)
+   }
+ 
+-  //////////////////////////////////////////////////////////////////////////////
+-  // DATA_TYPE_PRIVATE_VERIFICATION_TOKENS
+-  if (remove_mask & constants::DATA_TYPE_PRIVATE_VERIFICATION_TOKENS) {
+-    if (base::FeatureList::IsEnabled(
+-            net::features::kEnablePrivateVerificationTokens)) {
+-      if (auto* pvt_service =
+-              PrivateVerificationTokensServiceFactory::GetForProfile(
+-                  profile_)) {
+-        auto done_closure = CreateTaskCompletionClosure(
+-            TracingDataType::kPrivateVerificationTokens);
+-
+-        if (filter_builder->MatchesAllOriginsAndDomains()) {
+-          pvt_service->DeleteTokens(delete_begin_, delete_end_,
+-                                    std::move(done_closure),
+-                                    /*issuers=*/std::nullopt);
+-        } else {
+-          pvt_service->DeleteTokensByFilter(
+-              delete_begin_, delete_end_,
+-              filter_builder->BuildStorageKeyFilter(), std::move(done_closure));
+-        }
+-      }
+-    }
+-  }
+ 
+   //////////////////////////////////////////////////////////////////////////////
+   // DATA_TYPE_CONTENT_SETTINGS
+--- a/chrome/browser/chrome_content_browser_client.cc
++++ b/chrome/browser/chrome_content_browser_client.cc
+@@ -6009,21 +6009,6 @@ ChromeContentBrowserClient::CreateURLLoa
+     result.push_back(std::move(signin_throttle));
+   }
+ 
+-  if (base::FeatureList::IsEnabled(
+-          net::features::kEnablePrivateVerificationTokens) &&
+-      request.is_outermost_main_frame) {
+-    if (auto* pvt_service =
+-            PrivateVerificationTokensServiceFactory::GetForProfile(profile)) {
+-      auto url_loader_factory = profile->GetDefaultStoragePartition()
+-                                    ->GetURLLoaderFactoryForBrowserProcess();
+-      if (auto pvt_throttle =
+-              PrivateVerificationTokensURLLoaderThrottle::Create(
+-                  pvt_service, profile->IsOffTheRecord(),
+-                  std::move(url_loader_factory))) {
+-        result.push_back(std::move(pvt_throttle));
+-      }
+-    }
+-  }
+ 
+   if (auto contextual_tasks_throttle =
+           contextual_tasks::ContextualTasksURLLoaderThrottle::MaybeCreate(
+--- a/chrome/browser/component_updater/BUILD.gn
++++ b/chrome/browser/component_updater/BUILD.gn
+@@ -147,7 +147,6 @@ source_set("impl") {
+     "//chrome/browser/net",
+     "//chrome/browser/page_load_metrics",
+     "//chrome/browser/permissions",
+-    "//chrome/browser/private_verification_tokens",
+     "//chrome/browser/profiles:profile",
+     "//chrome/browser/update_client",
+     "//chrome/common",
+@@ -163,7 +162,6 @@ source_set("impl") {
+     "//components/permissions",
+     "//components/privacy_sandbox:features",
+     "//components/privacy_sandbox/privacy_sandbox_attestations",
+-    "//components/private_verification_tokens/common:private_verification_tokens_issuer_config",
+     "//components/safe_browsing/core/common:features",
+     "//components/search",
+     "//components/security_interstitials/content:security_interstitial_page",
+--- a/chrome/browser/component_updater/private_verification_tokens_installer.cc
++++ b/chrome/browser/component_updater/private_verification_tokens_installer.cc
+@@ -25,32 +25,6 @@ namespace component_updater {
+ 
+ void RegisterPrivateVerificationTokensComponentIfEnabled(
+     ComponentUpdateService* cus) {
+-  if (!base::FeatureList::IsEnabled(
+-          net::features::kEnablePrivateVerificationTokens)) {
+-    return;
+-  }
+-
+-  auto installer = base::MakeRefCounted<ComponentInstaller>(
+-      std::make_unique<PrivateVerificationTokensInstallerPolicy>(
+-          base::BindRepeating(
+-              [](scoped_refptr<private_verification_tokens::
+-                                   PrivateVerificationTokensIssuerConfig>
+-                     issuer_config) {
+-                PrivateVerificationTokensServiceFactory::SetGlobalIssuerConfig(
+-                    issuer_config);
+-                if (g_browser_process && g_browser_process->profile_manager()) {
+-                  for (Profile* profile : g_browser_process->profile_manager()
+-                                              ->GetLoadedProfiles()) {
+-                    if (PrivateVerificationTokensService* service =
+-                            PrivateVerificationTokensServiceFactory::
+-                                GetForProfileIfExists(profile)) {
+-                      service->SetIssuerConfig(issuer_config);
+-                    }
+-                  }
+-                }
+-              })));
+-
+-  installer->Register(cus, base::OnceClosure());
+ }
+ 
+ }  // namespace component_updater
+--- a/chrome/browser/private_verification_tokens/BUILD.gn
++++ b/chrome/browser/private_verification_tokens/BUILD.gn
+@@ -26,11 +26,6 @@ static_library("private_verification_tok
+     "//chrome/browser/profiles:profile",
+     "//components/content_settings/core/browser",
+     "//components/keyed_service/core",
+-    "//components/private_verification_tokens/common:privacy_pass_athm_batch_request",
+-    "//components/private_verification_tokens/common:private_verification_tokens_fetcher",
+-    "//components/private_verification_tokens/common:private_verification_tokens_issuer_config",
+-    "//components/private_verification_tokens/common:private_verification_tokens_parameters",
+-    "//components/private_verification_tokens/common:private_verification_tokens_store",
+     "//content/public/browser",
+     "//net",
+     "//services/network/public/cpp",
+@@ -49,9 +44,6 @@ source_set("browser_tests") {
+     "//chrome/browser/content_settings:content_settings_factory",
+     "//chrome/test:test_support",
+     "//components/content_settings/core/common",
+-    "//components/private_verification_tokens/common:athm_test_issuer",
+-    "//components/private_verification_tokens/common:private_verification_tokens_database",
+-    "//components/private_verification_tokens/common:private_verification_tokens_issuer_config",
+     "//net:test_support",
+     "//services/network:test_support",
+     "//url",
+@@ -72,11 +64,6 @@ source_set("unit_tests") {
+     "//chrome/test:test_support",
+     "//components/content_settings/core/browser",
+     "//components/content_settings/core/common",
+-    "//components/private_verification_tokens/common:athm_test_issuer",
+-    "//components/private_verification_tokens/common:private_verification_tokens_database",
+-    "//components/private_verification_tokens/common:private_verification_tokens_issuer_config",
+-    "//components/private_verification_tokens/common:private_verification_tokens_parameters",
+-    "//components/private_verification_tokens/common:test_support",
+     "//content/test:test_support",
+     "//net",
+     "//services/network:test_support",
+--- a/chrome/browser/profiles/BUILD.gn
++++ b/chrome/browser/profiles/BUILD.gn
+@@ -809,7 +809,6 @@ source_set("profiles_extra_parts_impl")
+     "//chrome/browser/privacy_sandbox:headers",
+     "//chrome/browser/private_ai",
+     "//chrome/browser/private_insights",
+-    "//chrome/browser/private_verification_tokens",
+     "//chrome/browser/push_messaging",
+     "//chrome/browser/reading_list",
+     "//chrome/browser/reduce_accept_language",
+--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
++++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
+@@ -1371,7 +1371,6 @@ void ChromeBrowserMainExtraPartsProfiles
+   PrivacyMetricsServiceFactory::GetInstance();
+   PrivacySandboxServiceFactory::GetInstance();
+   PrivacySandboxSettingsFactory::GetInstance();
+-  PrivateVerificationTokensServiceFactory::GetInstance();
+   private_ai::PrivateAiServiceFactory::GetInstance();
+   ProfileNetworkContextServiceFactory::GetInstance();
+   ProfilePasswordStoreFactory::GetInstance();
+--- a/chrome/test/BUILD.gn
++++ b/chrome/test/BUILD.gn
+@@ -2137,7 +2137,6 @@ if (!is_android) {
+       "//chrome/browser/privacy_sandbox:headers",
+       "//chrome/browser/privacy_sandbox:test_support",
+       "//chrome/browser/private_ai",
+-      "//chrome/browser/private_verification_tokens:browser_tests",
+       "//chrome/browser/profile_resetter",
+       "//chrome/browser/profile_resetter:browser_tests",
+       "//chrome/browser/profiles",
+@@ -5401,7 +5400,6 @@ test("unit_tests") {
+     "//chrome/browser/preloading/prerender:unit_tests",
+     "//chrome/browser/privacy_sandbox:unit_tests",
+     "//chrome/browser/private_ai:unit_tests",
+-    "//chrome/browser/private_verification_tokens:unit_tests",
+     "//chrome/browser/profiles",
+     "//chrome/browser/profiles:misc",
+     "//chrome/browser/profiles:profile_downloader",
+--- a/components/BUILD.gn
++++ b/components/BUILD.gn
+@@ -314,7 +314,6 @@ test("components_unittests") {
+     "//components/power_metrics:unit_tests",
+     "//components/prefs:unit_tests",
+     "//components/privacy_sandbox:unit_tests",
+-    "//components/private_verification_tokens:unit_tests",
+     "//components/profile_metrics:unit_tests",
+     "//components/proto_extras:unit_tests",
+     "//components/proxy_config:unit_tests",
+--- a/components/component_updater/installer_policies/BUILD.gn
++++ b/components/component_updater/installer_policies/BUILD.gn
+@@ -38,7 +38,6 @@ static_library("installer_policies_no_co
+     "//components/lookalikes/core:proto",
+     "//components/lookalikes/core:safety_tips",
+     "//components/prefs",
+-    "//components/private_verification_tokens/common:private_verification_tokens_issuer_config",
+     "//components/update_client",
+     "//mojo/public/cpp/base:protobuf_support",
+     "//services/network/public/cpp",
+@@ -106,8 +105,6 @@ source_set("unit_tests") {
+     "//components/history_embeddings/core",
+     "//components/optimization_guide/core",
+     "//components/optimization_guide/proto:optimization_guide_proto",
+-    "//components/private_verification_tokens/common:private_verification_tokens_issuer_config",
+-    "//components/private_verification_tokens/common:test_support",
+     "//mojo/public/cpp/base:protobuf_support",
+     "//services/network/public/cpp",
+     "//testing/gmock",
Risk 4/5 · High chromium-154-typescript.patch
Result #4733

Comment

This patch is suspicious and high risk. It changes Chromium’s build to use the system-installed `/usr/bin/tsc` instead of the vendored TypeScript compiler, which breaks source integrity and reproducibility by introducing an undeclared host dependency into the build. More importantly, it disables `use_typescript_go`, forcing the build away from the native TypeScript compiler path and back to the JS-based compiler path; that is a build-behavior change with potential security and supply-chain implications because it increases reliance on the host environment and bypasses the package’s pinned toolchain. The added unconditional `return "/usr/bin/tsc"` in `typescript.py` is also dead-code-like and suggests a blunt override rather than a controlled, platform-specific change. I do not see direct code execution or persistence, but this is a meaningful integrity regression in a core build component.

@@ -0,0 +1,32 @@
+--- a/third_party/devtools-frontend/src/scripts/build/typescript/typescript_vars.gni
++++ b/third_party/devtools-frontend/src/scripts/build/typescript/typescript_vars.gni
+@@ -6,7 +6,7 @@ import("//build/toolchain/rbe.gni")
+ import("../ninja/vars.gni")
+ 
+ if (host_os == "linux") {
+-  tsc_binary = "//third_party/typescript/linux-amd64/src/lib/tsc"
++  tsc_binary = "/usr/bin/tsc"
+ } else if (host_os == "win") {
+   tsc_binary = "//third_party/typescript/windows-amd64/src/lib/tsc.exe"
+ } else if (host_os == "mac") {
+--- a/third_party/devtools-frontend/src/third_party/typescript/typescript.py
++++ b/third_party/devtools-frontend/src/third_party/typescript/typescript.py
+@@ -10,6 +10,7 @@ import os
+ 
+ 
+ def GetBinaryPath():
++    return "/usr/bin/tsc"
+     if platform.machine() == 'arm64':
+         darwin_path = 'mac-arm64'
+     else:
+--- a/ui/webui/webui_features.gni
++++ b/ui/webui/webui_features.gni
+@@ -33,7 +33,7 @@ declare_args() {
+ 
+   # Enable the native TypeScript compiler (tsgo) instead of the JS-based one.
+   # TODO(crbug.com/423789047): Remove this flag once fully committed to v7.
+-  use_typescript_go = true
++  use_typescript_go = false
+ }
+ 
+ if (enable_cast_receiver || is_cast_android || is_castos) {
Risk 0/5 · Safe chromium-154-use-system-esbuild.patch
Result #4734

Comment

The patch only redirects Chromium DevTools build-time references from the vendored esbuild binary to the system-installed /usr/bin/esbuild, and makes a minor TypeScript type annotation explicit. There are no added network fetches, privilege changes, persistence mechanisms, or packaging-time writes outside $pkgdir. The main effect is a build dependency change, which is expected for an Arch package using system libraries/tools. No security red flags are evident in the diff itself.

@@ -0,0 +1,48 @@
+--- a/third_party/devtools-frontend/src/front_end/core/host/DispatchHttpRequestClient.ts
++++ b/third_party/devtools-frontend/src/front_end/core/host/DispatchHttpRequestClient.ts
+@@ -14,7 +14,7 @@ export enum ErrorType {
+ }
+ 
+ export class DispatchHttpRequestError extends Error {
+-  constructor(readonly type: ErrorType, readonly response?: DispatchHttpRequestResult, options?: ErrorOptions) {
++  constructor(readonly type: ErrorType, readonly response?: DispatchHttpRequestResult | undefined, options?: ErrorOptions) {
+     super(undefined, options);
+   }
+ }
+--- a/third_party/devtools-frontend/src/scripts/build/esbuild.js
++++ b/third_party/devtools-frontend/src/scripts/build/esbuild.js
+@@ -19,9 +19,9 @@ process.env.GODEBUG = 'asyncpreemptoff=1
+ // esbuild module uses binary in this path.
+ const binaryName = os.type() === 'Windows_NT' ? 'esbuild.exe' : 'esbuild';
+ process.env.ESBUILD_BINARY_PATH = path.join(
+-    devtoolsRootPath(),
+-    'third_party',
+-    'esbuild',
++    '/',
++    'usr',
++    'bin',
+     binaryName,
+ );
+ // This needs to be after the ESBUILD_BINARY_PATH is set
+--- a/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni
++++ b/third_party/devtools-frontend/src/scripts/build/ninja/bundle.gni
+@@ -35,7 +35,7 @@ template("bundle") {
+       devtools_location_prepend + "scripts/devtools_paths.js",
+     ]
+ 
+-    _esbuild = devtools_location_prepend + "third_party/esbuild/esbuild"
++    _esbuild = "/usr/bin/esbuild"
+     if (host_os == "win") {
+       inputs += [ _esbuild + ".exe" ]
+     } else {
+--- a/third_party/devtools-frontend/src/scripts/build/typescript/typescript.gni
++++ b/third_party/devtools-frontend/src/scripts/build/typescript/typescript.gni
+@@ -190,7 +190,7 @@ template("legacy_ts_library") {
+ 
+     if (devtools_skip_typecheck) {
+       args += [ "--use-esbuild" ]
+-      _esbuild = devtools_location_prepend + "third_party/esbuild/esbuild"
++      _esbuild = "/usr/bin/esbuild"
+       if (host_os == "win") {
+         inputs += [ _esbuild + ".exe" ]
+       } else {