using StellaOps.Concelier.SbomIntegration.Models; using StellaOps.Scanner.CryptoAnalysis.Analyzers; using StellaOps.Scanner.CryptoAnalysis.Models; using StellaOps.Scanner.CryptoAnalysis.Policy; using StellaOps.TestKit; using Xunit; namespace StellaOps.Scanner.CryptoAnalysis.Tests; public sealed class RegionalComplianceCheckerTests { [Trait("Category", TestCategories.Unit)] [Fact] public async Task AnalyzeAsync_FlagsRegionalComplianceGap() { var components = new[] { new ParsedComponent { BomRef = "alg-aes", Name = "AES", Type = "library", CryptoProperties = new ParsedCryptoProperties { AssetType = CryptoAssetType.Algorithm, AlgorithmProperties = new ParsedAlgorithmProperties { Primitive = CryptoPrimitive.Symmetric } } } }; var policy = CryptoPolicyDefaults.Default with { RegionalRequirements = new RegionalCryptoPolicy { Eidas = true } }; var context = CryptoAnalysisContext.Create(components, policy, TimeProvider.System); var analyzer = new RegionalComplianceChecker(); var result = await analyzer.AnalyzeAsync(context); Assert.Contains(result.Findings, f => f.Type == CryptoFindingType.NonFipsCompliant); } }