chore: harden send sandbox evidence package v2
This commit is contained in:
@@ -29,6 +29,8 @@ if ($LASTEXITCODE -ne 0) {
|
||||
$requiredFiles = @(
|
||||
"README.txt",
|
||||
"OPERATOR-STEPS.md",
|
||||
"RETURN-CHECKLIST-V2.md",
|
||||
"SANDBOX-SEND-INPUTS.schema.json",
|
||||
"SANDBOX-SEND-INPUTS.template.json",
|
||||
"EXPECTED-RETURN-FILES.txt",
|
||||
"RUN-RECORDING-SUITE.bat",
|
||||
@@ -38,6 +40,7 @@ $requiredFiles = @(
|
||||
"RECORDING-PACKAGE-MANIFEST.json",
|
||||
"run-before-recorder.bat",
|
||||
"run-after-recorder.bat",
|
||||
"CREATE-RETURN-ZIP.ps1",
|
||||
"make-return-zip.ps1",
|
||||
"recorder\ISphereLiveProbeRecorder.exe",
|
||||
"recorder\variants\ISphereLiveProbeRecorder-x86.exe"
|
||||
@@ -53,6 +56,7 @@ foreach ($relative in $requiredFiles) {
|
||||
$readme = Get-Content -LiteralPath (Join-Path $packageRoot "README.txt") -Raw
|
||||
$steps = Get-Content -LiteralPath (Join-Path $packageRoot "OPERATOR-STEPS.md") -Raw
|
||||
$expected = Get-Content -LiteralPath (Join-Path $packageRoot "EXPECTED-RETURN-FILES.txt") -Raw
|
||||
$checklistV2 = Get-Content -LiteralPath (Join-Path $packageRoot "RETURN-CHECKLIST-V2.md") -Raw
|
||||
|
||||
foreach ($needle in @(
|
||||
"LOCAL_LOGIN_UNAVAILABLE",
|
||||
@@ -62,9 +66,16 @@ foreach ($needle in @(
|
||||
"RUN-RECORDING-SUITE.bat",
|
||||
"content_sha256",
|
||||
"idempotency_key",
|
||||
"success_ack_or_sent_record"
|
||||
"success_ack_or_sent_record",
|
||||
"operator_started_at_local",
|
||||
"operator_clicked_send_at_local",
|
||||
"operator_observed_success_at_local",
|
||||
"before_recorder_present",
|
||||
"after_recorder_present",
|
||||
"success_ack_or_sent_record_present",
|
||||
"duplicate_second_send_attempted"
|
||||
)) {
|
||||
if ($readme -notmatch [regex]::Escape($needle) -and $steps -notmatch [regex]::Escape($needle) -and $expected -notmatch [regex]::Escape($needle)) {
|
||||
if ($readme -notmatch [regex]::Escape($needle) -and $steps -notmatch [regex]::Escape($needle) -and $expected -notmatch [regex]::Escape($needle) -and $checklistV2 -notmatch [regex]::Escape($needle)) {
|
||||
throw "package instructions missing required phrase: $needle"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user