Commit 44cd694
fix: Use randomized delimiter for GitHub Actions heredoc output
Fix heredoc delimiter injection vulnerability by using a cryptographically
random delimiter instead of fixed "EOF" string.
Security issue: A config file containing "EOF" on its own line could
prematurely terminate the heredoc and potentially inject arbitrary
GitHub Actions workflow commands.
Changes:
- Generate random 16-byte delimiter prefixed with "ghadelimiter_"
- Update tests to verify random delimiter format
- Add test case specifically for EOF injection attack
- Add reference to GitHub Actions multiline string documentation
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent e8f3784 commit 44cd694
2 files changed
+67
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
282 | | - | |
283 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
284 | 294 | | |
285 | 295 | | |
286 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
311 | 328 | | |
312 | 329 | | |
313 | 330 | | |
| |||
444 | 461 | | |
445 | 462 | | |
446 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
447 | 470 | | |
448 | 471 | | |
449 | 472 | | |
| |||
475 | 498 | | |
476 | 499 | | |
477 | 500 | | |
478 | | - | |
479 | | - | |
480 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
481 | 516 | | |
482 | | - | |
483 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
484 | 532 | | |
| 533 | + | |
| 534 | + | |
485 | 535 | | |
486 | 536 | | |
487 | 537 | | |
| |||
0 commit comments