Commit df907ad
Add parameter validation to CMake helper functions
Added robust parameter validation with type constraints to all CMake helper functions:
- Parse-CMakeFetchContent: Validates file path exists and dependency name format
- Find-TagForHash: Validates repository URL and 40-char hash format
- Test-HashAncestry: Validates repository URL and hash formats
- Update-CMakeFile: Validates file path, dependency name, and new value
This prevents misuse, improves error handling, and addresses security concerns around parameter injection attacks.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent cd95e70 commit df907ad
1 file changed
+52
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
4 | 14 | | |
5 | 15 | | |
6 | 16 | | |
| |||
37 | 47 | | |
38 | 48 | | |
39 | 49 | | |
40 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
41 | 61 | | |
42 | 62 | | |
43 | 63 | | |
| |||
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
60 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
61 | 95 | | |
62 | 96 | | |
63 | 97 | | |
| |||
92 | 126 | | |
93 | 127 | | |
94 | 128 | | |
95 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
96 | 144 | | |
97 | 145 | | |
98 | 146 | | |
| |||
0 commit comments