Skip to content

fix(version-check): preserve HTTPS guard in test - #151

Merged
shadowhand merged 3 commits into
mainfrom
alert-autofix-16
Oct 13, 2026
Merged

shadowhand merged 3 commits into
mainfrom
alert-autofix-16

Conversation

@shadowhand

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/RoundingWell/app-cli/security/code-scanning/16

Enforce HTTPS in fetch_latest_version before issuing the request, and update the test URL literal to HTTPS to avoid tainting with an HTTP source.

Best minimal fix (without changing intended functionality):

  1. In src/version_check.rs, inside fetch_latest_version, add an early return if url does not start with https://.
  2. In the cache-hit test, change "http://unused" to "https://unused".

This preserves behavior:

  • Valid GitHub URL continues to work unchanged.
  • Non-HTTPS inputs now safely fail with None rather than making insecure requests.
  • Test intent (cache hit, no server needed) remains identical.

No new imports or dependencies are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Potential fix for code scanning alert no. 16: Failure to use HTTPS URLs

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@shadowhand
shadowhand marked this pull request as ready for review October 13, 2026 08:34
Co-authored-by: shadowhand <38203+shadowhand@users.noreply.github.com>
@shadowhand shadowhand changed the title Potential fix for code scanning alert no. 16: Failure to use HTTPS URLs fix(version-check): preserve HTTPS guard in test Oct 13, 2026
Comment thread src/version_check.rs Outdated
Co-authored-by: shadowhand <38203+shadowhand@users.noreply.github.com>
@shadowhand
shadowhand merged commit 1952ee7 into main Oct 13, 2026
6 checks passed
@shadowhand
shadowhand deleted the alert-autofix-16 branch October 13, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants