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:
		| @@ -0,0 +1,44 @@ | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.Collections.Immutable; | ||||
| using System.Text.Json.Serialization; | ||||
| using StellaOps.Vexer.Core; | ||||
|  | ||||
| namespace StellaOps.Vexer.Attestation.Models; | ||||
|  | ||||
| public sealed record VexAttestationPredicate( | ||||
|     string ExportId, | ||||
|     string QuerySignature, | ||||
|     string ArtifactAlgorithm, | ||||
|     string ArtifactDigest, | ||||
|     VexExportFormat Format, | ||||
|     DateTimeOffset CreatedAt, | ||||
|     IReadOnlyList<string> SourceProviders, | ||||
|     IReadOnlyDictionary<string, string> Metadata) | ||||
| { | ||||
|     public static VexAttestationPredicate FromRequest( | ||||
|         VexAttestationRequest request, | ||||
|         IReadOnlyDictionary<string, string>? metadata = null) | ||||
|         => new( | ||||
|             request.ExportId, | ||||
|             request.QuerySignature.Value, | ||||
|             request.Artifact.Algorithm, | ||||
|             request.Artifact.Digest, | ||||
|             request.Format, | ||||
|             request.CreatedAt, | ||||
|             request.SourceProviders, | ||||
|             metadata is null ? ImmutableDictionary<string, string>.Empty : metadata.ToImmutableDictionary(StringComparer.Ordinal)); | ||||
| } | ||||
|  | ||||
| public sealed record VexInTotoSubject( | ||||
|     string Name, | ||||
|     IReadOnlyDictionary<string, string> Digest); | ||||
|  | ||||
| public sealed record VexInTotoStatement( | ||||
|     [property: JsonPropertyName("_type")] string Type, | ||||
|     string PredicateType, | ||||
|     IReadOnlyList<VexInTotoSubject> Subject, | ||||
|     VexAttestationPredicate Predicate) | ||||
| { | ||||
|     public static readonly string InTotoType = "https://in-toto.io/Statement/v0.1"; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user