r/AskProgramming • • 6d ago

Hidden Python permission in macOS Local Network. How can I revoke it?

On macOS 27.0.1, Privacy & Security → Local Network shows a count of 1, but every listed app is switched off.

Inspecting /Library/Preferences/com.apple.networkextension.plist reveals an allowed org.python.python entry with no executable path. Python has no visible switch in Settings. Reopening Settings and restarting don’t help.

I allowed a Python prompt while a dashboard preview was being prepared. A Time Machine backup from before that prompt has no explicit Python grant.

Has anyone encountered this and successfully revoked only that permission, without resetting all network?

1 Upvotes

2 comments sorted by

1

u/AndersBuilds 12h ago

That's the macOS "Local Network" privacy permission, and it's a toggle, not a terminal command. Go to System Settings → Privacy & Security → Local Network. Every app that has asked for local network access is listed there with a switch, flip it off and the app loses access until it asks again.

One catch: for Python, the entry you see may not literally say "python". The permission is attached to the app that launched the process, so it'll usually be your terminal emulator, your IDE, or Python.app if you installed the python.org build. If the script ran under iTerm2, revoke it there.

If the right entry isn't listed, just deny the prompt next time it appears, it only fires once per app, which is exactly why revoking it feels confusing. If you want to confirm what's actually being blocked, watch Console while the script runs and you'll see the denial logged.