Feature/upgrade dependencies#23
Conversation
Co-authored-by: AThraen <5888420+AThraen@users.noreply.github.com>
Co-authored-by: AThraen <5888420+AThraen@users.noreply.github.com>
…ackages Upgrade to .NET 8 and fix SixLabors security vulnerabilities
Summary of ChangesHello @AThraen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on modernizing the project by upgrading its core framework to .NET 8 and updating several critical dependencies. The primary objectives are to enhance security by patching known vulnerabilities in the SixLabors libraries and to improve maintainability through a more flexible dependency management strategy. These changes bring the project up-to-date with the latest .NET ecosystem, contributing to overall stability and performance. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request successfully upgrades the project to .NET 8 and updates several dependencies, including SixLabors packages to address security vulnerabilities. My review focuses on two main points:
- The use of open-ended versioning for the
SixLaborsdependencies, which can introduce instability. I've recommended pinning them to specific versions. - The addition of the
System.Drawing.Commonpackage. This is a critical issue as it breaks cross-platform compatibility, which is a key feature of this library. I've provided guidance on how to remove this dependency by refactoring a color validation method to useImageSharp's own capabilities.
Overall, the dependency upgrades are a great improvement, but the two issues above should be addressed before merging.
src/Geta.Optimizely.ContentTypeIcons/Geta.Optimizely.ContentTypeIcons.csproj
Outdated
Show resolved
Hide resolved
src/Geta.Optimizely.ContentTypeIcons/Geta.Optimizely.ContentTypeIcons.csproj
Outdated
Show resolved
Hide resolved
Co-authored-by: AThraen <5888420+AThraen@users.noreply.github.com>
…ests Co-authored-by: AThraen <5888420+AThraen@users.noreply.github.com>
…pendency Replace System.Drawing.Common with ImageSharp for color validation
There was a problem hiding this comment.
Pull request overview
Upgrades the solution to .NET 8 and refreshes several dependencies (notably SixLabors) as part of addressing reported vulnerabilities, including updating color parsing to rely on ImageSharp for cross-platform support.
Changes:
- Retargeted projects from
net6.0tonet8.0. - Updated SixLabors packages (and made their versions open-ended) and refreshed test dependencies.
- Switched HTML color validation to
SixLabors.ImageSharp.Color.TryParseand expanded unit tests for named colors.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Geta.Optimizely.ContentTypeIcons.Tests/ThumbnailIconControllerTests.cs | Adds coverage for named-color parsing and minor test cleanup. |
| tests/Geta.Optimizely.ContentTypeIcons.Tests/Geta.Optimizely.ContentTypeIcons.Tests.csproj | Retargets to net8 and upgrades test/coverage packages. |
| src/Geta.Optimizely.ContentTypeIcons/Geta.Optimizely.ContentTypeIcons.csproj | Retargets to net8; updates SixLabors dependencies to open-ended version ranges. |
| src/Geta.Optimizely.ContentTypeIcons/Controllers/ContentTypeIconController.cs | Replaces regex/System.Drawing-based color validation with ImageSharp parsing. |
| src/Geta.Optimizely.ContentTypeIcons.EnumGenerator/Geta.Optimizely.ContentTypeIcons.EnumGenerator.csproj | Retargets to net8 and upgrades Newtonsoft/Octokit. |
| sandbox/Alloy/AlloyMvcTemplates.csproj | Retargets sandbox to net8. |
| README.md | Updates the platform badge to .NET 8. |
| CHANGELOG.md | Adds a 3.0.0 entry describing the upgrade and dependency changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Geta.Optimizely.ContentTypeIcons/Geta.Optimizely.ContentTypeIcons.csproj
Outdated
Show resolved
Hide resolved
...imizely.ContentTypeIcons.EnumGenerator/Geta.Optimizely.ContentTypeIcons.EnumGenerator.csproj
Outdated
Show resolved
Hide resolved
…peIcons.csproj Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…zely.ContentTypeIcons.EnumGenerator.csproj Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
I upgraded to .net 8 (as .net 6 is end of life a long time ago). And updated dependencies to Sixlabor to avoid vulnerabilities - also made the dependency open-ended to avoid future issues.