{"id":48740861,"url":"https://github.com/fernandoslee/autoconsent-safari","last_synced_at":"2026-05-07T07:09:41.886Z","repository":{"id":350792376,"uuid":"1203258552","full_name":"fernandoslee/autoconsent-safari","owner":"fernandoslee","description":"Safari extension that automatically opts out of cookie consent popups. Fork of duckduckgo/autoconsent with a Safari distribution target.","archived":false,"fork":false,"pushed_at":"2026-05-05T05:17:13.000Z","size":47795,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-05T07:30:55.415Z","etag":null,"topics":["autoconsent","cookie-consent","privacy","safari","safari-extension"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fernandoslee.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-06T21:57:56.000Z","updated_at":"2026-05-05T05:15:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fernandoslee/autoconsent-safari","commit_stats":null,"previous_names":["fernandoslee/autoconsent-safari"],"tags_count":208,"template":false,"template_full_name":null,"purl":"pkg:github/fernandoslee/autoconsent-safari","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandoslee%2Fautoconsent-safari","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandoslee%2Fautoconsent-safari/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandoslee%2Fautoconsent-safari/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandoslee%2Fautoconsent-safari/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fernandoslee","download_url":"https://codeload.github.com/fernandoslee/autoconsent-safari/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandoslee%2Fautoconsent-safari/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32726741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoconsent","cookie-consent","privacy","safari","safari-extension"],"created_at":"2026-04-12T07:06:48.826Z","updated_at":"2026-05-07T07:09:41.847Z","avatar_url":"https://github.com/fernandoslee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Autoconsent for Safari\n\nA Safari extension that automatically opts out of cookie consent popups. This is an unofficial, personal fork of [duckduckgo/autoconsent](https://github.com/duckduckgo/autoconsent) that adds a Safari distribution target.\n\n[![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0)\n[![Upstream sync](https://github.com/fernandoslee/autoconsent-safari/actions/workflows/upstream-sync.yml/badge.svg)](https://github.com/fernandoslee/autoconsent-safari/actions/workflows/upstream-sync.yml)\n\n---\n\n## What it does\n\nWhen you visit a website with a cookie consent popup, the extension silently clicks \"Reject all\" (or equivalent) for you. It covers 285+ Consent Management Providers (CMPs) — OneTrust, Sourcepoint, Cookiebot, and hundreds of others — plus thousands of site-specific rules maintained by the DuckDuckGo team.\n\nSites with no reject option get their popup hidden via cosmetic rules. Sites with no matching rule are left untouched.\n\n\u003cimg src=\"docs/popup-screenshot.png\" alt=\"Autoconsent popup\" width=\"200\" /\u003e\n\n---\n\n## Installation options\n\nThere are two ways to install this extension. **Building from source is strongly recommended** — it gives you full visibility into what you are running. The pre-built option is provided for convenience but requires you to explicitly bypass macOS security controls, which carries risk.\n\n---\n\n## Option A — Build from source (recommended)\n\nBuilding from source means you compile the code yourself, so you know exactly what is being installed. This is the safest approach.\n\n### Requirements\n\n| Dependency | Version         | Notes                                                   |\n| ---------- | --------------- | ------------------------------------------------------- |\n| macOS      | 13.0+ (Ventura) |                                                         |\n| Safari     | 16.4+           | MV3 extension support                                   |\n| Xcode      | 15+             | Free from the Mac App Store (~7 GB)                     |\n| Node.js    | LTS (18+)       | [nodejs.org](https://nodejs.org) or `brew install node` |\n| npm        | 9+              | Bundled with Node.js                                    |\n\n### Automated setup (recommended)\n\nA single script handles the entire process:\n\n```bash\ngit clone https://github.com/fernandoslee/autoconsent-safari.git\ncd autoconsent-safari\n./setup.sh\n```\n\n`setup.sh` will check all dependencies, build the JavaScript bundle, generate the Xcode project on first run, build the app, and open it to register the extension with Safari.\n\n### Manual setup (step by step)\n\nIf you prefer to run each step yourself:\n\n**1. Clone and install dependencies**\n\n```bash\ngit clone https://github.com/fernandoslee/autoconsent-safari.git\ncd autoconsent-safari\nnpm install\n```\n\n**2. Build the Safari extension bundle**\n\n```bash\nnpm run prepublish\n```\n\nCompiles TypeScript, bundles all rules, and produces `dist/addon-safari/`.\n\n**3. Set up Xcode command-line tools (first time only)**\n\n```bash\nsudo xcode-select -s /Applications/Xcode.app/Contents/Developer\nsudo xcodebuild -license accept\nsudo xcodebuild -runFirstLaunch\n```\n\n**4. Generate the Xcode project (first time only)**\n\n```bash\nxcrun safari-web-extension-converter \\\n  dist/addon-safari \\\n  --project-location xcode/ \\\n  --app-name \"AutoconsentSafari\" \\\n  --bundle-identifier \"com.yourorg.autoconsent-safari\" \\\n  --macos-only \\\n  --no-open\n```\n\n**5. Fix bundle identifier (first time only)**\n\n```bash\nsed -i '' \\\n  's/PRODUCT_BUNDLE_IDENTIFIER = com.yourorg.AutoconsentSafari;/PRODUCT_BUNDLE_IDENTIFIER = \"com.yourorg.autoconsent-safari\";/g' \\\n  xcode/AutoconsentSafari/AutoconsentSafari.xcodeproj/project.pbxproj\n```\n\n**6. Build the app**\n\n```bash\nxcodebuild build \\\n  -project xcode/AutoconsentSafari/AutoconsentSafari.xcodeproj \\\n  -scheme AutoconsentSafari \\\n  -configuration Debug \\\n  CODE_SIGN_IDENTITY=\"-\" \\\n  CODE_SIGNING_REQUIRED=NO\n```\n\n**7. Open the app to register the extension**\n\n```bash\nopen ~/Library/Developer/Xcode/DerivedData/AutoconsentSafari-*/Build/Products/Debug/AutoconsentSafari.app\n```\n\n**8. Enable in Safari**\n\nGo to **Safari → Settings → Extensions**, enable **Autoconsent**, and set Website Access to **Allow on All Websites**.\n\nSafari will show an \"unsigned extension\" warning — this is expected for local builds without a paid Apple Developer account ($99/year).\n\n### Rebuilding after updates\n\nRules sync automatically from upstream daily. After pulling:\n\n```bash\ngit pull\nnpm run prepublish\n\nxcodebuild build \\\n  -project xcode/AutoconsentSafari/AutoconsentSafari.xcodeproj \\\n  -scheme AutoconsentSafari \\\n  -configuration Debug \\\n  CODE_SIGN_IDENTITY=\"-\" \\\n  CODE_SIGNING_REQUIRED=NO\n\nopen ~/Library/Developer/Xcode/DerivedData/AutoconsentSafari-*/Build/Products/Debug/AutoconsentSafari.app\n```\n\nSteps 4 and 5 are one-time only. If Safari doesn't pick up the update, disable the extension, quit Safari (`Cmd+Q`), reopen, and re-enable.\n\n---\n\n## Option B — Pre-built download\n\n\u003e **Read this section carefully before proceeding.**\n\nA pre-built unsigned `.app` is published automatically by CI on every update and is available on the [Releases page](https://github.com/fernandoslee/autoconsent-safari/releases/tag/latest).\n\n### Why it is unsigned\n\nDistributing a properly signed and notarized macOS app requires an Apple Developer Program membership ($99/year). This is a personal project with no commercial intent, so no certificate has been purchased. The app is built by a GitHub Actions CI pipeline from the source code in this repository, but it has not been reviewed or approved by Apple.\n\n### Security implications\n\nmacOS includes Gatekeeper, a security feature that blocks apps not signed by a verified developer. Installing this app requires you to explicitly disable Gatekeeper's protection for it. **You should understand what this means before proceeding:**\n\n- You are running software that has not been verified by Apple.\n- The `xattr -cr` command below removes the quarantine flag that macOS uses to warn you about unverified downloads. Once removed, macOS will not prompt you again.\n- If you have any doubt about the source of the file you downloaded, do not proceed. Build from source instead.\n\nThe risk is mitigated by the fact that the source code is fully open, the CI build pipeline is public and auditable, and the extension only reads web page content to detect and dismiss cookie banners — it does not have access to passwords, files, or other sensitive data.\n\n### Installation steps\n\n**1.** Download `AutoconsentSafari-*-unsigned.zip` from the [Releases page](https://github.com/fernandoslee/autoconsent-safari/releases/tag/latest) and unzip it.\n\n**2.** Verify the download came from this repository's CI pipeline (check the release was published by `github-actions[bot]`).\n\n**3.** Remove the macOS quarantine flag:\n\n```bash\nxattr -cr AutoconsentSafari.app\n```\n\n**4.** Open the app:\n\n```bash\nopen AutoconsentSafari.app\n```\n\nOr double-click it in Finder. macOS may still show a warning — click **Open** to proceed.\n\n**5.** In Safari: **Settings → Extensions → Enable Autoconsent → Allow on All Websites**.\n\n---\n\n## How it works\n\nThe extension injects a content script on every page at `document_start`. The script checks the page against 285+ CMP rules. When a match is found, it automatically clicks the reject/decline button. If the popup has no reject option, it is hidden via CSS.\n\nThe background service worker loads all rules on install and responds to the content script with the applicable ruleset for each page.\n\n---\n\n## Rules auto-update\n\nRules are decoupled from the app binary and update automatically — no app reinstall required.\n\nA lightweight content script (`rules-updater.js`) runs once per 24 hours in the background while you browse normally. It fetches the latest `compact-rules.json` and `rules.json` directly from this repository via the [jsDelivr CDN](https://www.jsdelivr.com/) and writes them into the extension's local storage. On the next page load, the updated rules are active.\n\n| Component          | How it updates                                   |\n| ------------------ | ------------------------------------------------ |\n| Rules (285+ CMPs)  | Automatically, once per 24 h — no action needed  |\n| Engine (JS bundle) | Requires downloading a new release or rebuilding |\n\nThe engine (the code that interprets and executes rules) changes infrequently — only when DuckDuckGo modifies the detection or opt-out logic. Rules change weekly as new CMPs are added or existing ones are fixed.\n\n**Update timeline:** Upstream pushes rules → this fork syncs within 24 h → jsDelivr CDN picks up the change within ~12 h → your extension fetches the update on its next 24 h check. Maximum staleness: ~60 hours.\n\n**Fallback:** If the CDN fetch fails (offline, network error), the previously stored rules remain in use. The extension never stops working due to a failed update.\n\n---\n\n## Current state \u0026 known limitations\n\n| Area                        | Status                                           |\n| --------------------------- | ------------------------------------------------ |\n| GDPR cookie banners         | Working — covers all major CMPs                  |\n| US-only popups (CCPA)       | Partial — depends on the CMP                     |\n| Sites with no reject button | Handled via cosmetic (hide) rules                |\n| Sites with no matching rule | Left untouched                                   |\n| Rules                       | Auto-update every 24 h — no reinstall needed     |\n| Engine                      | Requires new release or rebuild to update        |\n| Unsigned local build        | Working — Safari shows a one-time warning        |\n| Signed/notarized build      | Not available — requires Apple Developer account |\n| App Store distribution      | Not planned                                      |\n\n---\n\n## Upstream sync\n\nThis fork tracks [duckduckgo/autoconsent](https://github.com/duckduckgo/autoconsent) via a daily GitHub Actions workflow that merges upstream `main` into this fork.\n\n- **Clean merge** → pushed automatically; unsigned CI build publishes a new release\n- **Conflict** → a PR is opened for manual resolution (rare)\n\n---\n\n## Fork structure\n\nEight files differ from upstream:\n\n| File                                  | Change                                                                 |\n| ------------------------------------- | ---------------------------------------------------------------------- |\n| `addon/manifest.safari.json`          | New — Safari MV3 manifest (no `browsingData`, no `devtools_page`)      |\n| `addon/popup.safari.html`             | New — Safari popup UI (Apple HIG design, light/dark/system themes)     |\n| `addon/popup.safari.js`               | New — Safari popup extras (theme switching, tooltips, reset behaviour) |\n| `build.sh`                            | +~20 lines appended — produces `dist/addon-safari/`                    |\n| `update_version.js`                   | +1 line — stamps `manifest.safari.json` on `npm version`               |\n| `.gitignore`                          | +1 line — excludes `xcode/.../Resources/` (rebuilt by Xcode)           |\n| `.github/workflows/upstream-sync.yml` | New — daily upstream sync                                              |\n| `.github/workflows/safari-build.yml`  | New — CI unsigned build + release                                      |\n\nEverything else is byte-for-byte identical to upstream.\n\n---\n\n## Disclaimer\n\nThis project is not affiliated with or endorsed by DuckDuckGo. It is an independent personal fork maintained on a best-effort basis, provided as-is with no warranties, guarantees, or support obligations. The upstream project ([duckduckgo/autoconsent](https://github.com/duckduckgo/autoconsent)) is the authoritative source for rules and engine updates.\n\n## License\n\nMPLv2 — same as upstream.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandoslee%2Fautoconsent-safari","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffernandoslee%2Fautoconsent-safari","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandoslee%2Fautoconsent-safari/lists"}