fix(launcher): harden LA11 gate evidence
This commit is contained in:
parent
accd01a008
commit
9f9c116792
7 changed files with 514 additions and 89 deletions
|
|
@ -90,18 +90,26 @@ if ($correlations.Count -ne 1) {
|
|||
throw 'No live process uses the isolated session config.'
|
||||
}
|
||||
$SessionConfigPath = [IO.Path]::GetFullPath($correlations[0].SessionConfigPath)
|
||||
$processIdentity = [string]$correlations[0].ProcessInstanceIdentity
|
||||
$commandFingerprint = [string]$correlations[0].CommandLineFingerprintSha256
|
||||
if ($processIdentity -notmatch '^(windows-creation-v1:[0-9]{15,19}|linux-proc-start-v1:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:[0-9]+)$' -or
|
||||
$commandFingerprint -notmatch '^[0-9a-f]{64}$') {
|
||||
throw 'The correlated process instance evidence is malformed.'
|
||||
}
|
||||
|
||||
$directory = Split-Path -Parent $ReportPath
|
||||
if (-not [string]::IsNullOrEmpty($directory)) {
|
||||
$null = New-Item -ItemType Directory -Force -Path $directory
|
||||
}
|
||||
$report = [ordered]@{
|
||||
schemaVersion = 1
|
||||
schemaVersion = 2
|
||||
kind = 'campaign-la-session-process-capture'
|
||||
processId = [int]$correlations[0].ProcessId
|
||||
processInstanceIdentity = $processIdentity
|
||||
sessionId = [IO.Path]::GetFileName(
|
||||
[IO.Path]::GetDirectoryName($SessionConfigPath))
|
||||
sessionConfigFile = [IO.Path]::GetFileName($SessionConfigPath)
|
||||
sessionConfigPath = $SessionConfigPath
|
||||
commandLineFingerprintSha256 = $commandFingerprint
|
||||
capturedUtc = [DateTime]::UtcNow.ToString('O')
|
||||
}
|
||||
$report | ConvertTo-Json -Depth 3 |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue