search and ai stabilization work, localization stablized.
This commit is contained in:
@@ -10,6 +10,7 @@ using StellaOps.Scanner.Reachability.Jobs;
|
||||
using StellaOps.Scanner.Reachability.Services;
|
||||
using StellaOps.Scanner.Reachability.Vex;
|
||||
using StellaOps.Scanner.WebService.Security;
|
||||
using static StellaOps.Localization.T;
|
||||
|
||||
namespace StellaOps.Scanner.WebService.Endpoints;
|
||||
|
||||
@@ -74,7 +75,7 @@ public static class ReachabilityEvidenceEndpoints
|
||||
string.IsNullOrWhiteSpace(request.Purl))
|
||||
{
|
||||
return Results.Problem(
|
||||
detail: "imageDigest, cveId, and purl are required",
|
||||
detail: _t("scanner.reachability_evidence.required_fields"),
|
||||
statusCode: StatusCodes.Status400BadRequest);
|
||||
}
|
||||
|
||||
@@ -83,7 +84,7 @@ public static class ReachabilityEvidenceEndpoints
|
||||
if (!hasMappings)
|
||||
{
|
||||
return Results.Problem(
|
||||
detail: $"No sink mappings found for CVE {request.CveId}",
|
||||
detail: _tn("scanner.reachability_evidence.no_sink_mappings", ("cveId", request.CveId)),
|
||||
statusCode: StatusCodes.Status404NotFound);
|
||||
}
|
||||
|
||||
@@ -131,7 +132,7 @@ public static class ReachabilityEvidenceEndpoints
|
||||
if (result is null)
|
||||
{
|
||||
return Results.Problem(
|
||||
detail: $"No result found for job {jobId}",
|
||||
detail: _tn("scanner.reachability_evidence.job_result_not_found", ("jobId", jobId)),
|
||||
statusCode: StatusCodes.Status404NotFound);
|
||||
}
|
||||
|
||||
@@ -165,7 +166,7 @@ public static class ReachabilityEvidenceEndpoints
|
||||
if (mappings.Count == 0)
|
||||
{
|
||||
return Results.Problem(
|
||||
detail: $"No mappings found for CVE {cveId}",
|
||||
detail: _tn("scanner.reachability_evidence.cve_mappings_not_found", ("cveId", cveId)),
|
||||
statusCode: StatusCodes.Status404NotFound);
|
||||
}
|
||||
|
||||
@@ -196,7 +197,7 @@ public static class ReachabilityEvidenceEndpoints
|
||||
string.IsNullOrWhiteSpace(request.ProductId))
|
||||
{
|
||||
return Results.Problem(
|
||||
detail: "jobId and productId are required",
|
||||
detail: _t("scanner.reachability_evidence.vex_required_fields"),
|
||||
statusCode: StatusCodes.Status400BadRequest);
|
||||
}
|
||||
|
||||
@@ -205,7 +206,7 @@ public static class ReachabilityEvidenceEndpoints
|
||||
if (result?.Stack is null)
|
||||
{
|
||||
return Results.Problem(
|
||||
detail: $"No reachability result found for job {request.JobId}",
|
||||
detail: _tn("scanner.reachability_evidence.vex_result_not_found", ("jobId", request.JobId)),
|
||||
statusCode: StatusCodes.Status404NotFound);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user