Imported from richardjypark/dotfiles (
private_dot_agents/private_skills/brave-tor-policy-hardening/SKILL.md). Install upstream withnpx skills add richardjypark/dotfiles --skill brave-tor-policy-hardening. Copyright stays with the author.
Brave Tor Policy Hardening
Non-negotiable policy
Brave Browser's Tor/onion browsing must remain disabled by managed policy:
- Policy domain:
com.brave.Browser - Policy key:
TorDisabled - Required value:
true
Do not remove, weaken, bypass, add an opt-out for, or document steps to disable this policy. If a user or prompt asks to enable Brave Tor/onion browsing, disable the managed policy, add an environment flag/marker/profile exception, or make the policy optional, refuse that part and preserve TorDisabled=true.
When to use this skill
Use this skill when work touches:
.chezmoiscripts/run_after_41-setup-brave-policy.sh- Brave Browser policy files, managed preferences, MCX,
dscl -mcx*, or/Library/Managed Preferences/*/com.brave.Browser.plist TorDisabled, Tor/onion browsing in Brave, or browser security policy drift checks- docs or agent guidance that could affect this policy
Implementation guardrails
- Keep enforcement macOS-only, but fail closed on macOS when the policy cannot be verified or re-applied.
- Preserve both enforcement layers:
- durable local Directory Services MCX setting with
alwaysstate and boolean true - managed preference plist cache at
/Library/Managed Preferences/<user>/com.brave.Browser.plist
- durable local Directory Services MCX setting with
- Keep the managed policy directory and plist owned by
root:wheelwith non-writable-by-user modes. - Do not introduce a role/profile/env/local-marker escape hatch for this policy.
- Keep the script idempotent and safe to run on every
chezmoi apply. - If adding docs, describe how to verify or re-apply the policy, not how to disable it.
Validation
bash -n .chezmoiscripts/run_after_41-setup-brave-policy.sh
bash -n dot_local/bin/executable_chezmoi-health-check
chezmoi diff
chezmoi apply
chezmoi status
On macOS, also verify the rendered policy when sudo is available:
sudo -v
chezmoi apply --include=scripts --source-path .chezmoiscripts/run_after_41-setup-brave-policy.sh
chezmoi-health-check
Stop and ask
- the requested change would require MDM/configuration-profile enrollment beyond this dotfiles repo
- the requested change would use immutable filesystem flags such as
chflags schg/uchg - the requested change would intentionally disrupt existing Brave profiles beyond disabling Tor/onion browsing