Skip to content

Commit 5634529

Browse files
author
rhnux
committed
update req & - fix
1 parent f9cf6e5 commit 5634529

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

streamlit_app.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
126126
#st.html("<img height='96' width='96' src='https://cdn.simpleicons.org/SAP/white' />")
127127
#st.title("SAP Compass Priority Vulnerabilities")
128128

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:")
130130

131131

132132
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)
134134

135135
count_by_month = df.groupby([df['datePublished'].dt.to_period('M'), 'Priority']).size().reset_index(name='v')
136136
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
170170

171171
tab1, tab2 = st.tabs(["Vunls Top Priority", "CVE Info"])
172172
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)
175175

176176
st.dataframe(
177177
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
190190
fig.add_vline(x=6.0, line_color='grey', line_dash='dash',
191191
annotation_text="Threshold CVSS: 6.0", annotation_position="top right")
192192
fig.update_layout(xaxis_title="CVSS Score", yaxis_title="EPSS %")
193-
st.subheader("EPSS Score Distribution")
193+
st.subheader("EPSS Score Distribution", anchor=False)
194194
st.plotly_chart(fig, use_container_width=True)
195195

196196
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)
199199
st.dataframe(
200200
top_vs[['cveInfo','Priority','priority_l','priority','cweId','epss','cvss',
201201
'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
209209
hide_index=True
210210
)
211211

212-
st.subheader('Treemap Score Priorities')
212+
st.subheader('Treemap Score Priorities', anchor=False)
213213
fig_tm = px.treemap(top_vs, path=[px.Constant("CVE Details"), 'Priority', 'sap_note_year', 'priority', 'priority_l'], values='composite_score')
214214
fig_tm.update_traces(marker_colorscale=['#5eadf2','#3b2e8c','#04adbf','#ba38f2','#ff1493'])
215215
fig_tm.update_layout(margin = dict(t=50, l=25, r=25, b=25))
216216
st.plotly_chart(fig_tm, theme=None, use_container_width=True)
217217
st.divider()
218218

219-
st.header(f":violet[{filtered_df.shape[0]}] Selected Vulnerabilities")
219+
st.header(f":violet[{filtered_df.shape[0]}] Selected Vulnerabilities", anchor=False)
220220
st.dataframe(
221221
filtered_df[['Note#', 'cveInfo', 'cveSAP', 'Priority', 'priority_l', 'priority', 'epss', 'cvss', 'product_l']],
222222
column_config={
@@ -231,7 +231,7 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
231231

232232
with col1:
233233
# Show CVSS Distribution
234-
st.subheader("EPSS Score Distribution")
234+
st.subheader("EPSS Score Distribution", anchor=False)
235235
chart_data = filtered_df[["cvss","epss","cve_id","Note#"]]
236236
st.scatter_chart(chart_data,
237237
y="epss",
@@ -243,7 +243,7 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
243243

244244
with col2:
245245
# Potentially Display another chart (like by date)
246-
st.subheader("Vulns Year Published")
246+
st.subheader("Vulns Year Published", anchor=False)
247247
filtered_df['yp'] = filtered_df['datePublished'].values.astype('datetime64[Y]')
248248
count_by_date = filtered_df.groupby(filtered_df['yp'].dt.date).size().reset_index(name='count')
249249
print(count_by_date)
@@ -253,7 +253,7 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
253253

254254

255255

256-
st.subheader("Parallel Category Diagram")
256+
st.subheader("Parallel Category Diagram", anchor=False)
257257
dfp = filtered_df[['sap_note_year','year','priority_l','priority','Priority','cvss_severity']]
258258
#dfp['team'] = pd.factorize(dfp['year'])[0].astype('int')
259259
fig_parallel = px.parallel_categories(
@@ -275,5 +275,5 @@ def process_vulnerability_data(ydf, kev_weight=3, cvss_multiplier=2, epss_up_mul
275275
st.divider()
276276

277277
with st.expander("Dataset SAP Vulnerabilities"):
278-
st.subheader("Dataset Raw")
278+
st.subheader("Dataset Raw", anchor = False)
279279
st.write(df)

0 commit comments

Comments
 (0)