Skip to content

fix(bootstrap): refuse non-HTTPS redirects when fetching mise - #216

Open
hyperpolymath wants to merge 2 commits into
mainfrom
fix/bootstrap-https-only
Open

hyperpolymath wants to merge 2 commits into
mainfrom
fix/bootstrap-https-only

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

scripts/bootstrap.sh fetched the mise release with curl --location, which follows redirects to any protocol. A redirect could downgrade the download to plain HTTP. This adds --proto '=https' --tlsv1.2 so curl refuses that. The SHA-256 check still guards the archive itself.

SonarCloud flags this as shell:S6506 on gitbot-fleet's vendored copy (bots/echidnabot/scripts/bootstrap.sh), where it fails the main quality gate. The copy there is pinned to this repo by FLEET-SYNC.json, so the fix lands here first and gitbot-fleet re-pins afterwards.

Verification

  • bash -n scripts/bootstrap.sh passes.
  • bash tests/dev-tools.sh exits 0.
  • With the new flags, the real download (mise-v2026.10.6-linux-x64.tar.gz) still succeeds: HTTP 200 after the redirect to GitHub's release-asset host.

Also: stale actions.lock entries

governance / Actions lockfile verify failed on this PR independently of the curl change. Seven workflows (codeql, governance, hypatia-scan, mirror, rust-ci, scorecard, secret-scanner) now hold only job-level reusable calls, but actions.lock still bound each one to hyperpolymath/standards@740c9d7, which no uses: line names. A second commit records each of them as [] and drops the 14 dependency entries that only that pin reached.

gh actions-lock wasn't available where this was made, so the entries were removed by hand and the CI verifier is the check. The owner approved this exception to the "lockfiles are tool-owned" rule for this PR. If you'd rather regenerate the file with the tool, that replaces this commit.


Generated by Claude Code

@gitnotebooks

gitnotebooks Bot commented Nov 26, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Files ignored due to path filters: 1

  • .github/workflows/actions.lock is excluded by !**/*.lock
Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 544974dc-8e5d-4f3c-ab60-a3776404725d
Commits

Reviewing files that changed from the base of the PR and between f0f8f6f and 3121dac.

Files ignored due to path filters: 1

  • .github/workflows/actions.lock is excluded by !**/*.lock

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Security
    • Bootstrap downloads now require HTTPS and TLS 1.2 or later. Retry and timeout settings remain unchanged.

The mise download in scripts/bootstrap.sh now restricts curl to HTTPS and requires TLS 1.2 or later. The existing retry and timeout options remain unchanged.

Changes: Bootstrap download

Layer / File(s) Summary
Curl transport requirements
scripts/bootstrap.sh
The mise download now uses HTTPS and requires TLS 1.2 or later. Retry and timeout settings remain unchanged.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: Minimal · previous review f0f8f · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the mise fetch in scripts/bootstrap.sh now refuses non-HTTPS redirects. The raw summary confirms the curl call is restricted to HTTPS and TLS 1.2 or later. The convent…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description matches the changeset. It explains that scripts/bootstrap.sh gains curl --proto '=https' --tlsv1.2 to stop redirects from downgrading the mise download to plain HTTP. It also gives the…
Full details: Title check

Explanation

The title names the main change: the mise fetch in scripts/bootstrap.sh now refuses non-HTTPS redirects. The raw summary confirms the curl call is restricted to HTTPS and TLS 1.2 or later. The conventional-commit prefix 'fix(bootstrap)' matches the scope of the change. The title is specific and concise.

Full details: Description check

Explanation

The description matches the changeset. It explains that scripts/bootstrap.sh gains curl --proto '=https' --tlsv1.2 to stop redirects from downgrading the mise download to plain HTTP. It also gives the SonarCloud rule shell:S6506 as the motivation, lists verification steps, and covers a separate actions.lock cleanup commit. The description is specific and on-topic, so it passes.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: dfffc3cd-8f78-411c-993f-da68ab07d952
Commits

Reviewing files that changed from the base of the PR and between 7a5b8c4 and 90b0753.

Files selected for processing: 1

  • scripts/bootstrap.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 6

  • GitHub Check: Deposit findings for gitbot-fleet
  • GitHub Check: CodeRabbit
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: analyze / analyze
  • GitHub Check: hypatia / Hypatia Neurosymbolic Analysis
  • GitHub Check: Dependency audit
CI failures not shown inline: 1

