commit
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build Test Deploy / build-test (push) Has been cancelled
				
			
		
			
				
	
				Build Test Deploy / authority-container (push) Has been cancelled
				
			
		
			
				
	
				Build Test Deploy / docs (push) Has been cancelled
				
			
		
			
				
	
				Build Test Deploy / deploy (push) Has been cancelled
				
			
		
			
				
	
				Docs CI / lint-and-preview (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build Test Deploy / build-test (push) Has been cancelled
				
			Build Test Deploy / authority-container (push) Has been cancelled
				
			Build Test Deploy / docs (push) Has been cancelled
				
			Build Test Deploy / deploy (push) Has been cancelled
				
			Docs CI / lint-and-preview (push) Has been cancelled
				
			This commit is contained in:
		| @@ -57,7 +57,19 @@ internal static class GhsaMapper | ||||
|         var weaknesses = CreateWeaknesses(dto.Cwes, recordedAt); | ||||
|         var cvssMetrics = CreateCvssMetrics(dto.Cvss, recordedAt, out var cvssSeverity, out var canonicalMetricId); | ||||
|  | ||||
|         var severity = SeverityNormalization.Normalize(dto.Severity) ?? cvssSeverity; | ||||
|         var severityHint = SeverityNormalization.Normalize(dto.Severity); | ||||
|         var cvssSeverityHint = SeverityNormalization.Normalize(dto.Cvss?.Severity); | ||||
|         var severity = severityHint ?? cvssSeverity ?? cvssSeverityHint; | ||||
|  | ||||
|         if (canonicalMetricId is null) | ||||
|         { | ||||
|             var fallbackSeverity = severityHint ?? cvssSeverityHint ?? cvssSeverity; | ||||
|             if (!string.IsNullOrWhiteSpace(fallbackSeverity)) | ||||
|             { | ||||
|                 canonicalMetricId = BuildSeverityCanonicalMetricId(fallbackSeverity); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         var summary = dto.Summary ?? dto.Description; | ||||
|         var description = Validation.TrimToNull(dto.Description); | ||||
|  | ||||
| @@ -81,6 +93,9 @@ internal static class GhsaMapper | ||||
|             canonicalMetricId: canonicalMetricId); | ||||
|     } | ||||
|  | ||||
|     private static string BuildSeverityCanonicalMetricId(string severity) | ||||
|         => $"{GhsaConnectorPlugin.SourceName}:severity/{severity}"; | ||||
|  | ||||
|     private static AdvisoryReference? CreateReference(GhsaReferenceDto reference, DateTimeOffset recordedAt) | ||||
|     { | ||||
|         if (string.IsNullOrWhiteSpace(reference.Url) || !Validation.LooksLikeHttpUrl(reference.Url)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user