显示HN:PanicLock – 关闭MacBook盖子禁用TouchID –> 密码解锁
Show HN: PanicLock – Close your MacBook lid disable TouchID –> password unlock

原始链接: https://github.com/paniclock/paniclock/

## PanicLock:即时macOS安全 PanicLock 是一款为快速、安全锁定屏幕而设计的 macOS 工具。只需单击、热键,甚至关闭笔记本电脑盖,即可立即禁用 Touch ID 并锁定屏幕,强制密码验证。 主要功能包括:一键强制锁定、盖子关闭时自动锁定(可选禁用 Touch ID)以及可自定义的键盘快捷键。Touch ID 会在您使用密码登录后暂时禁用,恢复正常功能用于标准屏幕锁定。 PanicLock 使用特权辅助程序来修改 Touch ID 设置,权限最小化,并通过代码签名、XPC 验证以及完全不进行网络活动或数据收集来优先考虑安全性。 该项目是开源的,允许进行完整的代码审计,并包含一个发布脚本,用于自动构建、签名和公证以供分发。它在 GitHub 上以 MIT 许可证提供。

## PanicLock:macOS 上快速禁用触控 ID PanicLock 是一款新的 macOS 开源工具,旨在解决一个关键的安全漏洞:即时禁用触控 ID 并恢复为仅密码解锁的能力。该工具是针对华盛顿邮报记者 Hannah Natanson 被迫使用指纹解锁电脑等案例而创建的,它允许用户快速保护其数据免受强制生物识别访问。 该工具提供菜单栏按钮、可自定义的热键或自动合盖锁屏选项,可在不注销的情况下禁用触控 ID。虽然承认完全关机的安全优势,但 PanicLock 提供了一种更快的临时保护解决方案。 讨论强调了替代方法,例如使用终端命令或 iOS 的紧急 SOS 功能,并探讨了其对复杂取证技术的有效性。用户还建议改进,例如每个指纹的身份验证或与现有安全功能的集成。其核心思想是在面临潜在胁迫时提供一个易于使用的选项,认识到强制生物识别解锁与密码披露之间的法律差异。 [https://paniclock.github.io/](https://paniclock.github.io/) (项目页面)
相关文章

原文

PanicLock

PanicLock is macOS menu bar utility that instantly disables Touch ID and locks the screen with a single click or closing your laptop lid.

Download PanicLock

  • One-click panic lock — Click the menu bar icon or press a hotkey to instantly lock
  • Lock on Close — Optionally lock and disable Touch ID when you close the lid
  • Temporarily disables Touch ID — Forces password-only unlock
  • Auto-restore — Original Touch ID settings restored after unlock
  • Keyboard shortcut — Configure a global hotkey (e.g., ⌃⌥⌘L)
  • Launch at login — Start automatically when you log in
  • macOS 14.0 (Sonoma) or later
  • Mac with Touch ID
Action Result
Left-click icon Trigger panic lock immediately
Right-click icon Open menu (Preferences, Uninstall, Quit)

When enabled in Preferences, closing your Mac's lid will automatically disable Touch ID and lock your screen. Touch ID stays disabled until you re-login with your password. If your screen locks for other reasons (screensaver, display sleep, etc.), Touch ID will still work as normal.

On first use, you'll be prompted for your admin password to install the privileged helper. This is a one-time setup.

  1. Clone this repository
  2. Open PanicLock.xcodeproj in Xcode
  3. Set your Development Team in both targets (PanicLock and PanicLockHelper)
  4. Update Team ID in Info.plist (SMPrivilegedExecutables) and Info-Helper.plist (SMAuthorizedClients)
  5. Build and run

From the app: Right-click → "Uninstall PanicLock..." → Enter admin password

Manual:

sudo launchctl bootout system/com.paniclock.helper
sudo rm -f /Library/PrivilegedHelperTools/com.paniclock.helper
sudo rm -f /Library/LaunchDaemons/com.paniclock.helper.plist
rm -rf /Applications/PanicLock.app

PanicLock uses a privileged helper (installed via SMJobBless) to modify Touch ID timeout settings:

  1. Reads current timeout via bioutil -r -s
  2. Sets timeout to 1 second via bioutil -w -s -o 1
  3. Locks screen via pmset displaysleepnow
  4. Restores original timeout after ~2 seconds
  • Minimal privileges — Helper only runs 3 hardcoded commands (bioutil, pmset)
  • No command injection — Timeout parameter is a Swift Int, not a string
  • Code-signed XPC — Helper verifies connecting app's bundle ID + team ID + certificate
  • No network activity — App is 100% offline, no telemetry or analytics
  • No data collection — Only stores preferences (icon style, keyboard shortcut)
  • Open source — Full code available for audit

The release script handles building, signing, notarizing, and packaging:

Features:

  • Extracts version from Xcode project automatically
  • Signs with Developer ID for distribution outside the App Store
  • Submits to Apple for notarization (can take minutes to hours)
  • Creates a notarized DMG for distribution
  • Supports parallel notarizations — each version gets its own build/release/<version>/ directory

Workflow:

  1. Bump MARKETING_VERSION in Xcode
  2. Run ./scripts/release.sh — builds and submits for notarization
  3. Run again later to check status and continue when approved
  4. Final output: build/release/<version>/PanicLock-<version>.dmg

MIT License — See LICENSE for details.

Contributions welcome! Please open an issue or pull request.

联系我们 contact @ memedata.com