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
This came up on the #compliance slack channel. The idea is that we create a method that would allow use to write a control where we can check the number of days since the last patch was installed.
i.e.
control 'os-patch-date-1.1' do
impact 0.5
title 'Check OS for last patching date - windows'
desc 'This test will check windows applied a patch in the last 90 days'
describe patch_date do
its('days_since_last_patch_installed') { should be <= 90 }
end
end
I've tried having ago to writing this myself but I've hit a gap in my ruby knowledge and would appreciate a steer.
You already did the ground work to get an array of hotfixes installed. I amended that to include InstalledOn property
Hi there
This came up on the #compliance slack channel. The idea is that we create a method that would allow use to write a control where we can check the number of days since the last patch was installed.
i.e.
I've tried having ago to writing this myself but I've hit a gap in my ruby knowledge and would appreciate a steer.
You already did the ground work to get an array of hotfixes installed. I amended that to include
InstalledOn
propertyI now have an array with items like this
So I'm trying to find the lastest InstalledOn so I'm thinking I should sort the array and take the first one?
Once I have the date I was going to parse it and return the number of days.
Let me know what you think, I did think of getting powershell to do the sort for me but where's the fun in that :)
The text was updated successfully, but these errors were encountered: