Two Go stdlib traps when watching and scanning JSON files on Linux

Two bugs surfaced during a CEO-plan audit of the vuls-exporter codebase that are easy to introduce and silent enough to survive code review. Both involve standard-library primitives that look correct but fail quietly on Linux. The bugs at a glance filepath.Glob("**/*.json") does not recurse on Linux — it matches nothing in subdirectories and returns nil, nil. Raw unix.InotifyAddWatch does not automatically watch new subdirectories — any directory created after the watch is set up is silently ignored. Bug 1: filepath.Glob does not support ** The code looked like this: ...

March 16, 2026 · 3 min · Ashish Jaiswal