mitre / microsoft-windows-server-2019-stig-baseline

Microsoft Windows Server 2019 STIG InSpec Profile
Other
14 stars 11 forks source link

Inconsistent `describe.one` blocks #75

Closed karikarshivani closed 1 year ago

karikarshivani commented 2 years ago

The describe.one blocks for these controls are not consistent:

If the registry value name below does not exist, this is not a finding. If it exists and is configured with a value of \<value>, this is not a finding. If it exists and is configured with a value of \<value>, this is a finding.

Code recommendation:

describe.one do
    describe registry_key('<path>') do
        it { should_not have_property '<property>' }
    end
    describe registry_key('<path>') do
        it { should have_property '<property>' }
        its('SaveZoneInformation') { should_not cmp <value> }
        its('SaveZoneInformation') { should cmp <value> }
    end
end
abailey1021 commented 1 year ago

Describe Blocks updated... Pending review.