Repository navigation
The JS loader has been rewritten from scratch to close a long-standing security hole that vanilla fx-autoconfig leaves open. The chrome scope is no longer drop-in-and-execute for any process with write access to your profile.
Hash-pinned JS loader
palefox now ships its own bootstrap that refuses to load any chrome JS or CSS file whose SHA-256 doesn't match a manifest baked into the bootstrap at build time. The bootstrap itself lives in your Firefox install root (root-owned), so a local-mode attacker — a compromised npm package, a malicious dev tool, an XSS chain that escapes a tab — cannot drop a .uc.js into your profile and have it execute with chrome privileges. Injecting privileged code now requires sudo, which is the same trust bar as vanilla Firefox.
The vanilla fx-autoconfig README explicitly acknowledges this attack vector. As far as we can tell, hash-pinning at the bootstrap level is novel in the userChrome ecosystem (no existing community loader does it; CSS-only forks like Zen and Floorp sidestep by avoiding profile-side JS entirely).
Full architecture, runtime sequence, security model, and threat-model precedents live in docs/dev/loader-pipeline.md. The threat-model derivation (how we considered + rejected alternatives like Firefox forking, WebExtension rewrites, crypto signing) is in docs/dev/sandbox-research.md.
CSS migration
Palefox CSS now lives in chrome/CSS/*.uc.css, loaded through fx-autoconfig's chrome://userstyles/skin/ registration. The legacy toolkit.legacyUserProfileCustomizations.stylesheets pref is force-disabled at install time. This is required for the security model to be airtight: leaving the legacy pref enabled would let Firefox direct-load userChrome.css (user-writable, ungated), bypassing the hash check entirely.
Test rig + end-to-end gate verification
The dev/test loop now uses a separate Firefox install at ~/.cache/palefox-test-firefox/ (set up by bun run test:rig:setup). Your daily browser is never touched by bun run test:integration or bun run test:rig (interactive headed Firefox in an ephemeral profile).
Three new Tier 3 tests in tests/integration/bootstrap-hash.ts exercise the security gate end-to-end:
- positive control (palefox loads cleanly)
- tampered file rejected (modify a
chrome/JS/file → bootstrap bails, palefox doesn't load) - extra
.uc.jsrejected (drop a stranger file → bootstrap bails)
CI runs all three on every push.
Per-install backups
Every install.sh / uninstall-fx-autoconfig.sh run creates a single timestamped directory at <profile>/palefox-backup-<timestamp>/ containing snapshots of everything modified (chrome/, user.js, prefs.js). Each backup ships a README.txt explaining contents, restore commands pre-filled for your profile, and security implications of restoring (the loader chain is three pieces in concert; restoring just one is inert, restoring chrome/utils/ + later reinstalling reconnects the chain).
Removing the legacy fx-autoconfig setup
If you installed palefox before this release, your Firefox has the vanilla fx-autoconfig bootstrap (the security hole this release closes). Re-running ./install.sh upgrades you to the hash-pinned variant automatically — the installer detects the legacy bootstrap and prints a notice before replacing it.
If you'd rather remove the loader entirely (you don't want palefox at all), ./uninstall-fx-autoconfig.sh (or .ps1 on Windows) cleans up: removes the install-root bootstrap, the profile loader machinery, and the userChromeJS.enabled pref forcing. Backups go to <profile>/palefox-backup-<timestamp>/.
Upgrading
| You're on | Do this |
|---|---|
| Previous palefox release (v0.42.x or earlier, vanilla fx-autoconfig) | ./install.sh (or nixos-rebuild switch for Nix). Notice on first run explains the security upgrade. |
| Fresh install | curl -fsSL https://raw.githubusercontent.com/tompassarelli/palefox/main/install.sh -o /tmp/palefox-install.sh && bash /tmp/palefox-install.sh (Linux/macOS) or the equivalent PowerShell line for Windows. |
| Nix flake user | Add palefox as a flake input, reference inputs.palefox in your wrapped Firefox derivation. See updated docs/nix.md. |
What's NOT in this release
- Crypto signing for the bootstrap. Documented as the v2 path in
docs/dev/loader-pipeline.mdif/when single-sudo-per-release becomes painful (multi-developer team, frequent releases). - Sigstore / artifact attestations on release tarballs. Independent threat model (release-artifact integrity vs in-browser exec). Future work.
Files of interest
- Bootstrap template:
program/config.template.js - Build-time hash generator:
tools/generate-bootstrap.ts - Test rig:
tools/test-driver/firefox-rig.ts - End-to-end gate verification:
tests/integration/bootstrap-hash.ts