Commit 963f626
committed
Gate process plugins via api.GenerateOptions.InsecureProcessPluginNames
Add an explicit allowlist of process-based plugin names to
api.GenerateOptions. Generate fails before any parse or codegen runs if
the configuration declares a process plugin whose name is not in the
list. The "Insecure" prefix mirrors crypto/tls.Config.InsecureSkipVerify
to flag the trust decision callers are making — process plugins execute
arbitrary local commands.
The CLI populates the allowlist by scanning the user's own config for
declared process plugins, so `sqlc generate`, `sqlc compile`, and
`sqlc diff` keep working. SQLCDEBUG=processplugins=0 still disables
process plugins by leaving the allowlist nil.
https://claude.ai/code/session_01RCzB2JR5Y5ScFDUmwcxGVZ1 parent 9848cd6 commit 963f626
3 files changed
Lines changed: 73 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
| |||
72 | 82 | | |
73 | 83 | | |
74 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
75 | 97 | | |
76 | 98 | | |
77 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
185 | 200 | | |
186 | 201 | | |
187 | 202 | | |
188 | 203 | | |
189 | 204 | | |
190 | 205 | | |
191 | 206 | | |
| 207 | + | |
192 | 208 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
197 | 214 | | |
198 | 215 | | |
199 | 216 | | |
| |||
209 | 226 | | |
210 | 227 | | |
211 | 228 | | |
| 229 | + | |
212 | 230 | | |
213 | | - | |
214 | | - | |
215 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
216 | 235 | | |
217 | 236 | | |
218 | 237 | | |
| |||
228 | 247 | | |
229 | 248 | | |
230 | 249 | | |
| 250 | + | |
231 | 251 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
236 | 257 | | |
237 | 258 | | |
238 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
109 | 128 | | |
110 | 129 | | |
111 | 130 | | |
| |||
0 commit comments