Commit 8f087f0
committed
Fix critical security and performance issues in linting setup
SECURITY FIXES:
- Fix shell injection vulnerability in pre-commit hook by using printf and xargs
- Add proper quoting and error handling for filenames with spaces/special chars
PERFORMANCE OPTIMIZATIONS:
- Add binary file detection to skip non-text files in newline checks
- Limit file size checks to 10MB to prevent memory issues
- Read only last bytes for newline detection instead of entire file
- Align excluded directories with RuboCop config (add specs_e2e, e2e, spec/fixtures)
CI IMPROVEMENTS:
- Remove redundant lint execution from main workflow (keep dedicated lint.yml)
- Align Ruby versions across workflows (use 3.0.6 consistently)
CODE QUALITY:
- Rename rubocop:auto_correct to rubocop:autocorrect (match RuboCop conventions)
- Add comprehensive error handling to install-hooks script
- Check for git repository before installing hooks
- Handle permission errors gracefully1 parent 87ea236 commit 8f087f0
File tree
4 files changed
+66
-23
lines changed- .github/workflows
- bin
- rakelib
4 files changed
+66
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
41 | | - | |
42 | | - | |
43 | 39 | | |
44 | 40 | | |
45 | 41 | | |
| |||
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
62 | | - | |
63 | | - | |
64 | 58 | | |
65 | 59 | | |
66 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
| |||
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
24 | | - | |
| 30 | + | |
25 | 31 | | |
26 | | - | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
37 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
38 | 50 | | |
39 | 51 | | |
40 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
41 | 58 | | |
42 | 59 | | |
43 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
44 | 66 | | |
45 | 67 | | |
46 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
18 | 40 | | |
19 | 41 | | |
20 | 42 | | |
21 | 43 | | |
22 | 44 | | |
23 | | - | |
24 | | - | |
| 45 | + | |
| 46 | + | |
25 | 47 | | |
26 | 48 | | |
27 | 49 | | |
28 | 50 | | |
29 | | - | |
| 51 | + | |
30 | 52 | | |
31 | | - | |
32 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
33 | 59 | | |
34 | 60 | | |
35 | 61 | | |
| |||
45 | 71 | | |
46 | 72 | | |
47 | 73 | | |
48 | | - | |
49 | | - | |
| 74 | + | |
| 75 | + | |
50 | 76 | | |
51 | 77 | | |
52 | 78 | | |
53 | 79 | | |
54 | | - | |
| 80 | + | |
55 | 81 | | |
| 82 | + | |
56 | 83 | | |
57 | 84 | | |
58 | 85 | | |
| |||
0 commit comments