Skip to content
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

Web UI dataset #617

Open
wants to merge 51 commits into
base: main
Choose a base branch
from
Open

Web UI dataset #617

wants to merge 51 commits into from

Conversation

VukW
Copy link
Contributor

@VukW VukW commented Sep 16, 2024

No description provided.

@VukW VukW requested a review from a team as a code owner September 16, 2024 16:17
@VukW VukW requested a deployment to testing-external-code September 16, 2024 16:17 — with GitHub Actions Waiting
Copy link
Contributor

github-actions bot commented Sep 16, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

full_path = os.path.join(BASE_DIR, path)
os.path.join(BASE_DIR, path)

if not os.path.exists(full_path) or not os.path.isdir(full_path):

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function lists all files and folders on the server side. So, yes, it is expected to use user's given path to list its content (though still may be dangerous? I don't know)

full_path = os.path.join(BASE_DIR, path)
os.path.join(BASE_DIR, path)

if not os.path.exists(full_path) or not os.path.isdir(full_path):

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.

# List directories inside the path
folders = []
for item in os.listdir(full_path):

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
folders = []
for item in os.listdir(full_path):
item_path = os.path.join(full_path, item)
if os.path.isdir(item_path):

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
@router.get("/fetch-yaml")
async def fetch_yaml(url: str):
try:
response = requests.get(url)

Check failure

Code scanning / CodeQL

Full server-side request forgery Critical

The full URL of this request depends on a
user-provided value
.
@VukW VukW requested a deployment to testing-external-code September 17, 2024 10:30 — with GitHub Actions Waiting
@VukW VukW requested a deployment to testing-external-code September 17, 2024 10:37 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant