Skip to content

GEO-155: fix compute_min_safe_electron_major algorithm#5

Open
Geoion wants to merge 10 commits into
mainfrom
fix/GEO-155-min-safe-electron-major-algo
Open

GEO-155: fix compute_min_safe_electron_major algorithm#5
Geoion wants to merge 10 commits into
mainfrom
fix/GEO-155-min-safe-electron-major-algo

Conversation

@Geoion

@Geoion Geoion commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the Electron minimum-safe-major computation in scripts/update_security_rules.sh.

Changes

  • Regex now supports 3-segment versions and pre-release suffixes (e.g. < 41.0.0-beta.8).
  • Output semantic changed from max_major + 1 to max_major, so a patched 41.0.0 means minSafeElectronMajor = 41 (not 42).
  • Added scripts/test_compute_min_safe.sh with 5 bash unit tests covering pre-release suffixes, plain versions, mixed ranges, multi-entry merges, and missing-file fallback.
  • Refreshed security rules metadata to 2026.07.15; minSafeElectronMajor remains 39 on current main data.

Verification

  • bash scripts/test_compute_min_safe.sh → 5 passed, 0 failed
  • bash scripts/update_security_rules.sh --date 2026-07-15 --version 2026.07.15 --stamp-cves → succeeds, minSafeElectronMajor=39
  • xcodebuild -project FrameworkScanner.xcodeproj -scheme FrameworkScanner -configuration Debug -destination 'platform=macOS' buildBUILD SUCCEEDED

Commits

  • algo fix
  • unit tests
  • metadata refresh
  • per-file CVE recordedAt stamps

Refs GEO-155

Geoion added 10 commits July 16, 2026 04:30
…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
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.

1 participant