Commit 3216933
fix(ci): harden ci-pipeline downloads and bun installs (#899)
Clears all 6 MAJOR findings behind SonarCloud's failing quality gate on
PR #899 (new_security_rating 3 = C, required <= 1 = A). All six are in
this file, which this PR introduced, so none is pre-existing debt.
S6506 x2 -- curl followed redirects with no scheme restriction, so a
redirect could downgrade https to http. Both downloads are sha256
checked, which bounds the damage but does not remove the exposure: the
bytes still travel in clear. Now --proto '=https' --proto-redir
'=https' --tlsv1.2, which refuses the downgrade on the initial request
AND on every hop.
S6505 -- `bun install` ran lifecycle scripts. The comment defending
that is falsified: MEASURED against the registry today, rescript 11.1.4
declares postinstall 'node scripts/rescript_postinstall.js' but 12.3.1
declares none, shipping per-platform optionalDependencies instead. The
flag therefore only costs anything on the superseded major, and
ReScript is a banned language here regardless -- this job lints
grandfathered sources. Scripts now off, with a hard error (not a silent
skip) if the compiler is absent afterwards.
S8543 x3 -- `bun install` could resolve a floating range and `bunx
rescript` fetches latest from the registry. Together those let CI lint
with a DIFFERENT compiler than the repo pins, so this is a correctness
defect as much as a supply-chain one. Now --frozen-lockfile, and
`bunx --no-install` at all four call sites (Sonar flagged two; the
other two share the defect and are fixed with them).
Verified: YAML parses; all 14 run blocks pass `bash -n`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ji1bq3TypfycfUPAR7hSxR1 parent 0f904e1 commit 3216933
1 file changed
Lines changed: 27 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
540 | | - | |
541 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
542 | 561 | | |
543 | 562 | | |
544 | 563 | | |
| |||
549 | 568 | | |
550 | 569 | | |
551 | 570 | | |
552 | | - | |
| 571 | + | |
553 | 572 | | |
554 | 573 | | |
555 | 574 | | |
556 | 575 | | |
557 | 576 | | |
558 | | - | |
559 | | - | |
| 577 | + | |
| 578 | + | |
560 | 579 | | |
561 | 580 | | |
562 | 581 | | |
| |||
601 | 620 | | |
602 | 621 | | |
603 | 622 | | |
604 | | - | |
| 623 | + | |
605 | 624 | | |
606 | 625 | | |
607 | 626 | | |
| |||
0 commit comments