fix: Refactor Initialize-CISAuditResult to use global test definitions

This commit is contained in:
DrIOS
2024-05-28 19:25:27 -05:00
parent b064f9f271
commit 290540b25a
2 changed files with 3 additions and 3 deletions

View File

@@ -17,8 +17,7 @@ function Initialize-CISAuditResult {
)
# Import the test definitions CSV file
$testDefinitionsPath = Join-Path -Path $PSScriptRoot -ChildPath "helper/TestDefinitions.csv"
$testDefinitions = Import-Csv -Path $testDefinitionsPath
$testDefinitions = $script:TestDefinitionsObject
# Find the row that matches the provided recommendation (Rec)
$testDefinition = $testDefinitions | Where-Object { $_.Rec -eq $Rec }