GitHub Actions: Governance / governance _ Actions lockfile verify: fix(bootstrap): refuse non-HTTPS redirects when fetching mise

Conclusion: failure

View job details

##[group]Run set -uo pipefail
 �[36;1mset -uo pipefail�[0m
 �[36;1m# Stage the gate, the verifier and the exemption ledger. When THIS�[0m
 �[36;1m# repository is standards, its own working tree already holds all�[0m
 �[36;1m# three (self-lint); every other caller uses the pinned checkout.�[0m
 �[36;1mif [ "${GITHUB_REPOSITORY_ID:-}" = "1116521501" ] || [ "$GITHUB_REPOSITORY" = hyperpolymath/standards ] || [ "$GITHUB_REPOSITORY" = metadatastician/standards ]; then�[0m
 �[36;1m  SRC=scripts�[0m
 �[36;1m  LEDGERSRC=.machine_readable�[0m
 �[36;1m  echo "Using this repository's own gate + verifier + ledger (standards self-lint)."�[0m
 �[36;1melse�[0m
 �[36;1m  SRC=.standards-lock/scripts�[0m
 �[36;1m  LEDGERSRC=.standards-lock/.machine_readable�[0m
 �[36;1mfi�[0m
 �[36;1mfor f in check-actions-lock-gate.sh update-actions-lock.sh; do�[0m
 �[36;1m  if [ ! -f "$SRC/$f" ]; then�[0m
 �[36;1m    echo "::error::actions-lock gate: $f not found in $SRC (pinned standards checkout failed?)"�[0m
 �[36;1m    exit 1�[0m
 �[36;1m  fi�[0m
 �[36;1m  cp "$SRC/$f" "$RUNNER_TEMP/$f"�[0m
 �[36;1mdone�[0m
 �[36;1m# A MISSING ledger must not silently exempt everyone, nor silently�[0m
 �[36;1m# exempt no one. Stage an empty file and let the gate below print�[0m
 �[36;1m# the denominator it actually read — a skip is not a pass.�[0m
 �[36;1mif [ -f "$LEDGERSRC/lock-allow.txt" ]; then�[0m
 �[36;1m  cp "$LEDGERSRC/lock-allow.txt" "$RUNNER_TEMP/lock-allow.txt"�[0m
 �[36;1melse�[0m
 �[36;1m  echo "::warning::actions-lock exemption ledger not found; treating it as EMPTY (no repo is exempt)."�[0m
 �[36;1m  : > "$RUNNER_TEMP/lock-allow.txt"�[0m
 �[36;1mfi�[0m
 �[36;1mrm -rf .standards-lock�[0m
 �[36;1m�[0m
 �[36;1m# ONE implementation of the lock/pin predicate, not two.�[0m
 �[36;1m#�[0m
 �[36;1m# The gate used to live inside workflow-lint with its own inline copy�[0m
 �[36;1m# of the logic. That copy matched `^[[:space:]]+uses:` — with no�[0m
 �[36;1m# `-?` — so it never saw `- uses: foo@v1`, the co...

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Nov 26, 2026

Copy link
Copy Markdown
Owner Author

Dependency audit fails here, but not because of this PR. It already fails on main at 7a5b8c4, and this PR does not change Cargo.lock. cargo-audit reports 4 vulnerabilities in the locked dependencies: RUSTSEC-2026-0538, -0544, -0592 and -0594, in cookie, libz-sys, quinn-udp and url. It also gives 2 warnings, for chrono and rustix. A lockfile bump belongs in a separate PR.


Generated by Claude Code

curl --location followed redirects to any protocol, so a redirect could
downgrade the release download to plain HTTP (SonarCloud shell:S6506).
Restrict curl to HTTPS with TLS 1.2 or later. The SHA-256 check still
guards the archive itself.
codeql, governance, hypatia-scan, mirror, rust-ci, scorecard and
secret-scanner now hold only job-level reusable calls (metadatastician
/standards and proven-cicd-and-workflows), but actions.lock still bound
each to metadatastician/standards@740c9d7, which no uses: line names. The
governance "Actions lockfile verify" gate fails on all seven.

Record each as [] (the reusables-only form) and drop the fourteen
dependency entries that only that stale pin reached.

gh actions-lock was not available where this was made, so the entries
were removed by hand; the CI verifier is the check.
@hyperpolymath
hyperpolymath force-pushed the fix/bootstrap-https-only branch from f0f8f6f to 3121dac Compare November 27, 2026 11:48
@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

4 participants