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

Move to lxml #286

Merged
merged 3 commits into from May 23, 2022
Merged

Move to lxml #286

merged 3 commits into from May 23, 2022

Conversation

EnricoMi
Copy link
Owner

No description provided.


import junitparser
from junitparser import Element, JUnitXml, TestCase, TestSuite, Skipped
from junitparser.junitparser import etree

from publish.unittestresults import ParsedUnitTestResults, UnitTestCase, ParseError

try:
import lxml
Copy link

Choose a reason for hiding this comment

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

blacklist: Using lxml to parse untrusted XML data is known to be vulnerable to XML attacks. Replace lxml with the equivalent defusedxml package.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Owner Author

Choose a reason for hiding this comment

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

defusedxml.lxml is deprecated

Copy link
Owner Author

Choose a reason for hiding this comment

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

@sonatype-lift ignore

Copy link

Choose a reason for hiding this comment

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

I've recorded this as ignored for this pull request. If you change your mind, just comment @sonatype-lift unignore.


import junitparser
from junitparser import Element, JUnitXml, TestCase, TestSuite, Skipped
from junitparser.junitparser import etree

from publish.unittestresults import ParsedUnitTestResults, UnitTestCase, ParseError

try:
import lxml
Copy link

Choose a reason for hiding this comment

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

opt.semgrep.python.lang.security.use-defused-xml.use-defused-xml: Found use of the native Python XML libraries, which is vulnerable to XML external entity (XXE)
attacks. The Python documentation recommends the 'defusedxml' library instead if the XML being
loaded is untrusted.

(at-me in a reply with help or ignore)


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Owner Author

Choose a reason for hiding this comment

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

defusedxml.lxml is deprecated

Copy link
Owner Author

Choose a reason for hiding this comment

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

@sonatype-lift ignore

Copy link

Choose a reason for hiding this comment

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

I've recorded this as ignored for this pull request. If you change your mind, just comment @sonatype-lift unignore.

@github-actions

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented May 23, 2022

Test Results (macOS 12 python installed)

       69 files  ±0         69 suites  ±0   3m 38s ⏱️ -1s
     280 tests ±0       280 ✔️ ±0      0 💤 ±0  0 ±0 
19 320 runs  ±0  18 780 ✔️ ±0  540 💤 ±0  0 ±0 

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 23, 2022

Test Results (macOS python installed)

       69 files  ±0         69 suites  ±0   3m 38s ⏱️ -1s
     280 tests ±0       280 ✔️ ±0      0 💤 ±0  0 ±0 
19 320 runs  ±0  18 780 ✔️ ±0  540 💤 ±0  0 ±0 

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 23, 2022

Test Results (Test Files)

  26 files  ±0      4 errors  23 suites  ±0   39m 21s ⏱️ ±0s
279 tests ±0  228 ✔️ ±0  20 💤 ±0  25 ±0  6 🔥 ±0 
450 runs  ±0  358 ✔️ ±0  57 💤 ±0  28 ±0  7 🔥 ±0 

For more details on these parsing errors, failures and errors, see this check.

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 23, 2022

Test Results (Dockerfile)

       69 files  ±0         69 suites  ±0   3m 38s ⏱️ -1s
     280 tests ±0       280 ✔️ ±0      0 💤 ±0  0 ±0 
19 320 runs  ±0  18 780 ✔️ ±0  540 💤 ±0  0 ±0 

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 23, 2022

Test Results (Linux python 3.6)

       69 files  ±0         69 suites  ±0   3m 38s ⏱️ -1s
     280 tests ±0       280 ✔️ ±0      0 💤 ±0  0 ±0 
19 320 runs  ±0  18 780 ✔️ ±0  540 💤 ±0  0 ±0 

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 23, 2022

Test Results (Linux python installed)

       69 files  ±0         69 suites  ±0   3m 38s ⏱️ -1s
     280 tests ±0       280 ✔️ ±0      0 💤 ±0  0 ±0 
19 320 runs  ±0  18 780 ✔️ ±0  540 💤 ±0  0 ±0 

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 23, 2022

Test Results (Docker Image)

       69 files  ±0         69 suites  ±0   3m 38s ⏱️ -1s
     280 tests ±0       280 ✔️ ±0      0 💤 ±0  0 ±0 
19 320 runs  ±0  18 780 ✔️ ±0  540 💤 ±0  0 ±0 

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 23, 2022

Test Results (macOS python 3.6)

       69 files  ±0         69 suites  ±0   3m 38s ⏱️ -1s
     280 tests ±0       280 ✔️ ±0      0 💤 ±0  0 ±0 
19 320 runs  ±0  18 780 ✔️ ±0  540 💤 ±0  0 ±0 

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 23, 2022

Test Results (Linux 22.04 python installed)

       69 files  ±0         69 suites  ±0   3m 38s ⏱️ -1s
     280 tests ±0       280 ✔️ ±0      0 💤 ±0  0 ±0 
19 320 runs  ±0  18 780 ✔️ ±0  540 💤 ±0  0 ±0 

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 23, 2022

Test Results (Windows python installed)

       69 files  ±0         69 suites  ±0   3m 38s ⏱️ -1s
     280 tests ±0       280 ✔️ ±0      0 💤 ±0  0 ±0 
19 320 runs  ±0  18 780 ✔️ ±0  540 💤 ±0  0 ±0 

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented May 23, 2022

Test Results (reference)

       69 files  ±0         69 suites  ±0   3m 38s ⏱️ -1s
     280 tests ±0       280 ✔️ ±0      0 💤 ±0  0 ±0 
19 320 runs  ±0  18 780 ✔️ ±0  540 💤 ±0  0 ±0 

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

♻️ This comment has been updated with latest results.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link

Test Results (setup-python)

       69 files  ±0         69 suites  ±0   3m 38s ⏱️ -1s
     280 tests ±0       280 ✔️ ±0      0 💤 ±0  0 ±0 
19 320 runs  ±0  18 780 ✔️ ±0  540 💤 ±0  0 ±0 

Results for commit 95718c8. ± Comparison against base commit c8ce9bb.

@EnricoMi EnricoMi marked this pull request as ready for review May 23, 2022 13:08
@EnricoMi EnricoMi merged commit 0d4dba7 into master May 23, 2022
@EnricoMi EnricoMi deleted the branch-move-to-lxml branch May 23, 2022 13:09
EnricoMi added a commit that referenced this pull request Jun 6, 2022
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.

None yet

1 participant