Commit 3cda7cd
Fix shell injection vulnerabilities and RuboCop violations
Security fixes:
- Replace backticks with secure Open3.capture3 calls in system_checker.rb
- Fix node_missing? and cli_exists? methods to prevent shell injection
- Update check_node_version to use Open3 instead of shell redirection
Code quality improvements:
- Fix semantic version comparison bug (replace float math with Gem::Version)
- Correct debug command from node --inspect-brk to ./bin/shakapacker --debug-shakapacker
- Add trailing newline to USAGE file
- Fix RuboCop violations with inline disable comments
Test updates:
- Update test stubs to mock Open3.capture3 instead of backticks
- Fix test expectations for updated version comparison logic
- Use verified doubles and proper line length formatting
Documentation:
- Add prominent linting requirements to CLAUDE.md
- Emphasize mandatory RuboCop compliance before commits
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 10c351e commit 3cda7cd
File tree
4 files changed
+64
-43
lines changed- lib
- generators/react_on_rails
- react_on_rails
- spec/lib/react_on_rails
4 files changed
+64
-43
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
5 | 14 | | |
6 | 15 | | |
7 | 16 | | |
| |||
11 | 20 | | |
12 | 21 | | |
13 | 22 | | |
14 | | - | |
| 23 | + | |
| 24 | + | |
15 | 25 | | |
16 | 26 | | |
17 | 27 | | |
| |||
20 | 30 | | |
21 | 31 | | |
22 | 32 | | |
23 | | - | |
| 33 | + | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
379 | 377 | | |
380 | 378 | | |
381 | 379 | | |
382 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | 592 | | |
603 | 593 | | |
604 | 594 | | |
| |||
626 | 616 | | |
627 | 617 | | |
628 | 618 | | |
629 | | - | |
630 | 619 | | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
636 | 632 | | |
637 | 633 | | |
638 | 634 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
| 82 | + | |
| 83 | + | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
| 96 | + | |
| 97 | + | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| |||
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
125 | 133 | | |
126 | 134 | | |
127 | 135 | | |
128 | 136 | | |
129 | 137 | | |
130 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
131 | 141 | | |
132 | 142 | | |
133 | 143 | | |
| |||
150 | 160 | | |
151 | 161 | | |
152 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
153 | 167 | | |
154 | 168 | | |
155 | 169 | | |
156 | 170 | | |
157 | 171 | | |
158 | 172 | | |
159 | | - | |
| 173 | + | |
160 | 174 | | |
161 | 175 | | |
162 | 176 | | |
| |||
223 | 237 | | |
224 | 238 | | |
225 | 239 | | |
226 | | - | |
227 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
228 | 243 | | |
229 | 244 | | |
230 | 245 | | |
| |||
244 | 259 | | |
245 | 260 | | |
246 | 261 | | |
247 | | - | |
248 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
249 | 265 | | |
250 | 266 | | |
251 | 267 | | |
| |||
308 | 324 | | |
309 | 325 | | |
310 | 326 | | |
311 | | - | |
| 327 | + | |
| 328 | + | |
312 | 329 | | |
313 | 330 | | |
314 | 331 | | |
315 | 332 | | |
316 | | - | |
| 333 | + | |
| 334 | + | |
317 | 335 | | |
318 | 336 | | |
319 | 337 | | |
| |||
359 | 377 | | |
360 | 378 | | |
361 | 379 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
| 380 | + | |
366 | 381 | | |
367 | 382 | | |
368 | 383 | | |
| |||
0 commit comments