Skip to content

Commit

Permalink
feat(scanner/windows): update release info (#1696)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaineK00n authored Jun 29, 2023
1 parent 4253550 commit 457a3a9
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 3 deletions.
113 changes: 113 additions & 0 deletions scanner/windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "", kb: "5021291"},
{revision: "", kb: "5022338"},
{revision: "", kb: "5022872"},
{revision: "", kb: "5023769"},
{revision: "", kb: "5025279"},
{revision: "", kb: "5026413"},
{revision: "", kb: "5027275"},
},
securityOnly: []string{
"3192391",
Expand Down Expand Up @@ -1476,6 +1480,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
"5021288",
"5022339",
"5022874",
"5023759",
"5025277",
"5026426",
"5027256",
},
},
},
Expand Down Expand Up @@ -1600,6 +1608,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "", kb: "5021294"},
{revision: "", kb: "5022352"},
{revision: "", kb: "5022899"},
{revision: "", kb: "5023765"},
{revision: "", kb: "5025285"},
{revision: "", kb: "5026415"},
{revision: "", kb: "5027271"},
},
securityOnly: []string{
"3192392",
Expand Down Expand Up @@ -1678,6 +1690,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
"5021296",
"5022346",
"5022894",
"5023764",
"5025288",
"5026409",
"5027282",
},
},
},
Expand Down Expand Up @@ -1803,6 +1819,11 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "19624", kb: "5021243"},
{revision: "19685", kb: "5022297"},
{revision: "19747", kb: "5022858"},
{revision: "19805", kb: "5023713"},
{revision: "19869", kb: "5025234"},
{revision: "19926", kb: "5026382"},
{revision: "19983", kb: "5027230"},
{revision: "19986", kb: "5028622"},
},
},
// https://support.microsoft.com/en-us/topic/windows-10-update-history-2ad7900f-882c-1dfc-f9d7-82b7ca162010
Expand Down Expand Up @@ -2003,6 +2024,11 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "5582", kb: "5021235"},
{revision: "5648", kb: "5022289"},
{revision: "5717", kb: "5022838"},
{revision: "5786", kb: "5023697"},
{revision: "5850", kb: "5025228"},
{revision: "5921", kb: "5026363"},
{revision: "5989", kb: "5027219"},
{revision: "5996", kb: "5028623"},
},
},
// https://support.microsoft.com/en-us/topic/windows-10-update-history-83aa43c0-82e0-92d8-1580-10642c9ed612
Expand Down Expand Up @@ -2373,6 +2399,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "3772", kb: "5022554"},
{revision: "3887", kb: "5022286"},
{revision: "4010", kb: "5022840"},
{revision: "4131", kb: "5023702"},
{revision: "4252", kb: "5025229"},
{revision: "4377", kb: "5026362"},
{revision: "4499", kb: "5027222"},
},
},
// https://support.microsoft.com/en-us/topic/windows-10-update-history-e6058e7c-4116-38f1-b984-4fcacfba5e5d
Expand Down Expand Up @@ -2602,6 +2632,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "2546", kb: "5019275"},
{revision: "2604", kb: "5022834"},
{revision: "2673", kb: "5022906"},
{revision: "2728", kb: "5023696"},
{revision: "2788", kb: "5023773"},
{revision: "2846", kb: "5025221"},
{revision: "2965", kb: "5026361"},
},
},
// https://support.microsoft.com/en-us/topic/windows-10-update-history-1b6aac92-bf01-42b5-b158-f80c6d93eb11
Expand Down Expand Up @@ -2693,6 +2727,11 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "2546", kb: "5019275"},
{revision: "2604", kb: "5022834"},
{revision: "2673", kb: "5022906"},
{revision: "2728", kb: "5023696"},
{revision: "2788", kb: "5023773"},
{revision: "2846", kb: "5025221"},
{revision: "2965", kb: "5026361"},
{revision: "3086", kb: "5027215"},
},
},
// https://support.microsoft.com/en-us/topic/windows-10-update-history-8127c2c6-6edf-4fdf-8b9f-0f7be1ef3562
Expand All @@ -2707,6 +2746,14 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "2546", kb: "5019275"},
{revision: "2604", kb: "5022834"},
{revision: "2673", kb: "5022906"},
{revision: "2728", kb: "5023696"},
{revision: "2788", kb: "5023773"},
{revision: "2846", kb: "5025221"},
{revision: "2913", kb: "5025297"},
{revision: "2965", kb: "5026361"},
{revision: "3031", kb: "5026435"},
{revision: "3086", kb: "5027215"},
{revision: "3155", kb: "5027293"},
},
},
},
Expand Down Expand Up @@ -2751,6 +2798,14 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "1516", kb: "5019274"},
{revision: "1574", kb: "5022836"},
{revision: "1641", kb: "5022905"},
{revision: "1696", kb: "5023698"},
{revision: "1761", kb: "5023774"},
{revision: "1817", kb: "5025224"},
{revision: "1880", kb: "5025298"},
{revision: "1936", kb: "5026368"},
{revision: "2003", kb: "5026436"},
{revision: "2057", kb: "5027223"},
{revision: "2124", kb: "5027292"},
},
},
// https://support.microsoft.com/en-us/topic/windows-11-version-22h2-update-history-ec4229c3-9c5f-4e75-9d6d-9025ab70fcce
Expand All @@ -2768,6 +2823,15 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "1105", kb: "5022303"},
{revision: "1194", kb: "5022360"},
{revision: "1265", kb: "5022845"},
{revision: "1344", kb: "5022913"},
{revision: "1413", kb: "5023706"},
{revision: "1485", kb: "5023778"},
{revision: "1555", kb: "5025239"},
{revision: "1635", kb: "5025305"},
{revision: "1702", kb: "5026372"},
{revision: "1778", kb: "5026446"},
{revision: "1848", kb: "5027231"},
{revision: "1928", kb: "5027303"},
},
},
},
Expand Down Expand Up @@ -2846,6 +2910,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "", kb: "5021289"},
{revision: "", kb: "5022340"},
{revision: "", kb: "5022890"},
{revision: "", kb: "5023755"},
{revision: "", kb: "5025271"},
{revision: "", kb: "5026408"},
{revision: "", kb: "5027279"},
},
securityOnly: []string{
"4457984",
Expand Down Expand Up @@ -2903,6 +2971,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
"5021293",
"5022353",
"5022893",
"5023754",
"5025273",
"5026427",
"5027277",
},
},
},
Expand Down Expand Up @@ -3025,6 +3097,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "", kb: "5021291"},
{revision: "", kb: "5022338"},
{revision: "", kb: "5022872"},
{revision: "", kb: "5023769"},
{revision: "", kb: "5025279"},
{revision: "", kb: "5026413"},
{revision: "", kb: "5027275"},
},
securityOnly: []string{
"3192391",
Expand Down Expand Up @@ -3104,6 +3180,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
"5021288",
"5022339",
"5022874",
"5023759",
"5025277",
"5026426",
"5027256",
},
},
},
Expand Down Expand Up @@ -3228,6 +3308,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "", kb: "5021285"},
{revision: "", kb: "5022348"},
{revision: "", kb: "5022903"},
{revision: "", kb: "5023756"},
{revision: "", kb: "5025287"},
{revision: "", kb: "5026419"},
{revision: "", kb: "5027283"},
},
securityOnly: []string{
"3192393",
Expand Down Expand Up @@ -3306,6 +3390,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
"5021303",
"5022343",
"5022895",
"5023752",
"5025272",
"5026411",
"5027281",
},
},
},
Expand Down Expand Up @@ -3430,6 +3518,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "", kb: "5021294"},
{revision: "", kb: "5022352"},
{revision: "", kb: "5022899"},
{revision: "", kb: "5023765"},
{revision: "", kb: "5025285"},
{revision: "", kb: "5026415"},
{revision: "", kb: "5027271"},
},
securityOnly: []string{
"3192392",
Expand Down Expand Up @@ -3508,6 +3600,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
"5021296",
"5022346",
"5022894",
"5023764",
"5025288",
"5026409",
"5027282",
},
},
},
Expand Down Expand Up @@ -3665,6 +3761,11 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "5582", kb: "5021235"},
{revision: "5648", kb: "5022289"},
{revision: "5717", kb: "5022838"},
{revision: "5786", kb: "5023697"},
{revision: "5850", kb: "5025228"},
{revision: "5921", kb: "5026363"},
{revision: "5989", kb: "5027219"},
{revision: "5996", kb: "5028623"},
},
},
},
Expand Down Expand Up @@ -3998,6 +4099,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "3772", kb: "5022554"},
{revision: "3887", kb: "5022286"},
{revision: "4010", kb: "5022840"},
{revision: "4131", kb: "5023702"},
{revision: "4252", kb: "5025229"},
{revision: "4377", kb: "5026362"},
{revision: "4499", kb: "5027222"},
},
},
},
Expand Down Expand Up @@ -4235,6 +4340,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "2546", kb: "5019275"},
{revision: "2604", kb: "5022834"},
{revision: "2673", kb: "5022906"},
{revision: "2728", kb: "5023696"},
{revision: "2788", kb: "5023773"},
{revision: "2846", kb: "5025221"},
{revision: "2965", kb: "5026361"},
},
},
},
Expand Down Expand Up @@ -4280,6 +4389,10 @@ var windowsReleases = map[string]map[string]map[string]updateProgram{
{revision: "1368", kb: "5022553"},
{revision: "1487", kb: "5022291"},
{revision: "1547", kb: "5022842"},
{revision: "1607", kb: "5023705"},
{revision: "1668", kb: "5025230"},
{revision: "1726", kb: "5026370"},
{revision: "1787", kb: "5027225"},
},
},
},
Expand Down
17 changes: 14 additions & 3 deletions scanner/windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ func Test_windows_detectKBsFromKernelVersion(t *testing.T) {
},
want: models.WindowsKB{
Applied: nil,
Unapplied: []string{"5020953", "5019959", "5020030", "5021233", "5022282", "5019275", "5022834", "5022906"},
Unapplied: []string{"5020953", "5019959", "5020030", "5021233", "5022282", "5019275", "5022834", "5022906", "5023696", "5023773", "5025221", "5025297", "5026361", "5026435", "5027215", "5027293"},
},
},
{
Expand All @@ -734,7 +734,7 @@ func Test_windows_detectKBsFromKernelVersion(t *testing.T) {
},
want: models.WindowsKB{
Applied: nil,
Unapplied: []string{"5020953", "5019959", "5020030", "5021233", "5022282", "5019275", "5022834", "5022906"},
Unapplied: []string{"5020953", "5019959", "5020030", "5021233", "5022282", "5019275", "5022834", "5022906", "5023696", "5023773", "5025221", "5025297", "5026361", "5026435", "5027215", "5027293"},
},
},
{
Expand All @@ -745,7 +745,7 @@ func Test_windows_detectKBsFromKernelVersion(t *testing.T) {
},
want: models.WindowsKB{
Applied: []string{"5019311", "5017389", "5018427", "5019509", "5018496", "5019980", "5020044", "5021255", "5022303"},
Unapplied: []string{"5022360", "5022845"},
Unapplied: []string{"5022360", "5022845", "5022913", "5023706", "5023778", "5025239", "5025305", "5026372", "5026446", "5027231", "5027303"},
},
},
{
Expand All @@ -756,6 +756,17 @@ func Test_windows_detectKBsFromKernelVersion(t *testing.T) {
},
want: models.WindowsKB{
Applied: []string{"5005575", "5005619", "5006699", "5006745", "5007205", "5007254", "5008223", "5010197", "5009555", "5010796", "5009608", "5010354", "5010421", "5011497", "5011558", "5012604", "5012637", "5013944", "5015013", "5014021", "5014678", "5014665", "5015827", "5015879", "5016627", "5016693", "5017316", "5017381", "5018421", "5020436", "5018485", "5019081", "5021656", "5020032", "5021249", "5022553", "5022291", "5022842"},
Unapplied: []string{"5023705", "5025230", "5026370", "5027225"},
},
},
{
name: "10.0.20348.9999",
base: base{
Distro: config.Distro{Release: "Windows Server 2022"},
osPackages: osPackages{Kernel: models.Kernel{Version: "10.0.20348.9999"}},
},
want: models.WindowsKB{
Applied: []string{"5005575", "5005619", "5006699", "5006745", "5007205", "5007254", "5008223", "5010197", "5009555", "5010796", "5009608", "5010354", "5010421", "5011497", "5011558", "5012604", "5012637", "5013944", "5015013", "5014021", "5014678", "5014665", "5015827", "5015879", "5016627", "5016693", "5017316", "5017381", "5018421", "5020436", "5018485", "5019081", "5021656", "5020032", "5021249", "5022553", "5022291", "5022842", "5023705", "5025230", "5026370", "5027225"},
Unapplied: nil,
},
},
Expand Down

0 comments on commit 457a3a9

Please sign in to comment.