-
Notifications
You must be signed in to change notification settings - Fork 21
Test/required check #8
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
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…into test/required-check
SharePoint plugin has been updated Project has been restructured Helpers for Gadgets and Plugins have been created to make the application cleaner Tags have replaced GadgetTypes
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.
Pull Request Overview
This PR implements a significant refactoring of the YSoNet project structure with several key improvements focused on code organization, consistency, and maintainability.
- Adds centralized helper classes (GadgetHelper and PluginHelper) to streamline gadget and plugin operations
- Replaces GadgetTypes with GadgetTags for better categorization
- Updates SharePoint plugin to support new CVE-2024-38018 vulnerability
Reviewed Changes
Copilot reviewed 80 out of 86 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| ysonet/ysonet.csproj | Adds new helper files, reorganizes generator structure into Base/ and Patched/ folders, includes SharePoint DLL dependencies |
| ysonet/Program.cs | Major refactoring to use new helper classes, improves argument validation and help system |
| ysonet/Helpers/GadgetHelper.cs | New centralized helper for gadget discovery, validation, and instantiation |
| ysonet/Helpers/PluginHelper.cs | New centralized helper for plugin discovery, validation, and instantiation |
| ysonet/Generators/Base/IGenerator.cs | Replaces GadgetTypes with GadgetTags for better semantic categorization |
| ysonet/Plugins/SharePointPlugin.cs | Adds support for CVE-2024-38018, updates gadget instantiation to use GadgetHelper |
| Multiple Generator files | Removes Name() method overrides (now auto-generated), updates labels to use GadgetTags |
| Multiple Plugin files | Reorganizes imports, updates to use new helper patterns |
| return null; | ||
| } | ||
| } | ||
| } |
Copilot
AI
Aug 1, 2025
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.
[nitpick] Consider adding XML documentation for the public class GadgetHelper to describe its purpose and usage patterns.
| .ToArray(); | ||
| } | ||
| } | ||
| } No newline at end of file |
Copilot
AI
Aug 1, 2025
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.
[nitpick] Consider adding XML documentation for the public class PluginHelper to describe its purpose and usage patterns.
| private int variant_number = 1; // Add variant support | ||
| string spoofedAssembly = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; | ||
| string spoofedAssembly = ""; |
Copilot
AI
Aug 1, 2025
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.
[nitpick] Consider using a const or readonly field for the default spoofedAssembly value instead of an empty string that gets conditionally set.
| string spoofedAssembly = ""; | |
| private const string DefaultSpoofedAssembly = ""; | |
| string spoofedAssembly = DefaultSpoofedAssembly; |
| } | ||
|
|
||
| string spoofedAssembly = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; | ||
| string spoofedAssembly = ""; |
Copilot
AI
Aug 1, 2025
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.
[nitpick] Consider using a const or readonly field for the default spoofedAssembly value instead of an empty string that gets conditionally set.
| string spoofedAssembly = ""; | |
| private const string DefaultSpoofedAssembly = ""; | |
| string spoofedAssembly = DefaultSpoofedAssembly; |
| // --- Load Microsoft.SharePoint.dll --- | ||
| string spPath = Path.Combine(dllsFolder, "Microsoft.SharePoint.dll"); | ||
| if (!File.Exists(spPath)) | ||
| throw new FileNotFoundException("Microsoft.SharePoint.dll not found", spPath); |
Copilot
AI
Aug 1, 2025
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.
Consider providing a more helpful error message that includes the expected location and installation instructions for Microsoft.SharePoint.dll.
| throw new FileNotFoundException("Microsoft.SharePoint.dll not found", spPath); | |
| throw new FileNotFoundException( | |
| $"Microsoft.SharePoint.dll not found at '{spPath}'.\n" + | |
| "Please ensure that Microsoft.SharePoint.dll (from SharePoint Server 2019) is present in the following folder:\n" + | |
| $" {dllsFolder}\n" + | |
| "You can obtain this DLL from a SharePoint Server installation. " + | |
| "Copy it from '[SharePoint Server Install Path]\\15\\ISAPI\\Microsoft.SharePoint.dll' to the above folder." | |
| ); |
| // --- Load Microsoft.SharePoint.ApplicationPages.dll --- | ||
| string appPagesPath = Path.Combine(dllsFolder, "Microsoft.SharePoint.ApplicationPages.dll"); | ||
| if (!File.Exists(appPagesPath)) | ||
| throw new FileNotFoundException("Microsoft.SharePoint.ApplicationPages.dll not found", appPagesPath); |
Copilot
AI
Aug 1, 2025
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.
Consider providing a more helpful error message that includes the expected location and installation instructions for Microsoft.SharePoint.ApplicationPages.dll.
| throw new FileNotFoundException("Microsoft.SharePoint.ApplicationPages.dll not found", appPagesPath); | |
| throw new FileNotFoundException( | |
| $"Microsoft.SharePoint.ApplicationPages.dll not found at '{appPagesPath}'.\n" + | |
| $"Please ensure that the DLL is present in the expected folder: '{dllsFolder}'.\n" + | |
| "You can obtain this DLL from a SharePoint installation (typically located in the SharePoint server's '15\\ISAPI' directory). " + | |
| "Copy it to the specified dllsFolder and try again.", | |
| appPagesPath); |
SharePoint plugin has been updated
Project has been restructured
Helpers for Gadgets and Plugins have been created to make the application cleaner
Tags have replaced GadgetTypes