-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code refactor and improved resource file usage #601
Code refactor and improved resource file usage #601
Conversation
Refactor lots of code due to the custom serialization/deserialization logic implemented in the version 1.9.0.0 of the AppControl Manager. Moved lots of strings to the resource file to improve the ability of the app to be translated into other languages. Improved the Configure Policy Rule Options page, it now shows details and description of each rule option, helping you to decide which one is suitable for your usecase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 30 out of 45 changed files in this pull request and generated 1 comment.
Files not reviewed (15)
- AppControl Manager/AppControl Manager.csproj: Language not supported
- AppControl Manager/Pages/ConfigurePolicyRuleOptions.xaml: Language not supported
- AppControl Manager/Others/CheckPolicyDeploymentStatus.cs: Evaluated as low risk
- AppControl Manager/CustomUIElements/SigningDetailsDialogForRemoval.xaml.cs: Evaluated as low risk
- AppControl Manager/Pages/AllowNewApps/AllowNewAppsStart.xaml.cs: Evaluated as low risk
- AppControl Manager/MainWindow.xaml.cs: Evaluated as low risk
- AppControl Manager/Others/SupplementalForSelf.cs: Evaluated as low risk
- AppControl Manager/Others/PolicyFileSigningStatusDetection.cs: Evaluated as low risk
- AppControl Manager/Main/BasePolicyCreator.cs: Evaluated as low risk
- AppControl Manager/Pages/CreateSupplementalPolicy.xaml.cs: Evaluated as low risk
- AppControl Manager/Others/GlobalVars.cs: Evaluated as low risk
- AppControl Manager/Others/CodeIntegrityPolicy.cs: Evaluated as low risk
- AppControl Manager/Others/RemoveSupplementalSigners.cs: Evaluated as low risk
- AppControl Manager/Others/XmlFilePathExtractor.cs: Evaluated as low risk
- AppControl Manager/IntelGathering/PrepareEmptyPolicy.cs: Evaluated as low risk
Comments suppressed due to low confidence (2)
AppControl Manager/Pages/ConfigurePolicyRuleOptions.xaml.cs:84
- [nitpick] The dictionary key 'Enabled:UMCI' is inconsistent with the other keys. It should be renamed to 'Enabled:UMCIProtection' for consistency.
private static readonly Dictionary<string, string> RuleOptions = new()
AppControl Manager/Pages/ConfigurePolicyRuleOptions.xaml.cs:208
- The use of 'ToString()!' can cause a NullReferenceException. It should be replaced with 'checkBox.Tag?.ToString() ?? string.Empty'.
string key = checkBox.Tag.ToString()!
Implemented more resource strings by extracting them from the code and placing them in the resource file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 43 out of 57 changed files in this pull request and generated no comments.
Files not reviewed (14)
- AppControl Manager/AppControl Manager.csproj: Language not supported
- AppControl Manager/NativeMethods.json: Language not supported
- AppControl Manager/Pages/ConfigurePolicyRuleOptions.xaml: Language not supported
- AppControl Manager/Others/CheckPolicyDeploymentStatus.cs: Evaluated as low risk
- AppControl Manager/Pages/AllowNewApps/AllowNewAppsStart.xaml.cs: Evaluated as low risk
- AppControl Manager/CustomUIElements/SigningDetailsDialogForRemoval.xaml.cs: Evaluated as low risk
- AppControl Manager/MainWindow.xaml.cs: Evaluated as low risk
- AppControl Manager/Others/PolicyFileSigningStatusDetection.cs: Evaluated as low risk
- AppControl Manager/Others/SupplementalForSelf.cs: Evaluated as low risk
- AppControl Manager/Others/RemoveSupplementalSigners.cs: Evaluated as low risk
- AppControl Manager/Main/BasePolicyCreator.cs: Evaluated as low risk
- AppControl Manager/Others/CodeIntegrityPolicy.cs: Evaluated as low risk
- AppControl Manager/Others/GlobalVars.cs: Evaluated as low risk
- AppControl Manager/IntelGathering/KernelModeDrivers.cs: Evaluated as low risk
Comments suppressed due to low confidence (6)
AppControl Manager/Others/XmlFilePathExtractor.cs:19
- Ensure that the 'Allow' type is correctly defined and imported from the 'AppControlManager.SiPolicy' namespace to avoid compilation errors.
IEnumerable<Allow>? allowRules = policyObj.FileRules?.OfType<Allow>();
AppControl Manager/Pages/BuildNewCertificate.xaml.cs:87
- Ensure that the resource key 'ProcessingTitle' is correctly defined in the resource file.
StatusInfoBar.Title = GlobalVars.Rizz.GetString("ProcessingTitle");
AppControl Manager/Pages/BuildNewCertificate.xaml.cs:88
- Ensure that the resource key 'BuildingCertificate' is correctly defined in the resource file.
StatusInfoBar.Message = GlobalVars.Rizz.GetString("BuildingCertificate");
AppControl Manager/Pages/BuildNewCertificate.xaml.cs:109
- Ensure that the resource key 'ErrorTitle' is correctly defined in the resource file.
StatusInfoBar.Title = GlobalVars.Rizz.GetString("ErrorTitle");
AppControl Manager/Pages/BuildNewCertificate.xaml.cs:110
- Ensure that the resource key 'CertificateBuildError' is correctly defined in the resource file.
StatusInfoBar.Message = GlobalVars.Rizz.GetString("CertificateBuildError");
AppControl Manager/Pages/BuildNewCertificate.xaml.cs:133
- Ensure that the resource key 'CertificateBuildSuccess' is correctly defined in the resource file and that the concatenation with 'generatedCertThumbPrint' does not introduce any formatting issues.
StatusInfoBar.Message = GlobalVars.Rizz.GetString("CertificateBuildSuccess") + generatedCertThumbPrint + "'";
Refactor lots of code due to the custom serialization/deserialization logic implemented in the version 1.9.0.0 of the AppControl Manager. The result is a cleaner and better interop between different components.
Moved lots of strings to the resource file to improve the ability of the app to be translated into other languages.
Improved the Configure Policy Rule Options page, it now shows details and description of each rule option, helping you to decide which one is suitable for your use case.
Updated a NuGet dependency to the latest version.