-
Notifications
You must be signed in to change notification settings - Fork 0
Merge Template #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge Template #49
Changes from all commits
a47e05e
97a4126
a188904
87e82c5
b035ac1
99c30a6
e1cc1db
31f9a55
bfaa0d4
c320944
f32dbd2
45b6e1b
7cd0a41
749584a
3b26eaf
b50a587
dfdd384
db3be5b
86f01df
57a4343
fc80ccd
548feaa
ca1771f
de51dd9
5104123
346c934
d701e1e
98f0d9f
14308e7
a1df75c
c17cc66
452c572
362adef
33aa04c
dc3d146
3535efd
7e5fbb2
7afb63a
431c6e9
f49eaf1
d8e94cd
19f131c
fa5b563
db30548
ca182a0
1a630bf
64acec6
7771337
76b5d2d
f64a8bb
9f370f6
c3b82b0
9d816ec
c00fa41
49fa2d0
5c17a4b
9495ee2
e91f7c7
f6c383b
01854e0
6161dbc
c5c184d
e80292d
6b12493
21c82ff
d65c9c9
7933bc9
397e361
f3cd0d8
a6d8ba7
3659310
768d258
e8c14e7
f459e66
e7ff3db
2b2661f
c13685d
75f027a
a181b73
1c67d5f
85fc9c3
c03f4e6
7189314
75fa783
f94ecff
d8bc532
e3857b8
15e5a13
7183499
2b6cb9a
7fa851f
df9aab5
160ad96
a2070ea
b4209d7
63ad905
5af2fd7
ed8abcd
e3f2fd1
84c6e29
c78b10e
c3a0b2b
09ce809
58de157
66f1943
5c9c8fa
125871d
1f76990
94bc3a7
a509a08
edb7fcc
a6c7e29
4e67b8c
2b0ef60
887157c
cc582b4
1d07663
8b4f8b0
d3a80d6
8c743c8
3e21099
1619a14
aa98c1c
9dc5e33
2a1a7e5
3e0c71f
3206617
5c8bd14
15a680b
5fb4b22
2d8323c
30feb90
c04a45a
cf5cd82
d722bb8
cbe9ed9
edbdb16
b12a3b2
9a2d063
7a9daa7
1e788c5
a2441d2
51a01fd
81d599e
0c5fdbb
78c4178
d5756dc
92a6979
6a7766a
f5be3ef
692c6db
b2786f9
3352c27
c1c8b9e
175e027
65c152b
f8a9cb4
5f126f7
0fa6250
57fccde
2993a48
ff0f4ea
27bdb85
7d12753
3ec2995
49c8785
98c2920
6d91278
c5b0758
56e2232
e326c4b
a0f46b8
c716217
470a747
3c76e97
3bc48a5
7bd64e4
8ff1d3f
951c90c
05ffefa
3b8c415
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,4 +36,4 @@ | |
| } | ||
|
|
||
| pg = st.navigation(pages, expanded=True) | ||
| pg.run() | ||
| pg.run() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| version: '3.8' | ||
|
|
||
| services: | ||
| openms-streamlit-template: | ||
| build: | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,12 +1,140 @@ | ||||||||||
| # the requirements.txt file is intended for deployment on streamlit cloud and if the simple container is built | ||||||||||
| # note that it is much more restricted in terms of installing third-parties / etc. | ||||||||||
| # preferably use the batteries included or simple docker file for local hosting | ||||||||||
| streamlit==1.43.0 | ||||||||||
| numpy==1.26.4 # pandas and numpy are dependencies of pyopenms, however, pyopenms needs numpy<=1.26.4 | ||||||||||
| plotly==5.22.0 | ||||||||||
| # | ||||||||||
| # This file is autogenerated by pip-compile with Python 3.12 | ||||||||||
| # by the following command: | ||||||||||
| # | ||||||||||
| # pip-compile --output-file=requirements.txt pyproject.toml | ||||||||||
| # | ||||||||||
| altair==5.5.0 | ||||||||||
| # via streamlit | ||||||||||
| attrs==25.3.0 | ||||||||||
| # via | ||||||||||
| # jsonschema | ||||||||||
| # referencing | ||||||||||
| blinker==1.9.0 | ||||||||||
| # via streamlit | ||||||||||
| cachetools==5.5.2 | ||||||||||
| # via streamlit | ||||||||||
| captcha==0.7.1 | ||||||||||
| pyopenms>=3.2.0 | ||||||||||
| pyarrow<16 | ||||||||||
| streamlit-js-eval | ||||||||||
| # via src (pyproject.toml) | ||||||||||
| certifi==2025.1.31 | ||||||||||
| # via requests | ||||||||||
| charset-normalizer==3.4.1 | ||||||||||
| # via requests | ||||||||||
| click==8.1.8 | ||||||||||
| # via streamlit | ||||||||||
| contourpy==1.3.1 | ||||||||||
| # via matplotlib | ||||||||||
| cycler==0.12.1 | ||||||||||
| # via matplotlib | ||||||||||
| fonttools==4.56.0 | ||||||||||
| # via matplotlib | ||||||||||
| gitdb==4.0.12 | ||||||||||
| # via gitpython | ||||||||||
| gitpython==3.1.44 | ||||||||||
| # via streamlit | ||||||||||
| idna==3.10 | ||||||||||
| # via requests | ||||||||||
| jinja2==3.1.6 | ||||||||||
| # via | ||||||||||
| # altair | ||||||||||
| # pydeck | ||||||||||
| jsonschema==4.23.0 | ||||||||||
| # via altair | ||||||||||
| jsonschema-specifications==2024.10.1 | ||||||||||
| # via jsonschema | ||||||||||
| kiwisolver==1.4.8 | ||||||||||
| # via matplotlib | ||||||||||
| markupsafe==3.0.2 | ||||||||||
| # via jinja2 | ||||||||||
| matplotlib==3.10.1 | ||||||||||
| # via pyopenms | ||||||||||
| narwhals==1.32.0 | ||||||||||
| # via altair | ||||||||||
| numpy==1.26.4 | ||||||||||
| # via | ||||||||||
| # contourpy | ||||||||||
| # matplotlib | ||||||||||
| # pandas | ||||||||||
| # pydeck | ||||||||||
| # pyopenms | ||||||||||
| # src (pyproject.toml) | ||||||||||
| # streamlit | ||||||||||
| packaging==24.2 | ||||||||||
| # via | ||||||||||
| # altair | ||||||||||
| # matplotlib | ||||||||||
| # plotly | ||||||||||
| # streamlit | ||||||||||
| pandas==2.2.3 | ||||||||||
| # via | ||||||||||
| # pyopenms | ||||||||||
| # pyopenms-viz | ||||||||||
| # streamlit | ||||||||||
| pillow==11.1.0 | ||||||||||
| # via | ||||||||||
| # captcha | ||||||||||
| # matplotlib | ||||||||||
| # streamlit | ||||||||||
| plotly==5.22.0 | ||||||||||
| # via src (pyproject.toml) | ||||||||||
| protobuf==5.29.4 | ||||||||||
| # via streamlit | ||||||||||
| psutil==7.0.0 | ||||||||||
| # via src (pyproject.toml) | ||||||||||
| pyarrow==19.0.1 | ||||||||||
| # via streamlit | ||||||||||
| pydeck==0.9.1 | ||||||||||
| # via streamlit | ||||||||||
| pyopenms==3.3.0 | ||||||||||
| # via src (pyproject.toml) | ||||||||||
| pyopenms-viz==1.0.0 | ||||||||||
| # via src (pyproject.toml) | ||||||||||
| pyparsing==3.2.3 | ||||||||||
| # via matplotlib | ||||||||||
| python-dateutil==2.9.0.post0 | ||||||||||
| # via | ||||||||||
| # matplotlib | ||||||||||
| # pandas | ||||||||||
| pytz==2025.2 | ||||||||||
| # via pandas | ||||||||||
| referencing==0.36.2 | ||||||||||
| # via | ||||||||||
| # jsonschema | ||||||||||
| # jsonschema-specifications | ||||||||||
| requests==2.32.3 | ||||||||||
| # via streamlit | ||||||||||
| rpds-py==0.24.0 | ||||||||||
| # via | ||||||||||
| # jsonschema | ||||||||||
| # referencing | ||||||||||
| six==1.17.0 | ||||||||||
| # via python-dateutil | ||||||||||
| smmap==5.0.2 | ||||||||||
| # via gitdb | ||||||||||
| streamlit==1.49.0 | ||||||||||
| # via | ||||||||||
| # src (pyproject.toml) | ||||||||||
| # streamlit-js-eval | ||||||||||
| streamlit-js-eval==0.1.7 | ||||||||||
| # via src (pyproject.toml) | ||||||||||
| tenacity==9.0.0 | ||||||||||
| # via | ||||||||||
| # plotly | ||||||||||
| # streamlit | ||||||||||
| toml==0.10.2 | ||||||||||
| # via streamlit | ||||||||||
| tornado==6.4.2 | ||||||||||
| # via streamlit | ||||||||||
|
Comment on lines
+126
to
+127
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security: upgrade Tornado to 6.5.0+. Apply: -tornado==6.4.2
+tornado==6.5.0Refs: GHSA-7cx3-6m66-7c5m (patched in 6.5.0). (github.com) 📝 Committable suggestion
Suggested change
🧰 Tools🪛 OSV Scanner (2.1.0)[HIGH] 126-126: tornado 6.4.2: Tornado vulnerable to excessive logging caused by malformed multipart form data 🤖 Prompt for AI Agents |
||||||||||
| typing-extensions==4.13.0 | ||||||||||
| # via | ||||||||||
| # altair | ||||||||||
| # referencing | ||||||||||
| # streamlit | ||||||||||
| tzdata==2025.2 | ||||||||||
| # via pandas | ||||||||||
| urllib3==2.3.0 | ||||||||||
| # via requests | ||||||||||
| watchdog==6.0.0 | ||||||||||
| # via streamlit | ||||||||||
| xlsxwriter | ||||||||||
| scipy>=1.15 | ||||||||||
| psutil | ||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,14 +1,23 @@ | ||||||||||||||||||||||
| from pathlib import Path | ||||||||||||||||||||||
| import streamlit as st | ||||||||||||||||||||||
| import streamlit.components.v1 as st_components | ||||||||||||||||||||||
| from streamlit.source_util import page_icon_and_name, calc_md5, get_pages, _on_pages_changed | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| from streamlit.source_util import page_icon_and_name | ||||||||||||||||||||||
| from captcha.image import ImageCaptcha | ||||||||||||||||||||||
| from pathlib import Path | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| import hashlib | ||||||||||||||||||||||
| import random | ||||||||||||||||||||||
| import string | ||||||||||||||||||||||
| import os | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| def calc_md5(string : str): | ||||||||||||||||||||||
| return hashlib.md5(string.encode()).hexdigest() | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| def get_pages(): | ||||||||||||||||||||||
| return st.runtime.get_pages() | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| def set_pages(pages : dict): | ||||||||||||||||||||||
| st.runtime.set_pages(pages) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| def delete_all_pages(main_script_path_str: str) -> None: | ||||||||||||||||||||||
| """ | ||||||||||||||||||||||
|
|
@@ -22,7 +31,7 @@ def delete_all_pages(main_script_path_str: str) -> None: | |||||||||||||||||||||
|
|
||||||||||||||||||||||
| """ | ||||||||||||||||||||||
| # Get all pages from the app's configuration | ||||||||||||||||||||||
| current_pages = get_pages(main_script_path_str) | ||||||||||||||||||||||
| current_pages = get_pages() | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Create a list to store keys pages to delete | ||||||||||||||||||||||
| keys_to_delete = [] | ||||||||||||||||||||||
|
|
@@ -37,7 +46,7 @@ def delete_all_pages(main_script_path_str: str) -> None: | |||||||||||||||||||||
| del current_pages[key] | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Refresh the pages configuration | ||||||||||||||||||||||
| _on_pages_changed.send() | ||||||||||||||||||||||
| set_pages(current_pages) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| def delete_page(main_script_path_str: str, page_name: str) -> None: | ||||||||||||||||||||||
|
|
@@ -52,15 +61,15 @@ def delete_page(main_script_path_str: str, page_name: str) -> None: | |||||||||||||||||||||
| None | ||||||||||||||||||||||
| """ | ||||||||||||||||||||||
| # Get all pages | ||||||||||||||||||||||
| current_pages = get_pages(main_script_path_str) | ||||||||||||||||||||||
| current_pages = get_pages() | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Iterate over all pages and delete the desired page if found | ||||||||||||||||||||||
| for key, value in current_pages.items(): | ||||||||||||||||||||||
| if value["page_name"] == page_name: | ||||||||||||||||||||||
| del current_pages[key] | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Refresh the pages configuration | ||||||||||||||||||||||
|
Comment on lines
67
to
71
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: deleting from dict while iterating raises RuntimeError. - for key, value in current_pages.items():
- if value["page_name"] == page_name:
- del current_pages[key]
+ keys_to_delete = [k for k, v in list(current_pages.items()) if v.get("page_name") == page_name]
+ for k in keys_to_delete:
+ current_pages.pop(k, None)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| _on_pages_changed.send() | ||||||||||||||||||||||
| set_pages(current_pages) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| def restore_all_pages(main_script_path_str: str) -> None: | ||||||||||||||||||||||
|
|
@@ -74,7 +83,7 @@ def restore_all_pages(main_script_path_str: str) -> None: | |||||||||||||||||||||
| None | ||||||||||||||||||||||
| """ | ||||||||||||||||||||||
| # Get all pages | ||||||||||||||||||||||
| pages = get_pages(main_script_path_str) | ||||||||||||||||||||||
| pages = get_pages() | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Obtain the path to the main script | ||||||||||||||||||||||
| main_script_path = Path(main_script_path_str) | ||||||||||||||||||||||
|
|
@@ -126,7 +135,7 @@ def restore_all_pages(main_script_path_str: str) -> None: | |||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Refresh the page configuration | ||||||||||||||||||||||
| _on_pages_changed.send() | ||||||||||||||||||||||
| set_pages(pages) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| def add_page(main_script_path_str: str, page_name: str) -> None: | ||||||||||||||||||||||
|
|
@@ -141,7 +150,7 @@ def add_page(main_script_path_str: str, page_name: str) -> None: | |||||||||||||||||||||
| None | ||||||||||||||||||||||
| """ | ||||||||||||||||||||||
| # Get all pages | ||||||||||||||||||||||
| pages = get_pages(main_script_path_str) | ||||||||||||||||||||||
| pages = get_pages() | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Obtain the path to the main script | ||||||||||||||||||||||
| main_script_path = Path(main_script_path_str) | ||||||||||||||||||||||
|
|
@@ -168,7 +177,7 @@ def add_page(main_script_path_str: str, page_name: str) -> None: | |||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Refresh the page configuration | ||||||||||||||||||||||
| _on_pages_changed.send() | ||||||||||||||||||||||
| set_pages(pages) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| length_captcha = 5 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,17 +1,18 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import os | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import shutil | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import sys | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import uuid | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import time | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import psutil | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import shutil | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import pandas as pd | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import streamlit as st | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| from typing import Any | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| from pathlib import Path | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| from streamlit.components.v1 import html | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import streamlit as st | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import pandas as pd | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import psutil | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| try: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| from tkinter import Tk, filedialog | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -340,30 +341,25 @@ def render_sidebar(page: str = "") -> None: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # The main page has workspace switcher | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Display workspace switcher if workspace is enabled in local mode | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if st.session_state.settings["enable_workspaces"]: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with st.expander("🖥️ **Workspaces**"): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Workspaces directory specified in the settings.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| st.session_state.settings["workspaces_dir"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| and st.session_state.location == "local" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workspaces_dir = Path( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| st.session_state.settings["workspaces_dir"], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "workspaces-" + st.session_state.settings["repository-name"], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workspaces_dir = ".." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Online: show current workspace name in info text and option to change to other existing workspace | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if st.session_state.location == "local": | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Workspaces directory specified in the settings.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| st.session_state.settings["workspaces_dir"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| and st.session_state.location == "local" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workspaces_dir = Path( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| st.session_state.settings["workspaces_dir"], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "workspaces-" + st.session_state.settings["repository-name"], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workspaces_dir = ".." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Online: show current workspace name in info text and option to change to other existing workspace | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+344
to
+355
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: workspaces_dir may be a str, causing AttributeError on iterdir(). When settings["workspaces_dir"] is falsy, workspaces_dir is ".." (str). You then call workspaces_dir.iterdir(), which will crash. Apply this diff: - else:
- workspaces_dir = ".."
+ else:
+ workspaces_dir = Path("..")
+ # Normalize and ensure it exists (local-only UI)
+ workspaces_dir = workspaces_dir.resolve()
+ workspaces_dir.mkdir(parents=True, exist_ok=True)Optional: add a guard before using options to handle an empty directory. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if st.session_state.location == "local": | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| with st.expander("🖥️ **Workspaces**"): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Define callback function to change workspace | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| def change_workspace(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for key in params.keys(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if key in ['controllo']: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| continue | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if key in st.session_state.keys(): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| del st.session_state[key] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| st.session_state.workspace = Path( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workspaces_dir, st.session_state["chosen-workspace"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| st.query_params.workspace = st.session_state["chosen-workspace"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Get all available workspaces as options | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security: bump protobuf to a patched version.
protobuf==5.29.4 is vulnerable to DoS; patched versions are 4.25.8, 5.29.5, or 6.31.1. Recommend 5.29.5 to stay on the same major/minor.
Apply:
Refs: GitHub Advisory GHSA-8qvm-5x2c-j2w7 (fixed in 5.29.5). (github.com, advisories.gitlab.com)
📝 Committable suggestion
🧰 Tools
🪛 OSV Scanner (2.1.0)
[HIGH] 80-80: protobuf 5.29.4: protobuf-python has a potential Denial of Service issue
(GHSA-8qvm-5x2c-j2w7)
🤖 Prompt for AI Agents