Skip to content

fix: do not analyze extensionless assets that are not regular files - #622

Open
rickmff wants to merge 2 commits into
vercel:mainfrom
rickmff:fix/non-regular-extensionless-assets
Open

rickmff wants to merge 2 commits into
vercel:mainfrom
rickmff:fix/non-regular-extensionless-assets

Conversation

@rickmff

@rickmff rickmff commented Nov 1, 2026 •

Copy link
Copy Markdown

nft reads extensionless assets as code, so a Unix socket inside a traced folder crashes the trace with ENXIO. Now they're only analyzed when the real file behind them is a regular file. Anything else is emitted as a plain asset.

Fixes #616

A socket named something.js still crashes the same way. I kept that out of this PR.

Tested on Linux with Node 20, not on macOS. bcrypt, ffmpeg-static and sharp-pnpm fail in test/integration.test.js with or without this change.

Extensionless assets were always analyzed as code, so a Unix socket
collected from a traced directory failed the whole trace with ENXIO.
Emit them as plain assets unless they are regular files.

Fixes vercel#616

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rickmff
rickmff requested review from a team, icyJoseph, ijjk and styfle as code owners November 1, 2026 15:43
Calling stat on the asset itself could fail on long symlink chains and
poison the stat cache through relative symlinks. Resolve it first, and
make the tests cover regular files and each symlink case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trace crashes on Unix socket files: extensionless assets are read without an isFile() check

1 participant