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

Replace xml.etree.ElementTree.parse with its defusedxml #1230

Merged
merged 3 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ paramiko
pytest==8.3.4
pytest-asyncio==0.25.0
pytest-mock==3.14.0
defusedxml==0.7.1
4 changes: 2 additions & 2 deletions tests/end_to_end/utils/summary_helper.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2020-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import xml.etree.ElementTree as ET
from defusedxml.ElementTree import parse as defused_parse
from lxml import etree
import os
from pathlib import Path
Expand All @@ -17,7 +17,7 @@
print(f"Results XML file not found at {result_xml}. Exiting...")
exit(1)

tree = ET.parse(result_xml, parser=parser)
tree = defused_parse(result_xml, parser=parser)

# Get the root element
testsuites = tree.getroot()
Expand Down
Loading