chore(WP7-06): 合并高德发布门禁基线
Dada P0-A isolated Windows CI / validate-and-package (push) Canceled after 0s
Dada P0-A isolated Windows CI / validate-and-package (push) Canceled after 0s
# Conflicts: # package.json # supervisor/Dada.Supervisor/OfflineCommandRouter.cs
This commit is contained in:
@@ -38,6 +38,7 @@ internal static class Program
|
||||
{
|
||||
var security = await TestCredentialBoundaryAsync();
|
||||
var supervisor = await TestSupervisorLifecycleAsync();
|
||||
await TestAmapProbeSecurityAsync();
|
||||
TestSecureConfigurationPersistence();
|
||||
TestStructuredLogging();
|
||||
WriteEvidence(Environment.GetEnvironmentVariable("DADA_EVIDENCE_DIR_SEC"), security);
|
||||
@@ -52,6 +53,20 @@ internal static class Program
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task TestAmapProbeSecurityAsync()
|
||||
{
|
||||
using var handler = AmapProbe.CreateHandler();
|
||||
False(handler.AllowAutoRedirect, "Amap probe redirects disabled");
|
||||
Equal(1, handler.MaxConnectionsPerServer, "Amap probe per-server connection cap");
|
||||
True(AmapProbe.IsAllowedEndpoint(new Uri("https://restapi.amap.com/v3/geocode/regeo")), "Amap fixed HTTPS endpoint accepted");
|
||||
False(AmapProbe.IsAllowedEndpoint(new Uri("http://restapi.amap.com/v3/geocode/regeo")), "Amap HTTP endpoint rejected");
|
||||
False(AmapProbe.IsAllowedEndpoint(new Uri("https://example.invalid/v3/geocode/regeo")), "Amap alternate host rejected");
|
||||
using var oversized = new ByteArrayContent(new byte[AmapProbe.MaximumResponseBytes + 1]);
|
||||
await ThrowsAsync<InvalidDataException>(
|
||||
() => AmapProbe.ReadBoundedJsonAsync(oversized),
|
||||
"Amap oversized response must be rejected before parsing");
|
||||
}
|
||||
|
||||
private static void TestStructuredLogging()
|
||||
{
|
||||
Equal(10 * 1024 * 1024L, StructuredJsonlLogger.SizeLimitBytes, "Supervisor log byte limit");
|
||||
|
||||
Reference in New Issue
Block a user