Skip to content

fix(sec): enforce SHA256 verification in install.sh, remove silent skip paths#6191

Merged
houko merged 3 commits into
librefang:mainfrom
BunnyMoth:fix/install-sha256-hard-fail
Jun 20, 2026
Merged

fix(sec): enforce SHA256 verification in install.sh, remove silent skip paths#6191
houko merged 3 commits into
librefang:mainfrom
BunnyMoth:fix/install-sha256-hard-fail

Conversation

@BunnyMoth

Copy link
Copy Markdown
Contributor

Two silent skip paths in the SHA256 verification block are now hard failures:

  • Missing .sha256 file: prints the URL and exits 1
  • Missing hash tool (sha256sum/shasum): prints "install coreutils" and exits 1

Checksum mismatch was already a hard failure and is unchanged.
Syntax verified with bash -n.

@github-actions github-actions Bot added area/docs Documentation and guides size/S 10-49 lines changed has-conflicts PR has merge conflicts that need resolution labels Jun 18, 2026

@houko houko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CHANGELOG entry is a single line with no description and no issue number, while every other entry in this section follows the convention **title** (#NNNN) (@author). Sentence one. Sentence two. The (@mrchn) attribution is present (good), but the entry needs at least: the issue number it fixes (if one exists), and 1–2 sentences explaining the security problem that was fixed (the old code silently skipped SHA256 verification when no hash tool was found; that was the actual vulnerability). Please expand the entry to match the project convention before merge.


Generated by Claude Code

@BunnyMoth
BunnyMoth force-pushed the fix/install-sha256-hard-fail branch from 35f2f82 to ed2b6fd Compare June 18, 2026 23:45
@github-actions github-actions Bot added ready-for-review PR is ready for maintainer review and removed has-conflicts PR has merge conflicts that need resolution labels Jun 18, 2026

@houko houko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — correctly closes the integrity-check bypass.

The script previously proceeded silently in two cases: the .sha256 file missing from the release, and no sha256sum/shasum in PATH. Both now exit 1 with a clear message instead of installing an unverified binary, and the actual hash-comparison path is unchanged. This is the right security/convenience tradeoff for an installer and matches what #6179 asked for. CI green. Approving.

@houko
houko enabled auto-merge (squash) June 20, 2026 01:19
@houko
houko merged commit 783996f into librefang:main Jun 20, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation and guides ready-for-review PR is ready for maintainer review size/S 10-49 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants