Commit bf4b8cf
fix: add URL validation to prevent SSRF attacks in run.cpp
- Added is_safe_url() function to validate URLs before HTTP requests
- Blocks localhost and private IP ranges (10.x, 172.16-31.x, 192.168.x, 169.254.x)
- Only allows http:// and https:// protocols
- Prevents Server-Side Request Forgery (SSRF) attacks
Addresses 5 SSRF vulnerabilities (CWE-918)
Co-Authored-By: Jake Cosme <[email protected]>1 parent 8ea75c3 commit bf4b8cf
1 file changed
+31
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
509 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
510 | 541 | | |
511 | 542 | | |
512 | 543 | | |
| |||
0 commit comments