check-msdefender 1.1.10__py3-none-any.whl → 1.1.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- check_msdefender/__init__.py +1 -1
- check_msdefender/services/products_service.py +17 -6
- {check_msdefender-1.1.10.dist-info → check_msdefender-1.1.11.dist-info}/METADATA +1 -1
- {check_msdefender-1.1.10.dist-info → check_msdefender-1.1.11.dist-info}/RECORD +7 -7
- {check_msdefender-1.1.10.dist-info → check_msdefender-1.1.11.dist-info}/WHEEL +0 -0
- {check_msdefender-1.1.10.dist-info → check_msdefender-1.1.11.dist-info}/entry_points.txt +0 -0
- {check_msdefender-1.1.10.dist-info → check_msdefender-1.1.11.dist-info}/licenses/LICENSE +0 -0
check_msdefender/__init__.py
CHANGED
|
@@ -107,24 +107,37 @@ class ProductsService:
|
|
|
107
107
|
|
|
108
108
|
# Create details for output
|
|
109
109
|
details = []
|
|
110
|
+
total_score = 0
|
|
110
111
|
if software_vulnerabilities:
|
|
111
112
|
summary_line = f"{len(products)} total CVEs (Critical: {critical_count}, High: {high_count}, Medium: {medium_count}, Low: {low_count}), {len(vulnerable_software)} vulnerable software"
|
|
112
113
|
details.append(summary_line)
|
|
113
114
|
|
|
115
|
+
score = 0
|
|
114
116
|
# Add software details (limit to 10)
|
|
115
117
|
for software in list(software_vulnerabilities.values())[:10]:
|
|
116
118
|
cve_count = len(software["cves"])
|
|
117
119
|
unique_cves = list(set(software["cves"]))
|
|
118
120
|
cve_list = ", ".join(unique_cves[:5]) # Show first 5 CVEs
|
|
119
|
-
|
|
121
|
+
severities = ", ".join(software["severities"]) # Show first 5 CVEs
|
|
122
|
+
for severity_name in software["severities"]:
|
|
123
|
+
severity = severity_name.lower()
|
|
124
|
+
if severity == "critical":
|
|
125
|
+
score += 100
|
|
126
|
+
elif severity == "high":
|
|
127
|
+
score += 10
|
|
128
|
+
elif severity == "medium":
|
|
129
|
+
score += 5
|
|
130
|
+
elif severity == "low":
|
|
131
|
+
score += 1
|
|
132
|
+
|
|
120
133
|
if len(unique_cves) > 5:
|
|
121
134
|
cve_list += f".. (+{len(unique_cves) - 5} more)"
|
|
122
135
|
|
|
123
136
|
details.append(
|
|
124
137
|
f"{software['name']} {software['version']} ({software['vendor']}) - "
|
|
125
|
-
f"{
|
|
138
|
+
f"{score} ({cve_count}: {severities}) weaknesses ({cve_list})"
|
|
126
139
|
)
|
|
127
|
-
|
|
140
|
+
total_score += score
|
|
128
141
|
# Add paths (limit to 4)
|
|
129
142
|
for path in list(software["paths"])[:4]:
|
|
130
143
|
details.append(f" - {path}")
|
|
@@ -133,10 +146,8 @@ class ProductsService:
|
|
|
133
146
|
# - Critical vulnerabilities trigger critical threshold
|
|
134
147
|
# - High/Medium vulnerabilities trigger warning threshold
|
|
135
148
|
# - Low vulnerabilities or no vulnerabilities are OK
|
|
136
|
-
|
|
137
|
-
value = (critical_count * 100) + (high_count *10) + (medium_count*5) + (low_count*1)
|
|
138
149
|
result = {
|
|
139
|
-
"value":
|
|
150
|
+
"value": total_score,
|
|
140
151
|
"details": details,
|
|
141
152
|
"vulnerable_count": len(vulnerable_software),
|
|
142
153
|
"critical_count": critical_count,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
check_msdefender-1.1.
|
|
2
|
-
check_msdefender-1.1.
|
|
3
|
-
check_msdefender-1.1.
|
|
4
|
-
check_msdefender-1.1.
|
|
5
|
-
check_msdefender/__init__.py,sha256=
|
|
1
|
+
check_msdefender-1.1.11.dist-info/METADATA,sha256=MHgcTdR_4DiCAjGildy8lZz6SA_aJDAjrFOJ3ALmhL8,14799
|
|
2
|
+
check_msdefender-1.1.11.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
3
|
+
check_msdefender-1.1.11.dist-info/entry_points.txt,sha256=OqVzHI1PaD9V22g0K7BhA2nYv4O-pH8mcLzuGdsk5rM,79
|
|
4
|
+
check_msdefender-1.1.11.dist-info/licenses/LICENSE,sha256=kW3DwIsKc9HVYdS4f4tI6sLo-EPqBQbz-WmuvHU4Nak,1065
|
|
5
|
+
check_msdefender/__init__.py,sha256=aslZRLikC8XahSmYabpKhejyLgruWcHT3l3WD7hSA_s,161
|
|
6
6
|
check_msdefender/__main__.py,sha256=TuNsRSdnkQm9OdBTAwD5aB2zV_Irc50WgylVWhrfnLY,124
|
|
7
7
|
check_msdefender/check_msdefender.py,sha256=OO4Tg2DBW28AT-2LOH-qJM2pE5TPcF615BF7HjyZsmA,137
|
|
8
8
|
check_msdefender/cli/__init__.py,sha256=NWaS5ZI9_252AcReugF_WGPMOvQ_B7sC_s3pSrGujcI,291
|
|
@@ -31,6 +31,6 @@ check_msdefender/services/lastseen_service.py,sha256=LiNVeUbAoMzowMvE90P7zCtKFHB
|
|
|
31
31
|
check_msdefender/services/machines_service.py,sha256=KLRwltpYtwg_qtW6BGIxlH-PB9LcnEyW-i3C4RGSD30,3238
|
|
32
32
|
check_msdefender/services/models.py,sha256=CDmQ5vU0-GawIalqXjXNk3rry6gsyjv6eSlW2NiXwQ0,979
|
|
33
33
|
check_msdefender/services/onboarding_service.py,sha256=RIOsvALCoKV0YqnCHKYRkelSPrO-F-6vNBLlto4MpiI,2686
|
|
34
|
-
check_msdefender/services/products_service.py,sha256=
|
|
34
|
+
check_msdefender/services/products_service.py,sha256=_hl8rEy2NJ6E4iPeRzGKJpNj6VosgF5F_kHOVAggXuc,7199
|
|
35
35
|
check_msdefender/services/vulnerabilities_service.py,sha256=LuRRQlFt-K82tGUhLCx_QCOp4CbBgSp7fktmeSSoa9o,6838
|
|
36
|
-
check_msdefender-1.1.
|
|
36
|
+
check_msdefender-1.1.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|