Add patched version column to vulnerability summary with multi-range support#5
Conversation
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
|
@copilot does this support advisories that have multiple packages with multiple version ranges? Ensure this is part of testing. would it detect that the NuGet package Ex: Full api reponse for this Advisories api for this GHSA: gh api /advisories/GHSA-gwq6-fmvp-qp68 { |
Handle scenarios where the same package has multiple vulnerable version ranges with different patched versions (e.g., GHSA-gwq6-fmvp-qp68 with .NET packages). - Store all vulnerability entries with version ranges, not just one per ecosystem - Implement version range matching to select correct patch version - Match package by ecosystem, name, AND version range - Add comprehensive test for multi-range scenario Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Yes, this now supports advisories with multiple packages and version ranges. For GHSA-gwq6-fmvp-qp68:
The implementation:
Implemented in commit 10100aa with comprehensive test coverage for this scenario. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot looks like a bug - testing on this repo it shows Patched Version = N/A instead of the patch version which is 112.0.0 this is where i am testing: dotnet-felickz/vulnerable-dependencies#16: Advisory db: GHSA-4rr6-2v9v-wcpc which should be in the api response for this advisory Testing that PR via calling this branch: - name: 'Dependency Review'
uses: forks-felickz/dependency-review-action@copilot/add-patched-versions-columnFull api details: [{"change_type":"added","manifest":".github/workflows/dependency-review.yml","ecosystem":"actions","name":"forks-felickz/dependency-review-action","version":"copilot/add-patched-versions-column","package_url":"pkg:githubactions/forks-felickz/dependency-review-action@copilot%2Fadd-patched-versions-column","license":null,"source_repository_url":null,"scope":"runtime","vulnerabilities":[]},{"change_type":"removed","manifest":".github/workflows/dependency-review.yml","ecosystem":"actions","name":"actions/dependency-review-action","version":"4.*.*","package_url":"pkg:githubactions/actions/dependency-review-action","license":null,"source_repository_url":"https://github.com/actions/dependency-review-action","scope":"runtime","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"System.Net.Http","version":"4.3.3","package_url":"pkg:nuget/System.Net.Http@4.3.3","license":"LicenseRef-github-OTHER","source_repository_url":"https://github.com/dotnet/corefx","scope":"development","vulnerabilities":[{"severity":"high","advisory_ghsa_id":"GHSA-7jgj-8wvc-jh57","advisory_summary":".NET Core Information Disclosure","advisory_url":"https://github.com/advisories/GHSA-7jgj-8wvc-jh57"}]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"System.Text.Json","version":"8.0.0","package_url":"pkg:nuget/System.Text.Json@8.0.0","license":"MIT","source_repository_url":"https://github.com/dotnet/runtime","scope":"development","vulnerabilities":[{"severity":"high","advisory_ghsa_id":"GHSA-hh2w-p6rv-4g7w","advisory_summary":"Microsoft Security Advisory CVE-2024-30105 | .NET Denial of Service Vulnerability","advisory_url":"https://github.com/advisories/GHSA-hh2w-p6rv-4g7w"},{"severity":"high","advisory_ghsa_id":"GHSA-8g4q-xg66-9fp4","advisory_summary":"Microsoft Security Advisory CVE-2024-43485 | .NET Denial of Service Vulnerability","advisory_url":"https://github.com/advisories/GHSA-8g4q-xg66-9fp4"}]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"RestSharp","version":"111.4.1","package_url":"pkg:nuget/RestSharp@111.4.1","license":"Apache-2.0","source_repository_url":"https://github.com/restsharp/RestSharp","scope":"runtime","vulnerabilities":[{"severity":"moderate","advisory_ghsa_id":"GHSA-4rr6-2v9v-wcpc","advisory_summary":"CRLF Injection in RestSharp's `RestRequest.AddHeader` method","advisory_url":"https://github.com/advisories/GHSA-4rr6-2v9v-wcpc"}]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"System.Text.Encodings.Web","version":"8.0.0","package_url":"pkg:nuget/System.Text.Encodings.Web@8.0.0","license":"MIT","source_repository_url":"https://github.com/dotnet/runtime","scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-scancode-ms-net-library AND LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"System.Net.Http","version":"4.3.0","package_url":"pkg:nuget/System.Net.Http","license":"LicenseRef-github-OTHER","source_repository_url":"https://github.com/dotnet/corefx","scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-scancode-ms-net-library AND LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableLibrary/VulnerableLibrary.csproj","ecosystem":"nuget","name":"runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"System.Net.Http","version":"4.3.3","package_url":"pkg:nuget/System.Net.Http@4.3.3","license":"LicenseRef-github-OTHER","source_repository_url":"https://github.com/dotnet/corefx","scope":"development","vulnerabilities":[{"severity":"high","advisory_ghsa_id":"GHSA-7jgj-8wvc-jh57","advisory_summary":".NET Core Information Disclosure","advisory_url":"https://github.com/advisories/GHSA-7jgj-8wvc-jh57"}]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-scancode-ms-net-library AND LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"added","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.2","package_url":"pkg:nuget/runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl@4.3.2","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"System.Net.Http","version":"4.3.0","package_url":"pkg:nuget/System.Net.Http","license":"LicenseRef-github-OTHER","source_repository_url":"https://github.com/dotnet/corefx","scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-scancode-ms-net-library AND LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]},{"change_type":"removed","manifest":"VulnerableApi/VulnerableApi.csproj","ecosystem":"nuget","name":"runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","version":"4.3.0","package_url":"pkg:nuget/runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl","license":"LicenseRef-github-OTHER","source_repository_url":null,"scope":"development","vulnerabilities":[]}]
{"ghsa_id":"GHSA-4rr6-2v9v-wcpc","cve_id":"CVE-2024-45302","url":"https://api.github.com/advisories/GHSA-4rr6-2v9v-wcpc","html_url":"https://github.com/advisories/GHSA-4rr6-2v9v-wcpc","summary":"CRLF Injection in RestSharp's `RestRequest.AddHeader` method","description":"### Summary\nThe second argument to `RestRequest.AddHeader` (the header value) is vulnerable to CRLF injection. The same applies to `RestRequest.AddOrUpdateHeader` and `RestClient.AddDefaultHeader`.\n\n### Details\nThe way HTTP headers are added to a request is via the `HttpHeaders.TryAddWithoutValidation` method: <https://github.com/restsharp/RestSharp/blob/777bf194ec2d14271e7807cc704e73ec18fcaf7e/src/RestSharp/Request/HttpRequestMessageExtensions.cs#L32> This method does not check for CRLF characters in the header value.\n\nThis means that any headers from a `RestSharp.RequestHeaders` object are added to the request in such a way that they are vulnerable to CRLF-injection. In general, CRLF-injection into a HTTP header (when using HTTP/1.1) means that one can inject additional HTTP headers or smuggle whole HTTP requests.\n\n### PoC\nThe below example code creates a console app that takes one command line variable \"api key\" and then makes a request to some status page with the provided key inserted in the \"Authorization\" header:\n\n```c#\nusing RestSharp;\n\nclass Program\n{\n static async Task Main(string[] args)\n {\n // Usage: dotnet run <api key>\n var key = args[0];\n var options = new RestClientOptions(\"http://insert.some.site.here\");\n var client = new RestClient(options);\n var request = new RestRequest(\"/status\", Method.Get).AddHeader(\"Authorization\", key);\n var response = await client.ExecuteAsync(request);\n Console.WriteLine($\"Status: {response.StatusCode}\");\n Console.WriteLine($\"Response: {response.Content}\");\n }\n}\n```\n\nThis application is now vulnerable to CRLF-injection, and can thus be abused to for example perform request splitting and thus server side request forgery (SSRF):\n\n```bash\nanonymous@ubuntu-sofia-672448:~$ dotnet RestSharp-cli.dll $'test\\r\\nUser-Agent: injected header!\\r\\n\\r\\nGET /smuggled HTTP/1.1\\r\\nHost: insert.some.site.here'\nStatus: OK\nResponse: <html></html>\n```\n\nThe application intends to send a single request of the form:\n```http\nGET /status HTTP/1.1\nHost: insert.some.site.here\nAuthorization: <api key>\nUser-Agent: RestSharp/111.4.1.0\nAccept: application/json, text/json, text/x-json, text/javascript, application/xml, text/xml\nAccept-Encoding: gzip, deflate, br\n```\nBut as the application is vulnerable to CRLF injection the above command will instead result in the following two requests being sent:\n```http\nGET /status HTTP/1.1\nHost: insert.some.site.here\nAuthorization: test\nUser-Agent: injected header!\n```\nand\n```http\nGET /smuggled HTTP/1.1\nHost: insert.some.site.here\nUser-Agent: RestSharp/111.4.1.0\nAccept: application/json, text/json, text/x-json, text/javascript, application/xml, text/xml\nAccept-Encoding: gzip, deflate, br\n```\n\nThis can be confirmed by checking the access logs on the server where these commands were run (with `insert.some.site.here` pointing to localhost):\n```bash\nanonymous@ubuntu-sofia-672448:~$ sudo tail /var/log/apache2/access.log\n127.0.0.1 - - [29/Aug/2024:11:41:11 +0000] \"GET /status HTTP/1.1\" 200 240 \"-\" \"injected header!\"\n127.0.0.1 - - [29/Aug/2024:11:41:11 +0000] \"GET /smuggled HTTP/1.1\" 404 436 \"-\" \"RestSharp/111.4.1.0\"\n```\n\n### Impact\nIf an application using the RestSharp library passes a user-controllable value through to a header, then that application becomes vulnerable to CRLF-injection. This is not necessarily a security issue for a command line application like the one above, but if such code were present in a web application then it becomes vulnerable to request splitting (as shown in the PoC) and thus Server Side Request Forgery.\n\nStrictly speaking this is a potential vulnerability in applications using RestSharp, not in RestSharp itself, but I would argue that at the very least there needs to be a warning about this behaviour in the RestSharp documentation.\n\n","type":"reviewed","severity":"medium","repository_advisory_url":"https://api.github.com/repos/restsharp/RestSharp/security-advisories/GHSA-4rr6-2v9v-wcpc","source_code_location":"https://github.com/restsharp/RestSharp","identifiers":[{"value":"GHSA-4rr6-2v9v-wcpc","type":"GHSA"},{"value":"CVE-2024-45302","type":"CVE"}],"references":["https://github.com/restsharp/RestSharp/security/advisories/GHSA-4rr6-2v9v-wcpc","https://github.com/restsharp/RestSharp/commit/0fba5e727d241b1867bd71efc912594075c2934b","https://github.com/restsharp/RestSharp/blob/777bf194ec2d14271e7807cc704e73ec18fcaf7e/src/RestSharp/Request/HttpRequestMessageExtensions.cs#L32","https://nvd.nist.gov/vuln/detail/CVE-2024-45302","https://github.com/advisories/GHSA-4rr6-2v9v-wcpc"],"published_at":"2024-08-29T19:30:51Z","updated_at":"2024-10-01T21:48:41Z","github_reviewed_at":"2024-08-29T19:30:51Z","nvd_published_at":"2024-08-29T22:15:05Z","withdrawn_at":null,"vulnerabilities":[{"package":{"ecosystem":"nuget","name":"RestSharp"},"vulnerable_version_range":">= 107.0.0-preview.1, < 112.0.0","first_patched_version":"112.0.0","vulnerable_functions":[]}],"cvss_severities":{"cvss_v3":{"vector_string":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H","score":6.1},"cvss_v4":{"vector_string":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N/E:P","score":5.7}},"cwes":[{"cwe_id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')"},{"cwe_id":"CWE-93","name":"Improper Neutralization of CRLF Sequences ('CRLF Injection')"},{"cwe_id":"CWE-113","name":"Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')"}],"credits":[{"user":{"login":"sofiaml","id":43377234,"node_id":"MDQ6VXNlcjQzMzc3MjM0","avatar_url":"https://avatars.githubusercontent.com/u/43377234?v=4","gravatar_id":"","url":"https://api.github.com/users/sofiaml","html_url":"https://github.com/sofiaml","followers_url":"https://api.github.com/users/sofiaml/followers","following_url":"https://api.github.com/users/sofiaml/following{/other_user}","gists_url":"https://api.github.com/users/sofiaml/gists{/gist_id}","starred_url":"https://api.github.com/users/sofiaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sofiaml/subscriptions","organizations_url":"https://api.github.com/users/sofiaml/orgs","repos_url":"https://api.github.com/users/sofiaml/repos","events_url":"https://api.github.com/users/sofiaml/events{/privacy}","received_events_url":"https://api.github.com/users/sofiaml/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter"},{"user":{"login":"Static-Flow","id":16274749,"node_id":"MDQ6VXNlcjE2Mjc0NzQ5","avatar_url":"https://avatars.githubusercontent.com/u/16274749?v=4","gravatar_id":"","url":"https://api.github.com/users/Static-Flow","html_url":"https://github.com/Static-Flow","followers_url":"https://api.github.com/users/Static-Flow/followers","following_url":"https://api.github.com/users/Static-Flow/following{/other_user}","gists_url":"https://api.github.com/users/Static-Flow/gists{/gist_id}","starred_url":"https://api.github.com/users/Static-Flow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Static-Flow/subscriptions","organizations_url":"https://api.github.com/users/Static-Flow/orgs","repos_url":"https://api.github.com/users/Static-Flow/repos","events_url":"https://api.github.com/users/Static-Flow/events{/privacy}","received_events_url":"https://api.github.com/users/Static-Flow/received_events","type":"User","user_view_type":"public","site_admin":false},"type":"reporter"}],"cvss":{"vector_string":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H","score":6.1},"epss":{"percentage":0.00171,"percentile":0.3849}}``` |
The GitHub Advisory API returns first_patched_version as a simple string (e.g., "112.0.0"), not an object with an identifier field. Updated extractPatchVersionId to handle string format primarily while maintaining backward compatibility with object format. - Fixed extractPatchVersionId to check for string first - Updated test mocks to match actual API response format - Added specific test for RestSharp GHSA-4rr6-2v9v-wcpc case - Verified with actual API responses from multiple advisories Fixes issue where patched versions were showing as "N/A" instead of the actual version number. Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Fixed in commit c37b5ee. The bug was in The function now:
Added a specific test case for the RestSharp GHSA-4rr6-2v9v-wcpc scenario. The patched version should now display correctly as 112.0.0 instead of N/A. |
|
@copilot Can you view these, does it help debug the issue? If not add better debug logging and tell me what failed to access. |
The previous fix to extractPatchVersionId wasn't deployed because the dist/ folder (compiled JavaScript) wasn't rebuilt. This commit rebuilds and packages the action with npm run build && npm run package to include the fix. Changes in dist/: - Updated extractPatchVersionId to handle string format first - Includes all async vulnerability summary logic with API calls - Properly extracts patched versions from GitHub Advisory API This should resolve the issue where patched versions showed as "N/A" in actual GitHub Actions runs. Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Added detailed debug logging to help troubleshoot patch version issues: - Log when fetching advisory data from API - Log number of vulnerability entries found - Log each patch info entry added with details - Log when no patch version is found - Log during lookup phase with package details - Log when patch version is found vs not found - Log available entries when no match is found This will make it much easier to diagnose issues in GitHub Actions debug mode. Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
... The issue was that the Fixed in commits d47dce3 and c9e939a:
The debug logs will now show:
The patched version should now display correctly as 112.0.0 for RestSharp. Please re-run the workflow to verify. |


Purpose
Vulnerability reports now display the remediation version inline, eliminating navigation to the advisory database. Supports advisories with multiple version ranges for the same package.
Related Issues
Feature request to show patched versions in dependency review summary.
Implementation
API Integration
GET /advisories/{ghsa_id}) for patch metadataPromise.allfirst_patched_versionas string from API response (not object format)Version Range Matching
>= 8.0.0, <= 8.0.20>= 107.0.0-preview.1, < 112.0.0)Schema & Display
first_patched_versionfield to vulnerability schema (optional, nullable)addChangeVulnerabilitiesToSummaryasync to support API callsExample Output
Before:
After:
For multi-range scenarios (e.g., Microsoft.NetCore.App.Runtime.linux-arm):
Bug Fixes & Deployment
extractPatchVersionId()to handle actual API response format wherefirst_patched_versionis a string, not an object withidentifierfielddist/folder to deploy compiled JavaScript for GitHub Actions executionFiles Modified
src/schemas.ts- vulnerability schema extensionsrc/summary.ts- API integration, version range matching logic, patch version extraction, debug logging, and table renderingsrc/main.ts,scripts/create_summary.ts- async handling__tests__/summary.test.ts- mocks with correct API format, async test cases, multi-range scenario test, and RestSharp GHSA-4rr6-2v9v-wcpc test casedist/index.js,dist/index.js.map- rebuilt and packaged for GitHub Actions deploymentOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.