Repository navigation
Enforce HTTPS on curl downloads/redirects in calibration and test scripts (SonarCloud S6506) - #47
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…ipts Add --proto '=https' --proto-redir '=https' to curl calls that follow redirects (-L), so a redirect can never downgrade to plain HTTP or another protocol. Fixes SonarCloud shell:S6506 alerts. Co-Authored-By: jason.han <hanhuijun@gmail.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Project Requirements: PASSPR #47 adds
3. Test coverage
Evaluated at Criteria: |
Summary
Fixes 17 SonarCloud
shell:S6506alerts. Each flaggedcurl -Lcall now passes--proto '=https' --proto-redir '=https', so neither the first request nor any redirect it follows can drop to plain HTTP or switch to another protocol. Every URL already useshttps://github.com/NASA-AMMOS/VICAR/releases/download/..., and GitHub redirects those tohttps://release-assets.githubusercontent.com, so downloads work the same as before. No suppression comments, and no Dockerfiles were touched.The two hint lines that
test-release-regression.shprints for manual downloads (L271/L278) now include the same flags. These lines were not flagged.No alerts were left as false positives.
Verification
bash -npasses on all 7 changed scripts../fetch-calibration.sh --liststill finds and sizes every mission against the live 5.0 release. This covers the HEAD probe, the multipart-suffix probe and the Content-Length lookup (including the multipart m20 asset).https://release-assets.githubusercontent.com/...and gets 200. A body GET streams data as expected. The same flags make curl fail on anhttp://URL.--proto/--proto-redirneed curl 7.20.2 or newer. Oracle Linux 8 ships 7.61.Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/da07e7c14494495c8ff5a9a09d48ff69
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/da07e7c14494495c8ff5a9a09d48ff69?variant=devin
Requested by: @HuiJun
🟢 Devin Review found nothing to fix · View findings