Skip to content

Improve Windows version detection#373

Merged
zupo merged 1 commit intomainfrom
fix/win_version
Sep 18, 2025
Merged

Improve Windows version detection#373
zupo merged 1 commit intomainfrom
fix/win_version

Conversation

@zupo
Copy link
Member

@zupo zupo commented Sep 18, 2025

Windows 11 reports itself as Windows 10 to maintain compatibility with legacy applications. We have to look into buildNumber to differentiate between Windows 10 and Windows 11.

Refs https://github.com/teamniteo/pareto/issues/811

@zupo zupo requested a review from dz0ny September 18, 2025 09:58
@zupo zupo changed the title We don't support Win 10, so the version should always be 11. We don't support Win 10, so the version should always be 11 Sep 18, 2025
@github-actions
Copy link

github-actions bot commented Sep 18, 2025

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ParetoSecurity/agent/shared 56.42% (-1.29%) 👎
Total 46.13%

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ParetoSecurity/agent/shared/device_all.go 27.59% (-4.41%) 58 (+8) 16 42 (+8) 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/ParetoSecurity/agent/shared/device_windows_test.go

Windows 11 reports itself as Windows 10 to maintain compatibility
with legacy applications. We have to look into `buildNumber` to
differentiate between Windows 10 and Windows 11.

Ref: teamniteo/pareto#800
@zupo zupo changed the title We don't support Win 10, so the version should always be 11 Improve Windows version detection Sep 18, 2025
@zupo zupo requested a review from dz0ny September 18, 2025 20:08
@zupo zupo merged commit 5e4254d into main Sep 18, 2025
60 of 64 checks passed
@zupo zupo deleted the fix/win_version branch September 18, 2025 20:17
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.

2 participants