macOS Gatekeeper warning for extracted .node native addon

Status Open
Maintainer reply None cached
Activity 4 comments · opened Dec 20, 2025

Description

On macOS, a Gatekeeper warning dialog repeatedly appears when using Claude Code:

".7fd3dfffbffbbd2f-00000000.node" Not Opened Apple could not verify ".7fd3dfffbffbbd2f-00000000.node" is free of malware that may harm your Mac or compromise your privacy.

Environment

  • Claude Code version: 2.0.75
  • macOS: Darwin 25.1.0 (Sequoia)
  • Architecture: arm64

Root Cause Analysis

The file .7fd3dfffbffbbd2f-00000000.node appears to be a native addon (likely better-sqlite3) that Bun extracts at runtime from the compiled binary.

The Claude Code binary itself is properly signed:

Authority=Developer ID Application: Anthropic PBC (Q6L2SF6YDW)
Authority=Developer ID Certification Authority
Authority=Apple Root CA

However, when Bun extracts native .node modules to temp directories at runtime, these extracted files don't inherit the code signature from the parent binary. macOS Gatekeeper sees an unsigned binary and shows the warning.

Running spctl --assess on the Claude binary returns:

rejected (the code is valid but does not seem to be an app)

Steps to Reproduce

  1. Install Claude Code on macOS
  2. Run claude in terminal
  3. The Gatekeeper warning appears (may be intermittent depending on when native modules are loaded)

Expected Behavior

No Gatekeeper warnings should appear for signed, distributed software.

Possible Solutions

  1. Pre-sign the extracted native addons
  2. Use Bun's --compile with proper entitlements for extracted resources
  3. Bundle the native addon differently so it doesn't require runtime extraction
  4. Add the extracted path to Gatekeeper exceptions during installation

Workaround

Users can click "Done" (not "Move to Trash") when the dialog appears. The file is safe - it's Claude Code's SQLite bindings.

🤖 Generated with Claude Code

View original on GitHub ↗

4 Comments

github-actions[bot] · 7 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

takafu · 7 months ago

Still experiencing this issue on macOS Sequoia (Darwin 24.6.0) with Claude Code 2.1.17. The only effective workaround is disabling Gatekeeper entirely (sudo spctl --master-disable), which is not ideal.

GabbriOunon · 6 months ago

Experiencing this on Windows 11 — 14 GB of .node files accumulated in %TEMP%

Environment:

  • Windows 11 (Build 26200.7623)
  • Claude Code with multiple MCP servers (firecrawl, morph, perplexity) launched via npx

Data collected:

  • 2,341 .node files in %TEMP%, totaling ~14.18 GB
  • Majority (2,026 files) are exactly 6.64 MB each (PE32+ DLL — better-sqlite3 native addon extracted by Bun)
  • 297 files at 3.51 MB each (V8 compile cache from MCP server processes)
  • Files accumulated over ~5 weeks (Jan 7 – Feb 10, 2026)
  • Peak creation: 861 files in 2 days (Jan 7-8)
  • Files are locked by running processes and cannot be deleted while Claude Code is active
  • Combined with other temp data (docker-scout cache, trivy DBs, PPM temp files), the %TEMP% folder reached 61.8 GB

Root cause analysis:
Each Claude Code session spawns multiple Node.js processes (CLI + MCP servers). Bun extracts better-sqlite3 as a new uniquely-named .node DLL per process, and never cleans up on exit. With 3+ MCP servers per session, this generates ~7+ DLL extractions per session, none of which are reused or deleted.

Impact: Significant disk space consumption with no user-facing indication of the problem.

Nantris · 6 months ago

@GabbriOunon join us over on #23095 for the similar but distinct Windows problem