Skip to content

Commit

Permalink
Merge pull request #456 from GoogleChromeLabs/develop
Browse files Browse the repository at this point in the history
v0.5.0
  • Loading branch information
mohdsayed authored Feb 7, 2024
2 parents 0a5bf90 + bdfb3a1 commit 8d44846
Show file tree
Hide file tree
Showing 263 changed files with 14,077 additions and 4,927 deletions.
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,54 @@
- Feature: Provide switch to turn PSAT's debugging capabilities on and off https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/429
- Chore: Update cookie database https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/430
- Chore: Update related website sets data https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/431

# v0.5.0

## Extension
- Feature: Uniform filtering developer experience across frames https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/414
- Feature: Add the capability of setting "allow list" content policy https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/376
- Feature: Detect use of Google Sign In (GSI) libraries https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/425
- Feature: Optimise cookie updating iterations to reduce the cookie loading time https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/436
- Feat: Export cookie table data from the extension https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/457
- Fix the method of fetching value for JS cookies https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/364
- Fix: Update minor UI elements https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/367
- Enhancement: Add 3PCD content to PS landing page https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/475
- Feature: Update report downloader function to download sitemap report https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/368
- Chore: Add missing docs and todos https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/413
- Feature: Copy paste using keyboard https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/365
- Enhancement: Add `Partition Key` filter to extension https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/442
- Enhancement: Make UI/UX changes to `Blocked Reasons` filter. https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/399
- Chore: Add unit test for findAnalyticsMatch https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/438
- Enhancement: Format columns width with `widthWeightagePercentage` https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/401
- Fix miscellaneous allow list QA issues https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/460
- Feature: Implement `All` filter value for `Blocked Reasons` filter https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/447
- Feature: Add `Expand/Collapse All` button inside filters sidebar https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/446
- Fix: Refresh page on context invalidate https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/465
- Remove topics list feature https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/463
- Feature: Make CLI dashboard filters dynamic https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/455
- Enhancement: Addition of `Quick Links` on landing pages https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/468
- Fix: Errors appearing on extension page https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/472
- HotFix: Persist data using global variable https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/476
- Fix: Library detection section occasional infinite loading https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/478
- Fix: Zero cookie issue when window is reopened https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/479
- Feature: Differentiate between cookies blocked in request or response https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/474
- Feature: Create "Facilitated Testing" landing page https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/480

## CLI
- Enhancement: CLI decoupling - Save analysis results in a directory https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/407
- Fix: CLI dashboard not showing data https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/445
- Feature: Add blocked reasons to CLI output data https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/435
- Fix: Column order in output CSV files https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/443
- Fix: Typos in CLI messages https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/449
- Update miscellaneous UI elements https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/466
- Style Fix: Rearrange and rename components in CLI dashboard https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/469


## Others
- Quickly Launch Different Chrome for Privacy Sandbox Demo https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/211
- Enhancement: Add additional documentation with Chrome launcher commands https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/416
- Correct the URL in the [[install.sh](http://install.sh/)](http://install.sh/) for the launcher script https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/470
- Update: Change cookie database URL https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/415
- Update d.c.c. links https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/417
- Merge `main` into `develop` https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/451
- Update flags and profile color in Chrome launcher https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/467
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Privacy Sandbox

[Privacy Sandbox](https://privacysandbox.com/) is a multi-year [initiative by Google](https://developer.chrome.com/docs/privacy-sandbox/) for building a more private web by defining a set of building blocks (i.e. proposed APIs) enabling [a new privacy model for the web](https://github.com/michaelkleber/privacy-model). Privacy Sandbox encompasses replacing functionality powered by third-party cookies with privacy-preserving alternatives, deprecating third-party cookies, and ensuring developers have a well-lit path to the new capabilities of the platform, and avoid pursuing tracking via other means.
[Privacy Sandbox](https://privacysandbox.com/) is a multi-year [initiative by Google](https://developers.google.com/privacy-sandbox) for building a more private web by defining a set of building blocks (i.e. proposed APIs) enabling [a new privacy model for the web](https://github.com/michaelkleber/privacy-model). Privacy Sandbox encompasses replacing functionality powered by third-party cookies with privacy-preserving alternatives, deprecating third-party cookies, and ensuring developers have a well-lit path to the new capabilities of the platform, and avoid pursuing tracking via other means.

This repository is home to the Privacy Sandbox Analysis DevTools extension (PSAT), which is a tool aimed at assisting developers in preparing their websites for the changes that are happening in Chrome in the context of Privacy Sandbox, and ensuring a seamless transition to a more private web.

Expand Down
15 changes: 15 additions & 0 deletions bin/chrome-3pcd-ps.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:: Chrome 3pcd with PS Extension

:: Download PS Extension
set "ps_analysis_tool_version=v0.5.0"
cd /d %TEMP%
if not exist %TEMP%\ps-analysis-tool-%ps_analysis_tool_version% (
mkdir %TEMP%\ps-analysis-tool-%ps_analysis_tool_version%
curl -L -O -s https://github.com/GoogleChromeLabs/ps-analysis-tool/releases/download/%ps_analysis_tool_version%/extension-%ps_analysis_tool_version%.zip
tar -xf extension-%ps_analysis_tool_version%.zip -C %TEMP%\ps-analysis-tool-%ps_analysis_tool_version%
)

set "CHROME_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe"
set "DATA_DIR=%TEMP%\chrome_data_dir-%RANDOM%"
"%CHROME_PATH%" --disable-sync --no-default-browser-check --no-first-run --user-data-dir="%DATA_DIR%" --install-autogenerated-theme="255,51,51" --silent-debugger-extension-api --test-third-party-cookie-phaseout --enable-features="FirstPartySets,StorageAccessAPI,StorageAccessAPIForOriginExtension,PageInfoCookiesSubpage,PrivacySandboxFirstPartySetsUI" --load-extension="%TEMP%\ps-analysis-tool-%ps_analysis_tool_version%\extension" https://example.com >nul 2>&1
rmdir /s /q "%DATA_DIR%" >nul
6 changes: 6 additions & 0 deletions bin/chrome-3pcd.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:: Chrome 3pcd

set "CHROME_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe"
set "DATA_DIR=%TEMP%\chrome_data_dir-%RANDOM%"
"%CHROME_PATH%" --disable-sync --no-default-browser-check --no-first-run --user-data-dir="%DATA_DIR%" --install-autogenerated-theme="255,51,51" --silent-debugger-extension-api --test-third-party-cookie-phaseout --enable-features="FirstPartySets,StorageAccessAPI,StorageAccessAPIForOriginExtension,PageInfoCookiesSubpage,PrivacySandboxFirstPartySetsUI" https://example.com >nul 2>&1
rmdir /s /q "%DATA_DIR%" >nul
6 changes: 6 additions & 0 deletions bin/chrome-chip.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:: Chrome Chip

set "CHROME_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe"
set "DATA_DIR=%TEMP%\chrome_data_dir-%RANDOM%"
"%CHROME_PATH%" --disable-sync --no-default-browser-check --no-first-run --user-data-dir="%DATA_DIR%" --install-autogenerated-theme="150,220,150" --silent-debugger-extension-api --partitioned-cookies=true https://example.com >nul 2>&1
rmdir /s /q "%DATA_DIR%" >nul
15 changes: 15 additions & 0 deletions bin/chrome-default-ps.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:: Default Chrome with PS Extension

:: Download PS Extension
set "ps_analysis_tool_version=v0.5.0"
cd /d %TEMP%
if not exist %TEMP%\ps-analysis-tool-%ps_analysis_tool_version% (
mkdir %TEMP%\ps-analysis-tool-%ps_analysis_tool_version%
curl -L -O -s https://github.com/GoogleChromeLabs/ps-analysis-tool/releases/download/%ps_analysis_tool_version%/extension-%ps_analysis_tool_version%.zip
tar -xf extension-%ps_analysis_tool_version%.zip -C %TEMP%\ps-analysis-tool-%ps_analysis_tool_version%
)

set "CHROME_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe"
set "DATA_DIR=%TEMP%\chrome_data_dir-%RANDOM%"
"%CHROME_PATH%" --disable-sync --no-default-browser-check --no-first-run --user-data-dir="%DATA_DIR%" --install-autogenerated-theme="150,220,150" --silent-debugger-extension-api --load-extension="%TEMP%\ps-analysis-tool-%ps_analysis_tool_version%\extension" https://example.com >nul 2>&1
rmdir /s /q "%DATA_DIR%" >nul
6 changes: 6 additions & 0 deletions bin/chrome-default.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:: Default Chrome

set "CHROME_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe"
set "DATA_DIR=%TEMP%\chrome_data_dir-%RANDOM%"
"%CHROME_PATH%" --disable-sync --no-default-browser-check --no-first-run --user-data-dir="%DATA_DIR%" --install-autogenerated-theme="150,220,150" --silent-debugger-extension-api https://example.com >nul 2>&1
rmdir /s /q "%DATA_DIR%" >nul
5 changes: 5 additions & 0 deletions bin/chrome-psat.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
curl -s https://raw.githubusercontent.com/GoogleChromeLabs/ps-analysis-tool/Setup-Different-Chrome-For-Demo/bin/chrome-default.bat -o chrome-default.bat
curl -s https://raw.githubusercontent.com/GoogleChromeLabs/ps-analysis-tool/Setup-Different-Chrome-For-Demo/bin/chrome-3pcd.bat -o chrome-3pcd.bat
curl -s https://raw.githubusercontent.com/GoogleChromeLabs/ps-analysis-tool/Setup-Different-Chrome-For-Demo/bin/chrome-default-ps.bat -o chrome-default-ps.bat
curl -s https://raw.githubusercontent.com/GoogleChromeLabs/ps-analysis-tool/Setup-Different-Chrome-For-Demo/bin/chrome-3pcd-ps.bat -o chrome-3pcd-ps.bat
curl -s https://raw.githubusercontent.com/GoogleChromeLabs/ps-analysis-tool/Setup-Different-Chrome-For-Demo/bin/chrome-chip.bat -o chrome-chip.bat
85 changes: 85 additions & 0 deletions bin/chrome_launcher.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash

# Download Extension
extension_setup() {
ps_analysis_tool_version=v0.5.0
extension_dir="/var/tmp"
cd $extension_dir
if [ ! -d $extension_dir/ps-analysis-tool-$ps_analysis_tool_version ]; then
mkdir -p $extension_dir/ps-analysis-tool-$ps_analysis_tool_version
curl -L -O -s https://github.com/GoogleChromeLabs/ps-analysis-tool/releases/download/$ps_analysis_tool_version/extension-$ps_analysis_tool_version.zip
unzip -qo extension-$ps_analysis_tool_version.zip -d $extension_dir/ps-analysis-tool-$ps_analysis_tool_version
fi
cd -
}

# Detect OS
if [[ "$(uname)" == "Darwin" ]]; then
# Loads Chrome with a temporary profile that is deleted after Chrome is closed
launch_chrome() {
local CHROME_PATH="/Applications/Google Chrome.app"
local DATA_DIR="$(mktemp -d '/tmp/chrome_data_dir.XXXXXXXXXX')"
open -W -na "${CHROME_PATH}" --args \
--disable-sync \
--no-default-browser-check \
--no-first-run \
--start-maximized \
--auto-open-devtools-for-tabs \
--user-data-dir="${DATA_DIR}" \
--silent-debugger-extension-api \
"$@" https://example.com >/dev/null 2>&1 && rm -rf "${DATA_DIR}" &
}
elif [[ "$(uname)" == "Linux" ]]; then
# Loads Chrome with a temporary profile that is deleted after Chrome is closed
launch_chrome() {
local CHROME="google-chrome"
local DATA_DIR="$(mktemp -d '/tmp/chrome_data_dir.XXXXXXXXXX')"
"${CHROME}" \
--disable-sync \
--no-default-browser-check \
--no-first-run \
--start-maximized \
--auto-open-devtools-for-tabs \
--user-data-dir="${DATA_DIR}" \
--silent-debugger-extension-api \
"$@" https://example.com >/dev/null 2>&1 && rm -rf "${DATA_DIR}" &
}
fi

# Launch default chrome
chrome-default() {
launch_chrome \
--install-autogenerated-theme='255,51,51'
}

# Launch default chrome with 3rd Party Cookie Phaseout
chrome-3pcd() {
launch_chrome \
--install-autogenerated-theme='150,220,150' \
--test-third-party-cookie-phaseout \
--enable-features="FirstPartySets,StorageAccessAPI,StorageAccessAPIForOriginExtension,PageInfoCookiesSubpage,PrivacySandboxFirstPartySetsUI,TpcdMetadataGrants,TpcdSupportSettings,TpcdHeuristicsGrants:TpcdReadHeuristicsGrants/true/TpcdWritePopupCurrentInteractionHeuristicsGrants/30d/TpcdBackfillPopupHeuristicsGrants/30d/TpcdPopupHeuristicEnableForIframeInitiator/all/TpcdWriteRedirectHeuristicGrants/15m/TpcdRedirectHeuristicRequireABAFlow/true/TpcdRedirectHeuristicRequireCurrentInteraction/true"
}

# Launch default chrome with Privacy Sandbox extension
chrome-default-ps() {
extension_setup
launch_chrome \
--install-autogenerated-theme='255,51,51' \
--load-extension="$extension_dir/ps-analysis-tool-$ps_analysis_tool_version/extension/"
}

# Launch default chrome with 3rd Party Cookie Phaseout with Privacy Sandbox extension
chrome-3pcd-ps() {
extension_setup
launch_chrome \
--install-autogenerated-theme='150,220,150' \
--test-third-party-cookie-phaseout \
--load-extension="$extension_dir/ps-analysis-tool-$ps_analysis_tool_version/extension" \
--enable-features="FirstPartySets,StorageAccessAPI,StorageAccessAPIForOriginExtension,PageInfoCookiesSubpage,PrivacySandboxFirstPartySetsUI,TpcdMetadataGrants,TpcdSupportSettings,TpcdHeuristicsGrants:TpcdReadHeuristicsGrants/true/TpcdWritePopupCurrentInteractionHeuristicsGrants/30d/TpcdBackfillPopupHeuristicsGrants/30d/TpcdPopupHeuristicEnableForIframeInitiator/all/TpcdWriteRedirectHeuristicGrants/15m/TpcdRedirectHeuristicRequireABAFlow/true/TpcdRedirectHeuristicRequireCurrentInteraction/true"
}

# Launch default chrome with Partitioned Cookies
chrome-chip() {
launch_chrome \
--partitioned-cookies=true
}
44 changes: 44 additions & 0 deletions bin/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

# create bin directory inside user home
mkdir -p ~/bin/

# Download Chrome Launcher Script and save to ~/bin/chrome_launcher.sh
curl -s https://raw.githubusercontent.com/GoogleChromeLabs/ps-analysis-tool/develop/bin/chrome_launcher.sh -o ~/bin/chrome_launcher.sh

chmod 755 ~/bin/chrome_launcher.sh

# Check Shell and auto source chrome_launcher.sh
case $SHELL in
*/zsh)
grep "chrome_launcher.sh" ~/.zshrc > /dev/null
if [ $? -ne 0 ]; then
{
echo "if [ -f ~/bin/chrome_launcher.sh ]; then"
echo -e "\tsource ~/bin/chrome_launcher.sh"
echo "fi"
} >> ~/.zshrc
fi
echo -e "Script added to ~/.zshrc, please restart your terminal session or run: \n\tsource ~/.zshrc"
;;
*/bash)
grep "chrome_launcher.sh" ~/.bashrc > /dev/null
if [ $? -ne 0 ]; then
{
echo "if [ -f ~/bin/chrome_launcher.sh ]; then"
echo -e "\tsource ~/bin/chrome_launcher.sh"
echo "fi"
} >> ~/.bashrc
fi
echo -e "Script added to ~/.bashrc, please restart your terminal session or run: \n\tsource ~/.bashrc"
;;
esac

echo -e "\nNew commands that will be available in new terminal session:"
echo -e "\tchrome-default : Opens a Chrome instance with default settings."
echo -e "\tchrome-3pcd : Opens a Chrome instance with Third-Party Cookie Deprecation (3PCD) enabled."
echo -e "\tchrome-default-ps : Opens a Chrome instance with default settings and the Privacy Sandbox extension installed."
echo -e "\tchrome-3pcd-ps : Opens a Chrome instance with 3PCD enabled and the Privacy Sandbox extension installed."

# Source into current terminal session as well
source ~/bin/chrome_launcher.sh
Loading

0 comments on commit 8d44846

Please sign in to comment.