mirror of
https://github.com/Yamato-Security/WELA.git
synced 2026-10-22 06:06:05 +02:00
Enumerate corpus rules explicitly in PowerShell 5.1 fixtures
This commit is contained in:
1 parent
70e6207a84
commit
966aa21a46
1 file changed
+3
-2
@@ -85,8 +85,9 @@ $script:SecurityRulesPath = Join-Path $script:ScriptRoot 'rules.json'
|
||||
try {
|
||||
# Exercise the real corpus's rule-side wildcard against the exact catalog
|
||||
# selectors, through the public CSV/JSON/HTML assessment path.
|
||||
$wildcardRules = @(Get-Content -LiteralPath (Join-Path $PSScriptRoot '../config/security_rules.json') -Raw |
|
||||
ConvertFrom-Json | Where-Object { $_.channel -contains 'Microsoft-Windows-Security-Mitigations*' })
|
||||
$corpus = Get-Content -LiteralPath (Join-Path $PSScriptRoot '../config/security_rules.json') -Raw | ConvertFrom-Json
|
||||
# Explicitly enumerate the parsed array on Windows PowerShell 5.1 as well.
|
||||
$wildcardRules = @($corpus | Where-Object { $_.channel -contains 'Microsoft-Windows-Security-Mitigations*' })
|
||||
Assert-Equal ($wildcardRules.Count -gt 0) $true 'Real Security-Mitigations wildcard rules are present'
|
||||
$fixtures = @(
|
||||
@{ id = 'application'; channel = @('Application') }
|
||||
|
||||
Reference in new issue
Block a user