feat(graph-api): Add schema review notes for upcoming Graph API changes
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
feat(sbomservice): Add placeholder for SHA256SUMS in LNM v1 fixtures docs(devportal): Create README for SDK archives in public directory build(devportal): Implement offline bundle build script test(devportal): Add link checker script for validating links in documentation test(devportal): Create performance check script for dist folder size test(devportal): Implement accessibility check script using Playwright and Axe docs(devportal): Add SDK quickstart guide with examples for Node.js, Python, and cURL feat(excititor): Implement MongoDB storage for airgap import records test(findings): Add unit tests for export filters hash determinism feat(findings): Define attestation contracts for ledger web service feat(graph): Add MongoDB options and service collection extensions for graph indexing test(graph): Implement integration tests for MongoDB provider and service collection extensions feat(zastava): Define configuration options for Zastava surface secrets build(tests): Create script to run Concelier linkset tests with TRX output
This commit is contained in:
@@ -4,8 +4,6 @@ using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using StellaOps.Concelier.Models;
|
||||
|
||||
#pragma warning disable CS8620 // nullability mismatches guarded by explicit filtering
|
||||
|
||||
namespace StellaOps.Concelier.Core.Linksets;
|
||||
|
||||
internal static class LinksetCorrelation
|
||||
@@ -108,24 +106,18 @@ internal static class LinksetCorrelation
|
||||
return (0d, conflicts);
|
||||
}
|
||||
|
||||
List<HashSet<string>> packageKeysPerInput = inputs
|
||||
var packageKeysPerInput = inputs
|
||||
.Select(i => i.Purls
|
||||
.Select(ExtractPackageKey)
|
||||
.Where(k => !string.IsNullOrWhiteSpace(k))
|
||||
.ToHashSet(StringComparer.Ordinal))
|
||||
.ToList();
|
||||
|
||||
var sharedPackages = new HashSet<string>(StringComparer.Ordinal);
|
||||
if (packageKeysPerInput.Count > 0)
|
||||
var seed = packageKeysPerInput.FirstOrDefault() ?? new HashSet<string>(StringComparer.Ordinal);
|
||||
var sharedPackages = new HashSet<string>(seed, StringComparer.Ordinal);
|
||||
foreach (var next in packageKeysPerInput.Skip(1))
|
||||
{
|
||||
sharedPackages.UnionWith(packageKeysPerInput[0]);
|
||||
|
||||
#pragma warning disable CS8620 // inputs filtered to non-empty strings above
|
||||
foreach (var next in packageKeysPerInput.Skip(1))
|
||||
{
|
||||
sharedPackages.IntersectWith(next);
|
||||
}
|
||||
#pragma warning restore CS8620
|
||||
sharedPackages.IntersectWith(next);
|
||||
}
|
||||
|
||||
if (sharedPackages.Count > 0)
|
||||
@@ -145,17 +137,12 @@ internal static class LinksetCorrelation
|
||||
|
||||
private static IEnumerable<AdvisoryLinksetConflict> CollectRangeConflicts(
|
||||
IReadOnlyCollection<Input> inputs,
|
||||
HashSet<string?> sharedPackages)
|
||||
HashSet<string> sharedPackages)
|
||||
{
|
||||
var conflicts = new List<AdvisoryLinksetConflict>();
|
||||
|
||||
foreach (var package in sharedPackages)
|
||||
{
|
||||
if (package is null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var values = inputs
|
||||
.SelectMany(i => i.Purls
|
||||
.Where(p => ExtractPackageKey(p) == package)
|
||||
|
||||
Reference in New Issue
Block a user