You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Control V-63319 mentions that the control is only applicable to domain-joined systems, however the test does not check for the system domain.
The fix could be implemented like this:
domain = command('wmic computersystem get domain | FINDSTR /V Domain').stdout.strip
if domain == 'WORKGROUP'
impact 0.0
describe 'This system is not joined to a domain, therefore this control is Not Applicable' do
skip 'This system is not joined to a domain, therefore this control is Not Applicable'
end
else
describe os.arch do
it { should eq 'x86_64' }
end
describe os.name do
it { should eq 'windows_10_enterprise' }
end
end
Or like this:
is_domain = command("(gwmi win32_computersystem).partofdomain").stdout.strip == "True"
if is_domain
describe os.arch do
it { should eq 'x86_64' }
end
describe os.name do
it { should eq 'windows_10_enterprise' }
end
else
impact 0.0
describe 'This system is not joined to a domain, therefore this control is Not Applicable' do
skip 'This system is not joined to a domain, therefore this control is Not Applicable'
end
else
end
The text was updated successfully, but these errors were encountered:
Control V-63319 mentions that the control is only applicable to domain-joined systems, however the test does not check for the system domain.
The fix could be implemented like this:
Or like this:
The text was updated successfully, but these errors were encountered: