-
-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #960 from ionite34/backport/main/pr-959
[dev to main] backport: adds the thing about the stuff (959)
- Loading branch information
Showing
6 changed files
with
229 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
StabilityMatrix.Core/Models/Packages/PackageVulnerability.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using System; | ||
|
||
namespace StabilityMatrix.Core.Models.Packages; | ||
|
||
/// <summary> | ||
/// Represents a security vulnerability in a package | ||
/// </summary> | ||
public class PackageVulnerability | ||
{ | ||
/// <summary> | ||
/// Unique identifier for the vulnerability (e.g. CVE number) | ||
/// </summary> | ||
public string Id { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// Short title describing the vulnerability | ||
/// </summary> | ||
public string Title { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// Detailed description of the vulnerability | ||
/// </summary> | ||
public string Description { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// URL with more information about the vulnerability | ||
/// </summary> | ||
public Uri? InfoUrl { get; set; } | ||
|
||
/// <summary> | ||
/// Severity level of the vulnerability | ||
/// </summary> | ||
public VulnerabilitySeverity Severity { get; set; } | ||
|
||
/// <summary> | ||
/// When this vulnerability was discovered/published | ||
/// </summary> | ||
public DateTimeOffset PublishedDate { get; set; } | ||
|
||
/// <summary> | ||
/// Version ranges affected by this vulnerability | ||
/// </summary> | ||
public string[] AffectedVersions { get; set; } = Array.Empty<string>(); | ||
|
||
/// <summary> | ||
/// Version that fixes this vulnerability, if available | ||
/// </summary> | ||
public string? FixedInVersion { get; set; } | ||
} | ||
|
||
/// <summary> | ||
/// Severity levels for package vulnerabilities | ||
/// </summary> | ||
public enum VulnerabilitySeverity | ||
{ | ||
Low, | ||
Medium, | ||
High, | ||
Critical | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters