fix: avoid N12R process-list boundary false positive
This commit is contained in:
@@ -162,6 +162,16 @@ try {
|
||||
Assert-Contains $result.Output "Decision: REJECT" "Expected reject decision in output."
|
||||
}
|
||||
|
||||
Run-Test "accepts harmless process names that contain hook as a substring" {
|
||||
$pkg = Join-Path $tempRoot "harmless-hook-substring"
|
||||
$report = Join-Path $tempRoot "harmless-hook-substring-report.md"
|
||||
New-GoodPackage $pkg
|
||||
Write-Utf8Text (Join-Path $pkg "metadata\process-list.txt") "zfhookupdat 3240"
|
||||
$result = Invoke-Validator -PackageRoot $pkg -ReportPath $report
|
||||
Assert-True ($result.ExitCode -eq 0) "Expected validator success for harmless process-name substring, got exit $($result.ExitCode): $($result.Output)"
|
||||
Assert-Contains $result.Output "Decision: ACCEPT" "Expected accept decision in output."
|
||||
}
|
||||
|
||||
Run-Test "rejects report paths inside the evidence package" {
|
||||
$pkg = Join-Path $tempRoot "report-inside-package"
|
||||
New-GoodPackage $pkg
|
||||
|
||||
@@ -318,6 +318,9 @@ try {
|
||||
}
|
||||
|
||||
foreach ($relative in ($requiredFiles + $optionalFiles)) {
|
||||
if ($relative -eq "metadata/process-list.txt") {
|
||||
continue
|
||||
}
|
||||
$path = Join-PackagePath $packageFullPath $relative
|
||||
if (Test-Path -LiteralPath $path -PathType Leaf) {
|
||||
$text = if ($rawFiles.ContainsKey($relative)) { $rawFiles[$relative] } else { Read-TextFile $packageFullPath $relative }
|
||||
|
||||
Reference in New Issue
Block a user