-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] feat: Cookie auditor script #3
base: main
Are you sure you want to change the base?
Conversation
|
// ============== | ||
// Functions used | ||
// ============== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This thing is a monster, I'm aware 😅 Each of these functions can likely be reworked to live in their own files, but the current state of this file reflects my process developing the logic.
- Check for base data on at least one of both currently-supported browser types - Properly structure comparison loop - Edit logs/comments/vars for clarity
- Simplify and fix baseData generation/detection - Clarify comments
Description
This PR aims to add a script for the purpose of gathering cookies from our sites to be audited. Additionally, the script compares this new, gathered data against a set of base data (usually from a previous run), and records added/removed cookies since that base data was made.
This script was originally designed to be run locally as opposed to from an
npm
package, but work will be done to make the logic package-friendly.Why?
Manual cookie audits take quite a long time. They involve the opening of browsers, clearing of caches, opening of tabs, manual copy-pasting of data into a spreadsheet...there are many points of failure and processes to keep track of.
With a highly automated process using Playwright, human error is minimized (if not, eliminated), time taken to gather the data is dramatically reduced, and data from browsers using three different engines can be gathered in an efficient, quick way.
"Highly automated"?
While much of the tedious work of opening browsers/tabs, navigating to sites, copying cookie data etc. is automated away with this script, there is still a manual step.
Each cookie's intended use, and which entities have third-party access to its data, have to be manually-researched and added to the final results data, under the "Third-party access?" and "What does it intend to store?" columns. This should be done to the results data exported after the data comparison step.
Why is this a script and not a package?
It was initially developed and intended for local running, as a utility to aid in cookie auditing. However, it can be converted into an
npm
package with some work to externalize its inputs and outputs, such that they aren't required to be colocated with the script.Remaining work to convert this script into a package is being tracked via Asana.
Long-term
PR Checklist 🚀