diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9fcfac45..2699c024 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,6 +38,7 @@ repos: "types-PyYAML==6.0", "types-toml~=0.10", "types-requests~=2.13", + "lxml-stubs", ] - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.2.2 diff --git a/src/core_codemods/one.py b/src/core_codemods/one.py new file mode 100644 index 00000000..c69ce910 --- /dev/null +++ b/src/core_codemods/one.py @@ -0,0 +1,5 @@ +from lxml import etree + +parser = etree.XMLParser() +tree = etree.parse("xxe.xml", parser) +root = tree.getroot() diff --git a/src/core_codemods/two.py b/src/core_codemods/two.py new file mode 100644 index 00000000..a1f5c66a --- /dev/null +++ b/src/core_codemods/two.py @@ -0,0 +1,5 @@ +import lxml.etree + +parser = lxml.etree.XMLParser() +tree = lxml.etree.parse("xxe.xml", parser) +root = tree.getroot()