Commit 29d8005
committed
feat(vue-doctor): wire --push flag to push privacy-stripped findings to the SaaS
Adds three new flags:
--push POST findings to the SaaS after the audit
--push-url <url> Endpoint (default: https://app.the-doctor.report/api/v1/findings)
--api-key <key> API key for the x-api-key header
Defaults to --no-push. The push happens after the audit AND after the
reporter renders, so --format json --output report.json still writes the
file first. The audit's exit code is unaffected by push failure: 5xx,
network errors, and abort timeouts all log a warning but do not flip
the exit code.
If --push is set without --api-key, a warning prints to stderr and the
push is skipped (audit continues).
9 e2e tests in tests/push.integration.test.ts use a real local HTTP
server (http.createServer().listen(0)) to capture the request and assert
the 6-field privacy boundary, the x-api-key header, the URL, the CI env
forwarding, and that a giant codeSnippet in the source never appears in
the request body.
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>1 parent e6dbbd6 commit 29d8005
3 files changed
Lines changed: 427 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
291 | 295 | | |
292 | 296 | | |
293 | 297 | | |
| |||
485 | 489 | | |
486 | 490 | | |
487 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
488 | 528 | | |
489 | 529 | | |
490 | 530 | | |
| |||
706 | 746 | | |
707 | 747 | | |
708 | 748 | | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
709 | 764 | | |
710 | 765 | | |
711 | 766 | | |
| |||
798 | 853 | | |
799 | 854 | | |
800 | 855 | | |
801 | | - | |
802 | | - | |
| 856 | + | |
| 857 | + | |
803 | 858 | | |
804 | | - | |
| 859 | + | |
805 | 860 | | |
806 | 861 | | |
807 | 862 | | |
| |||
0 commit comments