Actions
Bug #20083
closedDSC policies are generated without the conditions
Pull Request:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
User visibility:
First impressions of Rudder
Effort required:
Priority:
124
Name check:
To do
Fix check:
To do
Regression:
Description
See the tehcnique attached and its generated ps1 file:
function Dsc-Block-Test { [CmdletBinding()] param ( [parameter(Mandatory=$true)] [string]$reportId, [parameter(Mandatory=$true)] [string]$techniqueName, [switch]$auditOnly ) $local_classes = New-ClassContext $resources_dir = $PSScriptRoot + "\resources" $class = "" if (Evaluate-Class $class $local_classes $system_classes) { $local_classes = Merge-ClassContext $local_classes $(Service-Started -Name "sshd" -componentName "Service started" -reportId $reportId -techniqueName $techniqueName -auditOnly:$auditOnly) .get_item("classes") } else { _rudder_common_report_na -componentName "Service started" -componentKey "sshd" -message "Not applicable" -reportId $reportId -techniqueName $techniqueName -auditOnly:$auditOnly } $class = "" if (Evaluate-Class $class $local_classes $system_classes) { $local_classes = Merge-ClassContext $local_classes $(Command-Execution -Command "write-output `"bob`"" -componentName "Command execution" -reportId $reportId -techniqueName $techniqueName -auditOnly:$auditOnly).get_item("classes") } else { _rudder_common_report_na -componentName "Command execution" -componentKey "write-output `"bob`"" -message "Not applicable" -reportId $reportId -techniqueName $techniqueName -auditOnly:$au ditOnly } }
Files
Actions