feat: add "privacy" security preset to disable Windows telemetry (#43)#63
feat: add "privacy" security preset to disable Windows telemetry (#43)#63Prateek2007-cmd wants to merge 1 commit into
Conversation
|
Hi @DotDev262👋 The implementation for this feature has been completed and submitted in this PR. Kindly review the changes, and if everything looks good, please add the relevant labels such as |
|
Could you give an executed output screenshot |
Hi @DotDev262👋
I’ve completed the implementation and successfully verified the changes locally. All tests are passing successfully, including the related preset and registry behavior tests. If everything looks good from your side, kindly review the PR and please add the relevant GSSoC labels such as |
|
In the output , it tells the unit test hasn't tested the privacy profile , can you like execute it in a vm to see if it changes those registry values. Iam asking in a vm since the tool can corrupt your windows install if the config is setup wrongly |
|
That makes sense, thanks for pointing it out. The current tests follow the same pattern used by the existing I avoided performing direct registry modification tests during unit testing to keep the test suite environment-safe and consistent with the existing architecture. That said, I understand the concern regarding potentially unsafe registry configurations. I can additionally validate the preset behavior in an isolated VM environment and confirm that the registry values are applied correctly without affecting system stability. |

Summary
Closes #43
Adds a new
"privacy"security preset to_securityPresetsinSystemSettingsService.csthat disables common Windows telemetry and privacy-intrusive features via safe, non-destructive registry tweaks.Changes
src/Services/System/SystemSettingsService.csAdded a
"privacy"entry to the_securityPresetsdictionary with 8 registry tweaks:HKLM\...\DataCollectionAllowTelemetry0HKCU\...\AdvertisingInfoEnabled0HKLM\...\Windows\SystemEnableActivityFeed0HKLM\...\Windows\SystemUploadUserActivities0HKCU\...\PrivacyTailoredExperiencesWithDiagnosticDataEnabled0HKCU\...\Siuf\RulesNumberOfSIUFInPeriod0HKCU\...\InputPersonalizationRestrictImplicitTextCollection1HKCU\...\TrainedDataStoreHarvestContacts0tests/WinHome.Tests/SystemSettingsServiceTests.csAdded 3 new unit tests:
GetTweaksAsync_Should_Return_Privacy_Preset_Tweaks— verifies exactly 8 tweaks are returnedGetTweaksAsync_Privacy_Preset_Should_Contain_Expected_Registry_Keys— asserts each registry key/value individuallyGetTweaksAsync_Should_Return_Empty_For_Unknown_Preset— edge case for unknown presetsDesign Decisions
privacyis independent frombaseline/strict, so users can apply privacy tweaks without affecting security hardening and vice versadwordtype — consistent with existing presets; no string-type valuesbaselineandstrictUsage