-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[security] fix 'assert' & 'xml' & 'md5' vulnerability in python files (…
…#1962) Fix: #1961 ## 1. Use raise exception instead of `assert` in python files. Test files are not included. ## 2. Replace `xml` with `defusedxml` ## 3. Fix MD5 issue ~~In Triton code, md5 is used for hash key generation, not for security purpose, so this PR adds `usedforsecurity=False` to solve severity issue found by Bandit~~ Replace md5 with sha256
- Loading branch information
1 parent
9b5b553
commit 2d59963
Showing
8 changed files
with
17 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,7 +124,7 @@ jobs: | |
|
||
- name: Install test dependencies | ||
run: | | ||
pip install pytest pytest-xdist pytest-rerunfailures pytest-select pytest-timeout expecttest | ||
pip install pytest pytest-xdist pytest-rerunfailures pytest-select pytest-timeout expecttest defusedxml | ||
pip install git+https://github.com/kwasd/[email protected] | ||
- name: Setup Triton | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,7 +111,7 @@ export TRITON_PROJ=$BASE/intel-xpu-backend-for-triton | |
export TRITON_PROJ_BUILD=$TRITON_PROJ/python/build | ||
export SCRIPTS_DIR=$(cd $(dirname "$0") && pwd) | ||
|
||
python3 -m pip install lit pytest pytest-xdist pytest-rerunfailures pytest-select pytest-timeout setuptools==69.5.1 | ||
python3 -m pip install lit pytest pytest-xdist pytest-rerunfailures pytest-select pytest-timeout setuptools==69.5.1 defusedxml | ||
|
||
if [ "$TRITON_TEST_WARNING_REPORTS" == true ]; then | ||
python3 -m pip install git+https://github.com/kwasd/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters