Commit 3593433
committed
feat(node): add SIGUSR1 signal handler prevention flags
Add support for disabling SIGUSR1 debugger signal handling in production:
- supportsNodeDisableSigusr1Flag(): Detects flag support (v22.14+, v23.7+, v24.8+)
- getNodeDisableSigusr1Flags(): Returns --disable-sigusr1 or --no-inspect fallback
SIGUSR1 is reserved by Node.js for starting the debugger/inspector.
In production CLI environments, we prevent debugger attachment for security.
--disable-sigusr1: Proper solution (prevents Signal I/O Thread creation entirely)
--no-inspect: Fallback for Node 18+ (still creates thread but blocks later)1 parent 3df0fea commit 3593433
1 file changed
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
80 | 117 | | |
81 | 118 | | |
82 | 119 | | |
| |||
0 commit comments