audit work, fixed StellaOps.sln warnings/errors, fixed tests, sprints work, new advisories
This commit is contained in:
@@ -13,10 +13,6 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BouncyCastle.Cryptography" />
|
||||
<PackageReference Include="FluentAssertions" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" >
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" >
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -645,7 +646,7 @@ internal sealed class AttestorSubmissionService : IAttestorSubmissionService
|
||||
Aggregator = witness.Aggregator,
|
||||
Status = witness.Status,
|
||||
RootHash = witness.RootHash,
|
||||
RetrievedAt = witness.RetrievedAt == default ? null : witness.RetrievedAt.ToString("O"),
|
||||
RetrievedAt = witness.RetrievedAt == default ? null : witness.RetrievedAt.ToString("O", CultureInfo.InvariantCulture),
|
||||
Statement = witness.Statement,
|
||||
Signature = witness.Signature,
|
||||
KeyId = witness.KeyId,
|
||||
@@ -667,7 +668,7 @@ internal sealed class AttestorSubmissionService : IAttestorSubmissionService
|
||||
Origin = proof.Checkpoint.Origin,
|
||||
Size = proof.Checkpoint.Size,
|
||||
RootHash = proof.Checkpoint.RootHash,
|
||||
Timestamp = proof.Checkpoint.Timestamp?.ToString("O")
|
||||
Timestamp = proof.Checkpoint.Timestamp?.ToString("O", CultureInfo.InvariantCulture)
|
||||
},
|
||||
Inclusion = proof.Inclusion is null ? null : new AttestorSubmissionResult.InclusionProof
|
||||
{
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
<PackageReference Include="NSubstitute" />
|
||||
<PackageReference Include="Testcontainers" />
|
||||
<PackageReference Include="Testcontainers.PostgreSql" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" >
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" >
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Globalization;
|
||||
using System.Security.Claims;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text.Json;
|
||||
@@ -131,7 +132,7 @@ internal static class AttestorWebServiceEndpoints
|
||||
Algorithm = result.Algorithm,
|
||||
Mode = result.Mode,
|
||||
Provider = result.Provider,
|
||||
SignedAt = result.SignedAt.ToString("O")
|
||||
SignedAt = result.SignedAt.ToString("O", CultureInfo.InvariantCulture)
|
||||
}
|
||||
};
|
||||
return Results.Ok(response);
|
||||
@@ -251,14 +252,14 @@ internal static class AttestorWebServiceEndpoints
|
||||
{
|
||||
KeyId = result.SignerKeyId,
|
||||
Algorithm = result.Algorithm,
|
||||
SignedAt = result.SignedAt.ToString("O")
|
||||
SignedAt = result.SignedAt.ToString("O", CultureInfo.InvariantCulture)
|
||||
},
|
||||
Rekor = result.RekorEntry is null ? null : new InTotoRekorEntryDto
|
||||
{
|
||||
LogId = result.RekorEntry.LogId,
|
||||
LogIndex = result.RekorEntry.LogIndex,
|
||||
Uuid = result.RekorEntry.Uuid,
|
||||
IntegratedTime = result.RekorEntry.IntegratedTime?.ToString("O")
|
||||
IntegratedTime = result.RekorEntry.IntegratedTime?.ToString("O", CultureInfo.InvariantCulture)
|
||||
}
|
||||
};
|
||||
|
||||
@@ -424,7 +425,7 @@ internal static class AttestorWebServiceEndpoints
|
||||
Origin = entry.Proof.Checkpoint.Origin,
|
||||
Size = entry.Proof.Checkpoint.Size,
|
||||
RootHash = entry.Proof.Checkpoint.RootHash,
|
||||
Timestamp = entry.Proof.Checkpoint.Timestamp?.ToString("O")
|
||||
Timestamp = entry.Proof.Checkpoint.Timestamp?.ToString("O", CultureInfo.InvariantCulture)
|
||||
},
|
||||
Inclusion = entry.Proof.Inclusion is null ? null : new AttestationInclusionDto
|
||||
{
|
||||
@@ -448,7 +449,7 @@ internal static class AttestorWebServiceEndpoints
|
||||
Origin = entry.Mirror.Proof.Checkpoint.Origin,
|
||||
Size = entry.Mirror.Proof.Checkpoint.Size,
|
||||
RootHash = entry.Mirror.Proof.Checkpoint.RootHash,
|
||||
Timestamp = entry.Mirror.Proof.Checkpoint.Timestamp?.ToString("O")
|
||||
Timestamp = entry.Mirror.Proof.Checkpoint.Timestamp?.ToString("O", CultureInfo.InvariantCulture)
|
||||
},
|
||||
Inclusion = entry.Mirror.Proof.Inclusion is null ? null : new AttestationInclusionDto
|
||||
{
|
||||
@@ -474,7 +475,7 @@ internal static class AttestorWebServiceEndpoints
|
||||
{
|
||||
Uuid = entry.RekorUuid,
|
||||
Status = entry.Status,
|
||||
CreatedAt = entry.CreatedAt.ToString("O"),
|
||||
CreatedAt = entry.CreatedAt.ToString("O", CultureInfo.InvariantCulture),
|
||||
Artifact = new AttestationArtifactDto
|
||||
{
|
||||
Sha256 = entry.Artifact.Sha256,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using StellaOps.Attestor.Core.Bulk;
|
||||
@@ -84,9 +85,9 @@ internal static class BulkVerificationContracts
|
||||
{
|
||||
Id = job.Id,
|
||||
Status = job.Status.ToString().ToLowerInvariant(),
|
||||
CreatedAt = job.CreatedAt.ToString("O"),
|
||||
StartedAt = job.StartedAt?.ToString("O"),
|
||||
CompletedAt = job.CompletedAt?.ToString("O"),
|
||||
CreatedAt = job.CreatedAt.ToString("O", CultureInfo.InvariantCulture),
|
||||
StartedAt = job.StartedAt?.ToString("O", CultureInfo.InvariantCulture),
|
||||
CompletedAt = job.CompletedAt?.ToString("O", CultureInfo.InvariantCulture),
|
||||
Processed = job.ProcessedCount,
|
||||
Succeeded = job.SucceededCount,
|
||||
Failed = job.FailedCount,
|
||||
@@ -112,8 +113,8 @@ internal static class BulkVerificationContracts
|
||||
{
|
||||
Index = item.Index,
|
||||
Status = item.Status.ToString().ToLowerInvariant(),
|
||||
StartedAt = item.StartedAt?.ToString("O"),
|
||||
CompletedAt = item.CompletedAt?.ToString("O"),
|
||||
StartedAt = item.StartedAt?.ToString("O", CultureInfo.InvariantCulture),
|
||||
CompletedAt = item.CompletedAt?.ToString("O", CultureInfo.InvariantCulture),
|
||||
Error = item.Error,
|
||||
Request = new BulkVerificationItemRequestDto
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
@@ -154,7 +155,7 @@ public class VerdictController : ControllerBase
|
||||
Envelope = Convert.ToBase64String(Encoding.UTF8.GetBytes(envelopeJson)),
|
||||
RekorLogIndex = rekorLogIndex,
|
||||
KeyId = signResult.KeyId ?? request.KeyId ?? "default",
|
||||
CreatedAt = _timeProvider.GetUtcNow().ToString("O")
|
||||
CreatedAt = _timeProvider.GetUtcNow().ToString("O", CultureInfo.InvariantCulture)
|
||||
};
|
||||
|
||||
_logger.LogInformation(
|
||||
|
||||
Reference in New Issue
Block a user