Skip to content

Commit

Permalink
Add scripts for privacy audits (#2861)
Browse files Browse the repository at this point in the history
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

<!--
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be
marked with the `DO NOT MERGE` label (particularly if it's a draft)
If it's pending Product Review/PFR, please add the `Pending Product
Review` label.

If at any point it isn't actively being worked on/ready for
review/otherwise moving forward (besides the above PR/PFR exception)
strongly consider closing it (or not opening it in the first place). If
you decide not to close it, make sure it's labelled to make it clear the
PRs state and comment with more information.
-->

---
###### 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)
  • Loading branch information
SlayterDev authored Jun 19, 2024
1 parent 88883f7 commit 5a2db46
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/audit/audit-startup.sh
Original file line number Diff line number Diff line change
@@ -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

22 changes: 22 additions & 0 deletions scripts/audit/find-and-diff.sh
Original file line number Diff line number Diff line change
@@ -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") <this-stage> <pre-stage>"
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

0 comments on commit 5a2db46

Please sign in to comment.