Repository navigation
CI: enforce HTTPS on the actionlint download's redirects (Sonar S6506) - #9
Conversation
SonarCloud flagged the pinned actionlint fetch: `curl -L` follows redirects to any scheme. `--proto '=https' --tlsv1.2` refuses a downgrade; the sha256 verification that follows is unchanged. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 11 hours and 58 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the CI actionlint download command to require HTTPS and TLS 1.2, preventing insecure redirect downgrades while retaining the existing version pin and SHA-256 integrity check. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
There was a problem hiding this comment.
🟡 Changes recommended
The curl hardening constrains the initial URL but does not yet explicitly constrain redirect protocols (missing --proto-redir), so the stated S6506 mitigation is incomplete.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR hardens the CI workflow’s actionlint binary download to prevent protocol downgrade via redirects, addressing SonarCloud rule githubactions:S6506 while keeping the pinned version and SHA256 verification intact.
Changes:
- Add curl protocol/TLS constraints to the
actionlintdownload step in the CI test workflow.
File summaries
| File | Description |
|---|---|
| .github/workflows/tests.yml | Tightens curl options used to download the pinned actionlint release artifact during CI. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| archive="actionlint_${version}_linux_amd64.tar.gz" | ||
| sha256=8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 | ||
| curl -sSL -o "$archive" \ | ||
| curl --proto '=https' --tlsv1.2 -sSL -o "$archive" \ |
Main gained the `secrets`-in-a-step-`if:` fix (#8) and the actionlint download hardening (#9) while this branch was written. The only conflict is the README line cap in tests/test_repo_hygiene.py, where both changes move it: 265 -> 267 for the SHAPE_LEGS_TOKEN paragraph's `env:` note, then 267 -> 324 for "Keeping a project's shape current". Both rationales are kept, because a cap whose reasons are dropped as it moves is not a cap. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ



SonarCloud on #8 raised githubactions:S6506 on the actionlint fetch in tests.yml:
curl -Lmay follow a redirect to an insecure scheme. This adds--proto '=https' --tlsv1.2so a downgrade is refused; the pinned version and sha256 check are unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ
Summary by Sourcery
Secure the CI actionlint download against redirects to insecure protocols.
Enhancements:
CI: