瀏覽代碼

Use defusedxml for xml parsing instead of etree

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
Álvaro Brey Vilas 3 年之前
父節點
當前提交
7073746309
共有 4 個文件被更改,包括 9 次插入3 次删除
  1. 3 0
      .github/workflows/analysis.yml
  2. 4 1
      .gitignore
  3. 1 1
      scripts/analysis/spotbugsComparison.py
  4. 1 1
      scripts/analysis/spotbugsSummary.py

+ 3 - 0
.github/workflows/analysis.yml

@@ -40,6 +40,9 @@ jobs:
                 with:
                     distribution: "temurin"
                     java-version: 11
+            -   name: Install dependencies
+                run: |
+                    python3 -m pip install defusedxml
             -   name: Run analysis wrapper
                 run: |
                     mkdir -p $HOME/.gradle

+ 4 - 1
.gitignore

@@ -50,4 +50,7 @@ fastlane/Fastfile
 **/fastlane/test_output
 /fastlane/vendor/
 /.bundle/
-/fastlane/.bundle/
+/fastlane/.bundle
+
+# python
+**/__pycache__/

+ 1 - 1
scripts/analysis/spotbugsComparison.py

@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 import argparse
-import xml.etree.ElementTree as ET
+import defusedxml.ElementTree as ET
 import spotbugsSummary
 
 

+ 1 - 1
scripts/analysis/spotbugsSummary.py

@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 import argparse
-import xml.etree.ElementTree as ET
+import defusedxml.ElementTree as ET
 
 
 def get_counts(tree):