@@ -126,11 +126,11 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
126
126
#st.html("<img height='96' width='96' src='https://cdn.simpleicons.org/SAP/white' />")
127
127
#st.title("SAP Compass Priority Vulnerabilities")
128
128
129
- st .toast ('New 2024 CWE Top 25 for Rethink process' , icon = ":material/emergency_heat:" )
129
+ # st.toast('New 2024 CWE Top 25 for Rethink process', icon=":material/emergency_heat:")
130
130
131
131
132
132
with st .expander ("Vulnerability Summary 2021-2025" , expanded = False , icon = ":material/explore:" ):
133
- st .header (f"From January 2021 to date, :blue[{ df .shape [0 ]} SAP Notes] related to :orange[{ len (df ['cve_id' ].unique ())} CVE-IDs] are reported." )
133
+ st .header (f"From January 2021 to date, :blue[{ df .shape [0 ]} SAP Notes] related to :orange[{ len (df ['cve_id' ].unique ())} CVE-IDs] are reported." , anchor = False )
134
134
135
135
count_by_month = df .groupby ([df ['datePublished' ].dt .to_period ('M' ), 'Priority' ]).size ().reset_index (name = 'v' )
136
136
count_by_month ['cumulative_v' ] = count_by_month .groupby ('Priority' )['v' ].cumsum ()
@@ -170,8 +170,8 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
170
170
171
171
tab1 , tab2 = st .tabs (["Vunls Top Priority" , "CVE Info" ])
172
172
with tab1 :
173
- st .header (f":violet[Top { top } ] Priority Vulnerabilities of :blue[{ filtered_df .shape [0 ]} ] selected SAP Notes" )
174
- st .header (f':orange[{ top_vs .shape [0 ]} ] Unique CVE-IDs & :red[{ kev .shape [0 ]} on KEV]' )
173
+ st .header (f":violet[Top { top } ] Priority Vulnerabilities of :blue[{ filtered_df .shape [0 ]} ] selected SAP Notes" , anchor = False )
174
+ st .header (f':orange[{ top_vs .shape [0 ]} ] Unique CVE-IDs & :red[{ kev .shape [0 ]} on KEV]' , anchor = False )
175
175
176
176
st .dataframe (
177
177
sap_cve_top25 [['Note#' ,'cve_id' ,'Priority' ,'priority_l' ,'priority' ,'cvss' ,'kev' ,'epss' ,'cweId' ,'cwe_t25' ,'composite_score' ]],
@@ -190,12 +190,12 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
190
190
fig .add_vline (x = 6.0 , line_color = 'grey' , line_dash = 'dash' ,
191
191
annotation_text = "Threshold CVSS: 6.0" , annotation_position = "top right" )
192
192
fig .update_layout (xaxis_title = "CVSS Score" , yaxis_title = "EPSS %" )
193
- st .subheader ("EPSS Score Distribution" )
193
+ st .subheader ("EPSS Score Distribution" , anchor = False )
194
194
st .plotly_chart (fig , use_container_width = True )
195
195
196
196
with tab2 :
197
- st .subheader ('CVE Details by Rethink Priority Score' )
198
- st .header (f':orange[{ top_vs .shape [0 ]} CVE-IDs] | :red[{ kev .shape [0 ]} on KEV] | :blue[{ cweT25 .shape [0 ]} on CWE Top 25]' )
197
+ st .subheader ('CVE Details by Rethink Priority Score' , anchor = False )
198
+ st .header (f':orange[{ top_vs .shape [0 ]} CVE-IDs] | :red[{ kev .shape [0 ]} on KEV] | :blue[{ cweT25 .shape [0 ]} on CWE Top 25]' , anchor = False )
199
199
st .dataframe (
200
200
top_vs [['cveInfo' ,'Priority' ,'priority_l' ,'priority' ,'cweId' ,'epss' ,'cvss' ,
201
201
'cvss_severity' ,'kev' ,'sap_note_year' ,'cwe_t25' ,'epss_l_30' ,'epss_trend' ,
@@ -209,14 +209,14 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
209
209
hide_index = True
210
210
)
211
211
212
- st .subheader ('Treemap Score Priorities' )
212
+ st .subheader ('Treemap Score Priorities' , anchor = False )
213
213
fig_tm = px .treemap (top_vs , path = [px .Constant ("CVE Details" ), 'Priority' , 'sap_note_year' , 'priority' , 'priority_l' ], values = 'composite_score' )
214
214
fig_tm .update_traces (marker_colorscale = ['#5eadf2' ,'#3b2e8c' ,'#04adbf' ,'#ba38f2' ,'#ff1493' ])
215
215
fig_tm .update_layout (margin = dict (t = 50 , l = 25 , r = 25 , b = 25 ))
216
216
st .plotly_chart (fig_tm , theme = None , use_container_width = True )
217
217
st .divider ()
218
218
219
- st .header (f":violet[{ filtered_df .shape [0 ]} ] Selected Vulnerabilities" )
219
+ st .header (f":violet[{ filtered_df .shape [0 ]} ] Selected Vulnerabilities" , anchor = False )
220
220
st .dataframe (
221
221
filtered_df [['Note#' , 'cveInfo' , 'cveSAP' , 'Priority' , 'priority_l' , 'priority' , 'epss' , 'cvss' , 'product_l' ]],
222
222
column_config = {
@@ -231,7 +231,7 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
231
231
232
232
with col1 :
233
233
# Show CVSS Distribution
234
- st .subheader ("EPSS Score Distribution" )
234
+ st .subheader ("EPSS Score Distribution" , anchor = False )
235
235
chart_data = filtered_df [["cvss" ,"epss" ,"cve_id" ,"Note#" ]]
236
236
st .scatter_chart (chart_data ,
237
237
y = "epss" ,
@@ -243,7 +243,7 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
243
243
244
244
with col2 :
245
245
# Potentially Display another chart (like by date)
246
- st .subheader ("Vulns Year Published" )
246
+ st .subheader ("Vulns Year Published" , anchor = False )
247
247
filtered_df ['yp' ] = filtered_df ['datePublished' ].values .astype ('datetime64[Y]' )
248
248
count_by_date = filtered_df .groupby (filtered_df ['yp' ].dt .date ).size ().reset_index (name = 'count' )
249
249
print (count_by_date )
@@ -253,7 +253,7 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
253
253
254
254
255
255
256
- st .subheader ("Parallel Category Diagram" )
256
+ st .subheader ("Parallel Category Diagram" , anchor = False )
257
257
dfp = filtered_df [['sap_note_year' ,'year' ,'priority_l' ,'priority' ,'Priority' ,'cvss_severity' ]]
258
258
#dfp['team'] = pd.factorize(dfp['year'])[0].astype('int')
259
259
fig_parallel = px .parallel_categories (
@@ -275,5 +275,5 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
275
275
st .divider ()
276
276
277
277
with st .expander ("Dataset SAP Vulnerabilities" ):
278
- st .subheader ("Dataset Raw" )
278
+ st .subheader ("Dataset Raw" , anchor = False )
279
279
st .write (df )
0 commit comments