Commit d279992
fix(infra): resolve file system race condition in env-sync
Replace existsSync + writeFileSync/appendFileSync with readFileSync
catch ENOENT + writeFileSync to eliminate TOCTOU race.
Fixes code-scanning #8, #9
Generated with oh-my-agent
Co-Authored-By: First Fluke <our.first.fluke@gmail.com>1 parent 90cae36 commit d279992
1 file changed
Lines changed: 7 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | | - | |
245 | | - | |
246 | | - | |
| 244 | + | |
| 245 | + | |
247 | 246 | | |
248 | 247 | | |
249 | 248 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
259 | 252 | | |
260 | 253 | | |
261 | 254 | | |
| |||
267 | 260 | | |
268 | 261 | | |
269 | 262 | | |
270 | | - | |
| 263 | + | |
271 | 264 | | |
272 | 265 | | |
273 | 266 | | |
| |||
0 commit comments