diff --git a/pages/EM_11_vulnerability_patching_web.py b/pages/EM_11_vulnerability_patching_web.py index a665c15..797af96 100644 --- a/pages/EM_11_vulnerability_patching_web.py +++ b/pages/EM_11_vulnerability_patching_web.py @@ -21,7 +21,7 @@ def generate_patching_graphs(df): try: - filtered_df = df[df['Software'].str.contains('Update for Windows 11', na=False)] + filtered_df = df[df['Software'].str.contains('Update for Windows 11|Update for Windows 10', na=False)] # We first need to convert the Microsoft DateTime stamp format: 20231215060522.240996-000 into a format we can perform calculations with in pandas # To do this we are stripping the 4 end characters and then using pandas datetime to make the conversion @@ -77,7 +77,7 @@ def calculate_duration(group): def generate_updates_graph(df): try: def _categorize_software(software): - if 'Update for Windows 11' in software: + if 'Update for Windows 11' in software or 'Update for Windows 10' in software: return 'Windows System Update' elif 'Security Intelligence Update for Microsoft Defender Antivirus' in software: return 'Microsoft Defender Update' @@ -91,7 +91,7 @@ def _categorize_software(software): df['SoftwareType'] = df['Software'].apply(_categorize_software) installed_updates = df[ - ((df['Software'].str.contains('Update for Windows 11', na=False)) & (df['EventIdentifier'] == 'Installed')) | + ((df['Software'].str.contains('Update for Windows 11|Update for Windows 10', na=False)) & (df['EventIdentifier'] == 'Installed')) | ((df['Software'].str.contains('Security Intelligence Update for Microsoft Defender Antivirus', na=False)) & (df['EventIdentifier'] == 'Installed')) | ((df['Software'].str.contains('Update for Windows Security platform antimalware platform', na=False)) & (df['EventIdentifier'] == 'Installed')) | ((df['Software'].str.contains('Cumulative Update for .NET Framework', na=False)) & (df['EventIdentifier'] == 'Installed')) diff --git a/pages/EM_12_reboot_analysis_web.py b/pages/EM_12_reboot_analysis_web.py index d0ca068..c9ed3a0 100644 --- a/pages/EM_12_reboot_analysis_web.py +++ b/pages/EM_12_reboot_analysis_web.py @@ -83,7 +83,7 @@ def patch_to_reboot_analysis(df, df_v): earliest_versions = df.groupby('SoftwareVersion')['StartTime'].min().reset_index() # Clean the vulnerability dataframe and set the timestamp in a format pd can use - installed_updates = df_v[(df_v['Software'].str.contains('Cumulative Update for Windows 11', na=False)) & (df_v['EventIdentifier'] == 'Install Started')] + installed_updates = df_v[(df_v['Software'].str.contains('Cumulative Update for Windows 11|Cumulative Update for Windows 10', na=False)) & (df_v['EventIdentifier'] == 'Install Started')] installed_updates.loc[:, 'TimeGenerated'] = installed_updates['TimeGenerated'].str[:-4] installed_updates.loc[:, 'TimeGenerated'] = pd.to_datetime(installed_updates['TimeGenerated'], format='%Y%m%d%H%M%S.%f') installed_updates = installed_updates.drop(columns=['UpdateGUID', 'EventIdentifier'])