From d507902f201ee82b4e8a5a0cc21d27fe05ea4e56 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Sun, 13 Jun 2021 14:59:33 -0700 Subject: Add windows_defender and windows_defender_exclusion resources These were originally written for the desktop-config cookbook. Signed-off-by: Tim Smith --- .../end_to_end/recipes/_windows_defender.rb | 25 ++++++++++++++++++++++ .../cookbooks/end_to_end/recipes/windows.rb | 1 + 2 files changed, 26 insertions(+) create mode 100644 kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb (limited to 'kitchen-tests') diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb new file mode 100644 index 0000000000..4565998f26 --- /dev/null +++ b/kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb @@ -0,0 +1,25 @@ +# +# Cookbook:: end_to_end +# Recipe:: _windows_defender +# +# Copyright:: Copyright (c) Chef Software Inc. +# + +windows_defender 'Configure Windows Defender' do + realtime_protection true + intrusion_protection_system true + lock_ui true + scan_archives true + scan_scripts true + scan_email true + scan_removable_drives true + scan_network_files false + scan_mapped_drives false + action :enable +end + +windows_defender_exclusion 'Exclude PNG files' do + extensions 'png' + process_paths 'c:\\windows\\system32' + action :add +end diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb index f4cd74e3bf..20140ff7e0 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb @@ -178,3 +178,4 @@ windows_certificate "c:/mordor/ca.cert.pem" do end include_recipe "::_windows_printer" +include_recipe "::_windows_defender" -- cgit v1.2.1 From e493d5149619f7c5537c45c3f7e723e232ecf9ec Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Sun, 13 Jun 2021 16:23:44 -0700 Subject: Add specs Signed-off-by: Tim Smith --- kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kitchen-tests') diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb index 4565998f26..90a0403ae3 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb @@ -5,7 +5,7 @@ # Copyright:: Copyright (c) Chef Software Inc. # -windows_defender 'Configure Windows Defender' do +windows_defender "Configure Windows Defender" do realtime_protection true intrusion_protection_system true lock_ui true @@ -18,8 +18,8 @@ windows_defender 'Configure Windows Defender' do action :enable end -windows_defender_exclusion 'Exclude PNG files' do - extensions 'png' +windows_defender_exclusion "Exclude PNG files" do + extensions "png" process_paths 'c:\\windows\\system32' action :add end -- cgit v1.2.1