GEO-155: fix compute_min_safe_electron_major algorithm#5
Open
Geoion wants to merge 10 commits into
Open
Conversation
…te_min_safe_electron_major - Regex now matches "< X.Y.Z" and "< X.Y.Z-beta.N" style ranges. - Output semantic changed from max_major + 1 to max_major, so 41.0.0 being patched means minSafeElectronMajor = 41 (not 42). - Script can be sourced by test scripts; main execution is guarded. Refs GEO-155
Covers: - pre-release suffix parsing (< 41.0.0-beta.8 -> 41) - plain 3-segment version (< 38.8.6 -> 38) - mixed ranges taking the maximum major - merging across multiple CVE entries - missing-file fallback to 39 Refs GEO-155
Running scripts/update_security_rules.sh with --date 2026-07-15 --version 2026.07.15 confirms minSafeElectronMajor stays at 39 on original main data (no Resources/CVE/electron.json present). Refs GEO-155
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the Electron minimum-safe-major computation in
scripts/update_security_rules.sh.Changes
< 41.0.0-beta.8).max_major + 1tomax_major, so a patched41.0.0meansminSafeElectronMajor = 41(not 42).scripts/test_compute_min_safe.shwith 5 bash unit tests covering pre-release suffixes, plain versions, mixed ranges, multi-entry merges, and missing-file fallback.2026.07.15;minSafeElectronMajorremains 39 on current main data.Verification
bash scripts/test_compute_min_safe.sh→ 5 passed, 0 failedbash scripts/update_security_rules.sh --date 2026-07-15 --version 2026.07.15 --stamp-cves→ succeeds,minSafeElectronMajor=39xcodebuild -project FrameworkScanner.xcodeproj -scheme FrameworkScanner -configuration Debug -destination 'platform=macOS' build→ BUILD SUCCEEDEDCommits
Refs GEO-155