From 5a2db4690bfc4986d95e154cfcf6c5dfc5ac3db7 Mon Sep 17 00:00:00 2001 From: Brad Slayter Date: Wed, 19 Jun 2024 10:55:16 -0500 Subject: [PATCH] Add scripts for privacy audits (#2861) Task/Issue URL: https://app.asana.com/0/1201470200663180/1207528448482301/f Tech Design URL: CC: @bwaresiak **Description**: This PR adds a couple of scripts to help with the privacy data audit process **Steps to test this PR**: 1. Follow the task in https://app.asana.com/0/547792610048271/1207359629742453/f --- ###### Internal references: [Pull Request Review Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f) [Software Engineering Expectations](https://app.asana.com/0/59792373528535/199064865822552) [Technical Design Template](https://app.asana.com/0/59792373528535/184709971311943) [Pull Request Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f) --- scripts/audit/audit-startup.sh | 12 ++++++++++++ scripts/audit/find-and-diff.sh | 22 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 scripts/audit/audit-startup.sh create mode 100755 scripts/audit/find-and-diff.sh diff --git a/scripts/audit/audit-startup.sh b/scripts/audit/audit-startup.sh new file mode 100755 index 0000000000..a879bd6314 --- /dev/null +++ b/scripts/audit/audit-startup.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +BROWSER_DIR=~/Library/Caches/com.duckduckgo.macos.browser.debug +OUTPUT_DIR=~/Desktop/macos-browser-audit + +rm -rf $OUTPUT_DIR +mkdir -p $OUTPUT_DIR + +cd $BROWSER_DIR || exit 1 + +find . > $OUTPUT_DIR/startup.txt + diff --git a/scripts/audit/find-and-diff.sh b/scripts/audit/find-and-diff.sh new file mode 100755 index 0000000000..b8f3fceb4a --- /dev/null +++ b/scripts/audit/find-and-diff.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +BROWSER_DIR=~/Library/Caches/com.duckduckgo.macos.browser.debug +OUTPUT_DIR=~/Desktop/macos-browser-audit + +mkdir -p $OUTPUT_DIR + +if [ "$#" -ne 2 ]; then + echo "Usage: $(basename "$0") " + echo "Example: $(basename "$0") pre-burn startup" + exit 1 +fi + +cd $BROWSER_DIR || exit 1 + +find . > $OUTPUT_DIR/"$1".txt + +diff $OUTPUT_DIR/"$2".txt $OUTPUT_DIR/"$1".txt > $OUTPUT_DIR/"$1".diff + +echo "Diff output:" +cat $OUTPUT_DIR/"$1".diff +