Refactor code structure for improved readability and maintainability; optimize performance in key functions.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using StellaOps.Scanner.Triage.Models;
|
||||
|
||||
namespace StellaOps.Scanner.Triage.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Groups findings into exploit paths by correlating reachability data.
|
||||
/// </summary>
|
||||
public interface IExploitPathGroupingService
|
||||
{
|
||||
/// <summary>
|
||||
/// Groups findings for an artifact into exploit paths.
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<ExploitPath>> GroupFindingsAsync(
|
||||
string artifactDigest,
|
||||
IReadOnlyList<Finding> findings,
|
||||
CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a vulnerability finding.
|
||||
/// </summary>
|
||||
public sealed record Finding(
|
||||
string FindingId,
|
||||
string PackagePurl,
|
||||
string PackageName,
|
||||
string PackageVersion,
|
||||
IReadOnlyList<string> CveIds,
|
||||
decimal CvssScore,
|
||||
decimal EpssScore,
|
||||
Severity Severity,
|
||||
string ArtifactDigest,
|
||||
DateTimeOffset FirstSeenAt);
|
||||
|
||||
public enum Severity
|
||||
{
|
||||
Critical,
|
||||
High,
|
||||
Medium,
|
||||
Low,
|
||||
Info
|
||||
}
|
||||
Reference in New Issue
Block a user